LibreOffice Module vcl (master)  1
dockmgr.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #include <tools/time.hxx>
21 #include <sal/log.hxx>
22 #include <o3tl/deleter.hxx>
23 
24 #include <brdwin.hxx>
25 #include <svdata.hxx>
26 #include <window.h>
27 
28 #include <vcl/event.hxx>
29 #include <vcl/floatwin.hxx>
30 #include <vcl/dockwin.hxx>
31 #include <vcl/toolbox.hxx>
32 #include <vcl/svapp.hxx>
33 #include <vcl/timer.hxx>
34 #include <vcl/settings.hxx>
35 
36 #define DOCKWIN_FLOATSTYLES (WB_SIZEABLE | WB_MOVEABLE | WB_CLOSEABLE | WB_STANDALONE | WB_ROLLABLE )
37 
38 namespace {
39 
40 class ImplDockFloatWin2 : public FloatingWindow
41 {
42 private:
43  ImplDockingWindowWrapper* mpDockWin;
44  sal_uInt64 mnLastTicks;
45  Timer m_aDockTimer;
46  Timer m_aEndDockTimer;
47  Point maDockPos;
48  tools::Rectangle maDockRect;
49  bool mbInMove;
50  ImplSVEvent * mnLastUserEvent;
51 
52  DECL_LINK(DockingHdl, void *, void);
53  DECL_LINK(DockTimerHdl, Timer *, void);
54  DECL_LINK(EndDockTimerHdl, Timer *, void);
55 public:
56  ImplDockFloatWin2( vcl::Window* pParent, WinBits nWinBits,
57  ImplDockingWindowWrapper* pDockingWin );
58  virtual ~ImplDockFloatWin2() override;
59  virtual void dispose() override;
60 
61  virtual void Move() override;
62  virtual void Resize() override;
63  virtual void TitleButtonClick( TitleButton nButton ) override;
64  virtual void Resizing( Size& rSize ) override;
65  virtual bool Close() override;
66 };
67 
68 }
69 
70 ImplDockFloatWin2::ImplDockFloatWin2( vcl::Window* pParent, WinBits nWinBits,
71  ImplDockingWindowWrapper* pDockingWin ) :
72  FloatingWindow( pParent, nWinBits ),
73  mpDockWin( pDockingWin ),
74  mnLastTicks( tools::Time::GetSystemTicks() ),
75  mbInMove( false ),
76  mnLastUserEvent( nullptr )
77 {
78  // copy state of DockingWindow
79  if ( pDockingWin )
80  {
81  SetSettings( pDockingWin->GetWindow()->GetSettings() );
82  Enable( pDockingWin->GetWindow()->IsEnabled(), false );
83  EnableInput( pDockingWin->GetWindow()->IsInputEnabled(), false );
84  AlwaysEnableInput( pDockingWin->GetWindow()->IsAlwaysEnableInput(), false );
85  EnableAlwaysOnTop( pDockingWin->GetWindow()->IsAlwaysOnTopEnabled() );
86  SetActivateMode( pDockingWin->GetWindow()->GetActivateMode() );
87  }
88 
89  SetBackground( GetSettings().GetStyleSettings().GetFaceColor() );
90 
91  m_aDockTimer.SetInvokeHandler( LINK( this, ImplDockFloatWin2, DockTimerHdl ) );
92  m_aDockTimer.SetPriority( TaskPriority::HIGH_IDLE );
93  m_aDockTimer.SetTimeout( 50 );
94  m_aDockTimer.SetDebugName( "vcl::ImplDockFloatWin2 m_aDockTimer" );
95 
96  m_aEndDockTimer.SetInvokeHandler( LINK( this, ImplDockFloatWin2, EndDockTimerHdl ) );
97  m_aEndDockTimer.SetPriority( TaskPriority::HIGH_IDLE );
98  m_aEndDockTimer.SetTimeout( 50 );
99  m_aEndDockTimer.SetDebugName( "vcl::ImplDockFloatWin2 m_aEndDockTimer" );
100 }
101 
102 ImplDockFloatWin2::~ImplDockFloatWin2()
103 {
104  disposeOnce();
105 }
106 
107 void ImplDockFloatWin2::dispose()
108 {
109  if( mnLastUserEvent )
110  Application::RemoveUserEvent( mnLastUserEvent );
112 }
113 
114 IMPL_LINK_NOARG(ImplDockFloatWin2, DockTimerHdl, Timer *, void)
115 {
116  SAL_WARN_IF( !mpDockWin->IsFloatingMode(), "vcl", "docktimer called but not floating" );
117 
118  PointerState aState = GetPointerState();
119 
120  if( aState.mnState & KEY_MOD1 )
121  {
122  // i43499 CTRL disables docking now
123  mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->HideTracking();
124  if( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) )
125  m_aDockTimer.Start();
126  }
127  else if( ! ( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) ) )
128  {
129  mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->HideTracking();
130  mpDockWin->EndDocking( maDockRect, false );
131  }
132  else
133  {
134  mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, ShowTrackFlags::Big | ShowTrackFlags::TrackWindow );
135  m_aDockTimer.Start();
136  }
137 }
138 
139 IMPL_LINK_NOARG(ImplDockFloatWin2, EndDockTimerHdl, Timer *, void)
140 {
141  SAL_WARN_IF( !mpDockWin->IsFloatingMode(), "vcl", "enddocktimer called but not floating" );
142 
143  PointerState aState = GetPointerState();
144  if( ! ( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) ) )
145  {
146  mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->HideTracking();
147  mpDockWin->EndDocking( maDockRect, true );
148  }
149  else
150  m_aEndDockTimer.Start();
151 }
152 
153 IMPL_LINK_NOARG(ImplDockFloatWin2, DockingHdl, void*, void)
154 {
155  // called during move of a floating window
156  mnLastUserEvent = nullptr;
157 
158  vcl::Window *pDockingArea = mpDockWin->GetWindow()->GetParent();
159  PointerState aState = pDockingArea->GetPointerState();
160 
161  bool bRealMove = true;
162  if( GetStyle() & WB_OWNERDRAWDECORATION )
163  {
164  // for windows with ownerdraw decoration
165  // we allow docking only when the window was moved
166  // by dragging its caption
167  // and ignore move request due to resizing
168  vcl::Window *pBorder = GetWindow( GetWindowType::Border );
169  if( pBorder != this )
170  {
171  tools::Rectangle aBorderRect( Point(), pBorder->GetSizePixel() );
172  sal_Int32 nLeft, nTop, nRight, nBottom;
173  GetBorder( nLeft, nTop, nRight, nBottom );
174  // limit borderrect to the caption part only and without the resizing borders
175  aBorderRect.SetBottom( aBorderRect.Top() + nTop );
176  aBorderRect.AdjustLeft(nLeft );
177  aBorderRect.AdjustRight( -nRight );
178 
179  PointerState aBorderState = pBorder->GetPointerState();
180  bRealMove = aBorderRect.IsInside( aBorderState.maPos );
181  }
182  }
183 
184  if( mpDockWin->GetWindow()->IsVisible() &&
185  (tools::Time::GetSystemTicks() - mnLastTicks > 500) &&
186  ( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) ) &&
187  !(aState.mnState & KEY_MOD1) && // i43499 CTRL disables docking now
188  bRealMove )
189  {
190  maDockPos = pDockingArea->OutputToScreenPixel( pDockingArea->AbsoluteScreenToOutputPixel( OutputToAbsoluteScreenPixel( Point() ) ) );
191  maDockRect = tools::Rectangle( maDockPos, mpDockWin->GetSizePixel() );
192 
193  // mouse pos in screen pixels
194  Point aMousePos = pDockingArea->OutputToScreenPixel( aState.maPos );
195 
196  if( ! mpDockWin->IsDocking() )
197  mpDockWin->StartDocking( aMousePos, maDockRect );
198 
199  bool bFloatMode = mpDockWin->Docking( aMousePos, maDockRect );
200 
201  if( ! bFloatMode )
202  {
203  // indicates that the window could be docked at maDockRect
204  maDockRect.SetPos( mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->ScreenToOutputPixel(
205  maDockRect.TopLeft() ) );
206  mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, ShowTrackFlags::Big | ShowTrackFlags::TrackWindow );
207  m_aEndDockTimer.Stop();
208  m_aDockTimer.Invoke();
209  }
210  else
211  {
212  mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->HideTracking();
213  m_aDockTimer.Stop();
214  m_aEndDockTimer.Invoke();
215  }
216  }
217  mbInMove = false;
218 }
219 
220 void ImplDockFloatWin2::Move()
221 {
222  if( mbInMove )
223  return;
224 
225  mbInMove = true;
227  mpDockWin->GetWindow()->Move();
228 
229  /*
230  * note: the window should only dock if KEY_MOD1 is pressed
231  * and the user releases all mouse buttons. The real problem here
232  * is that we don't get mouse events (at least not on X)
233  * if the mouse is on the decoration. So we have to start an
234  * awkward timer based process that polls the modifier/buttons
235  * to see whether they are in the right condition shortly after the
236  * last Move message.
237  */
238  if( ! mnLastUserEvent )
239  mnLastUserEvent = Application::PostUserEvent( LINK( this, ImplDockFloatWin2, DockingHdl ), nullptr, true );
240 }
241 
242 void ImplDockFloatWin2::Resize()
243 {
244  // forwarding of resize only required if we have no borderwindow ( GetWindow() then returns 'this' )
245  if( GetWindow( GetWindowType::Border ) == this )
246  {
248  Size aSize( GetSizePixel() );
249  mpDockWin->GetWindow()->ImplPosSizeWindow( 0, 0, aSize.Width(), aSize.Height(), PosSizeFlags::PosSize ); // TODO: is this needed ???
250  }
251 }
252 
253 void ImplDockFloatWin2::TitleButtonClick( TitleButton nButton )
254 {
256  mpDockWin->TitleButtonClick( nButton );
257 }
258 
259 void ImplDockFloatWin2::Resizing( Size& rSize )
260 {
261  FloatingWindow::Resizing( rSize );
262  mpDockWin->Resizing( rSize );
263 }
264 
265 bool ImplDockFloatWin2::Close()
266 {
267  return true;
268 }
269 
271 {
272 }
273 
275 {
276 }
277 
279 {
280  for( const auto& xWrapper : mvDockingWindows )
281  {
282  if (xWrapper && xWrapper->mpDockingWindow == pWindow)
283  return xWrapper.get();
284  }
285  return nullptr;
286 }
287 
289 {
290  ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
291 
292  /*
293  if( pWindow->HasDockingHandler() )
294  return true;
295  */
296  return (pWrapper != nullptr);
297 }
298 
300 {
301  ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
302  if( pWrapper )
303  return pWrapper->IsFloatingMode();
304  else
305  return false;
306 }
307 
308 bool DockingManager::IsLocked( const vcl::Window *pWindow )
309 {
310  ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
311  return pWrapper && pWrapper->IsLocked();
312 }
313 
314 void DockingManager::Lock( const vcl::Window *pWindow )
315 {
316  ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
317  if( pWrapper )
318  pWrapper->Lock();
319 }
320 
321 void DockingManager::Unlock( const vcl::Window *pWindow )
322 {
323  ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
324  if( pWrapper )
325  pWrapper->Unlock();
326 }
327 
328 void DockingManager::SetFloatingMode( const vcl::Window *pWindow, bool bFloating )
329 {
330  ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
331  if( pWrapper )
332  pWrapper->SetFloatingMode( bFloating );
333 }
334 
336 {
337  ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
338  if( pWrapper )
339  pWrapper->StartPopupMode( rRect, nFlags );
340 }
341 
342 void DockingManager::StartPopupMode( ToolBox *pParentToolBox, const vcl::Window *pWindow, FloatWinPopupFlags nFlags )
343 {
344  ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
345  if( pWrapper )
346  pWrapper->StartPopupMode( pParentToolBox, nFlags );
347 }
348 
349 void DockingManager::StartPopupMode( ToolBox *pParentToolBox, const vcl::Window *pWindow )
350 {
351  StartPopupMode( pParentToolBox, pWindow, FloatWinPopupFlags::AllowTearOff |
354 }
355 
357 {
358  ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
359  return pWrapper && pWrapper->IsInPopupMode();
360 }
361 
363 {
365  if( pWrapper && pWrapper->GetFloatingWindow() && pWrapper->GetFloatingWindow()->IsInPopupMode() )
366  pWrapper->GetFloatingWindow()->EndPopupMode();
367 }
368 
370 {
371  ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
372  if( pWrapper )
373  pWrapper->SetPopupModeEndHdl(rLink);
374 }
375 
377 {
378  ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
379  if( pWrapper )
380  return;
381  mvDockingWindows.emplace_back( new ImplDockingWindowWrapper( pWindow ) );
382 }
383 
385 {
386  for( auto it = mvDockingWindows.begin(); it != mvDockingWindows.end(); ++it )
387  {
388  const auto& xWrapper = *it;
389  if (xWrapper && xWrapper->mpDockingWindow == pWindow)
390  {
391  mvDockingWindows.erase( it );
392  break;
393  }
394  }
395 }
396 
397 void DockingManager::SetPosSizePixel( vcl::Window const *pWindow, long nX, long nY,
398  long nWidth, long nHeight,
399  PosSizeFlags nFlags )
400 {
401  ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
402  if( pWrapper )
403  pWrapper->setPosSizePixel( nX, nY, nWidth, nHeight, nFlags );
404 }
405 
407 {
408  tools::Rectangle aRect;
409  ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
410  if( pWrapper )
411  aRect = tools::Rectangle( pWrapper->GetPosPixel(), pWrapper->GetSizePixel() );
412 
413  return aRect;
414 }
415 
417 {
418 private:
419  bool mbToolBox;
420 
421 public:
422  ImplPopupFloatWin( vcl::Window* pParent, bool bToolBox );
423  virtual ~ImplPopupFloatWin() override;
424  virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override;
425 };
426 
429  mbToolBox( bToolBox )
430 {
431  if ( bToolBox )
432  {
433  // indicate window type, required for accessibility
434  // which should not see this window as a toplevel window
435  mpWindowImpl->mbToolbarFloatingWindow = true;
436  }
437 }
438 
440 {
441  disposeOnce();
442 }
443 
444 css::uno::Reference< css::accessibility::XAccessible > ImplPopupFloatWin::CreateAccessible()
445 {
446  if ( !mbToolBox )
448 
449  // switch off direct accessibility support for this window
450 
451  // this is to avoid appearance of this window as standalone window in the accessibility hierarchy
452  // as this window is only used as a helper for subtoolbars that are not teared-off, the parent toolbar
453  // has to provide accessibility support (as implemented in the toolkit)
454  // so the contained toolbar should appear as child of the corresponding toolbar item of the parent toolbar
455  return css::uno::Reference< css::accessibility::XAccessible >();
456 }
457 
459  : mpDockingWindow(const_cast<vcl::Window*>(pWindow))
460  , mpFloatWin(nullptr)
461  , mpOldBorderWin(nullptr)
462  , mpParent(pWindow->GetParent())
463  , maMaxOutSize( SHRT_MAX, SHRT_MAX )
464  , mnTrackX(0)
465  , mnTrackY(0)
466  , mnTrackWidth(0)
467  , mnTrackHeight(0)
468  , mnDockLeft(0)
469  , mnDockTop(0)
470  , mnDockRight(0)
471  , mnDockBottom(0)
472  , mnFloatBits(WB_BORDER | WB_CLOSEABLE | WB_SIZEABLE | (pWindow->GetStyle() & DOCKWIN_FLOATSTYLES))
473  , mbDockCanceled(false)
474  , mbDocking(false)
475  , mbLastFloatMode(false)
476  , mbRollUp(false)
477  , mbDockBtn(false)
478  , mbHideBtn(false)
479  // must be enabled in Window::Notify to prevent permanent docking during mouse move
480  , mbStartDockingEnabled(false)
481  , mbLocked(false)
482 {
484  DockingWindow *pDockWin = dynamic_cast< DockingWindow* > ( mpDockingWindow.get() );
485  if( pDockWin )
486  mnFloatBits = pDockWin->GetFloatStyle();
487 }
488 
490 {
491  if ( IsFloatingMode() )
492  {
494  SetFloatingMode(false);
495  }
496 }
497 
499 {
500  if( !mbStartDockingEnabled )
501  return;
502 
503  maMouseOff = rPos;
504  mbDocking = true;
506 
507  // calculate FloatingBorder
509  if ( mpFloatWin )
510  pWin = mpFloatWin;
511  else
514  if ( !mpFloatWin )
515  pWin.disposeAndClear();
516 
517  Point aPos = GetWindow()->ImplOutputToFrame( Point() );
518  Size aSize = GetWindow()->GetOutputSizePixel();
519  mnTrackX = aPos.X();
520  mnTrackY = aPos.Y();
521  mnTrackWidth = aSize.Width();
522  mnTrackHeight = aSize.Height();
523 
524  if ( mbLastFloatMode )
525  {
526  maMouseOff.AdjustX(mnDockLeft );
527  maMouseOff.AdjustY(mnDockTop );
528  mnTrackX -= mnDockLeft;
529  mnTrackY -= mnDockTop;
532  }
533 
534  vcl::Window *pDockingArea = GetWindow()->GetParent();
535  vcl::Window::PointerState aState = pDockingArea->GetPointerState();
536 
537  // mouse pos in screen pixels
538  Point aMousePos = pDockingArea->OutputToScreenPixel( aState.maPos );
539  Point aDockPos = pDockingArea->AbsoluteScreenToOutputPixel( GetWindow()->OutputToAbsoluteScreenPixel( GetWindow()->GetPosPixel() ) );
540  tools::Rectangle aDockRect( aDockPos, GetWindow()->GetSizePixel() );
541  StartDocking( aMousePos, aDockRect );
542 
545 
547 }
548 
550 {
551  // used during docking of a currently docked window
552  if ( !mbDocking )
553  return;
554 
555  if ( rTEvt.IsTrackingEnded() )
556  {
557  mbDocking = false;
558  GetWindow()->HideTracking();
559  if ( rTEvt.IsTrackingCanceled() )
560  {
561  mbDockCanceled = true;
563  mbDockCanceled = false;
564  }
565  else
567  }
568  // Docking only upon non-synthetic MouseEvents
569  else if ( !rTEvt.GetMouseEvent().IsSynthetic() || rTEvt.GetMouseEvent().IsModifierChanged() )
570  {
571  Point aMousePos = rTEvt.GetMouseEvent().GetPosPixel();
572  Point aFrameMousePos = GetWindow()->ImplOutputToFrame( aMousePos );
574  if ( aFrameMousePos.X() < 0 )
575  aFrameMousePos.setX( 0 );
576  if ( aFrameMousePos.Y() < 0 )
577  aFrameMousePos.setY( 0 );
578  if ( aFrameMousePos.X() > aFrameSize.Width()-1 )
579  aFrameMousePos.setX( aFrameSize.Width()-1 );
580  if ( aFrameMousePos.Y() > aFrameSize.Height()-1 )
581  aFrameMousePos.setY( aFrameSize.Height()-1 );
582  aMousePos = GetWindow()->ImplFrameToOutput( aFrameMousePos );
583  aMousePos.AdjustX( -(maMouseOff.X()) );
584  aMousePos.AdjustY( -(maMouseOff.Y()) );
585  Point aPos = GetWindow()->ImplOutputToFrame( aMousePos );
586  tools::Rectangle aTrackRect( aPos, Size( mnTrackWidth, mnTrackHeight ) );
587  tools::Rectangle aCompRect = aTrackRect;
588  aPos.AdjustX(maMouseOff.X() );
589  aPos.AdjustY(maMouseOff.Y() );
590 
591  bool bFloatMode = Docking( aPos, aTrackRect );
592 
593  if ( mbLastFloatMode != bFloatMode )
594  {
595  if ( bFloatMode )
596  {
597  aTrackRect.AdjustLeft( -mnDockLeft );
598  aTrackRect.AdjustTop( -mnDockTop );
599  aTrackRect.AdjustRight(mnDockRight );
600  aTrackRect.AdjustBottom(mnDockBottom );
601  }
602  else
603  {
604  if ( aCompRect == aTrackRect )
605  {
606  aTrackRect.AdjustLeft(mnDockLeft );
607  aTrackRect.AdjustTop(mnDockTop );
608  aTrackRect.AdjustRight( -mnDockRight );
609  aTrackRect.AdjustBottom( -mnDockBottom );
610  }
611  }
612  mbLastFloatMode = bFloatMode;
613  }
614 
615  ShowTrackFlags nTrackStyle;
616  if ( bFloatMode )
617  nTrackStyle = ShowTrackFlags::Object;
618  else
619  nTrackStyle = ShowTrackFlags::Big;
620  tools::Rectangle aShowTrackRect = aTrackRect;
621  aShowTrackRect.SetPos( GetWindow()->ImplFrameToOutput( aShowTrackRect.TopLeft() ) );
622 
623  GetWindow()->ShowTracking( aShowTrackRect, nTrackStyle );
624 
625  // calculate mouse offset again, as the rectangle was changed
626  maMouseOff.setX( aPos.X() - aTrackRect.Left() );
627  maMouseOff.setY( aPos.Y() - aTrackRect.Top() );
628 
629  mnTrackX = aTrackRect.Left();
630  mnTrackY = aTrackRect.Top();
631  mnTrackWidth = aTrackRect.GetWidth();
632  mnTrackHeight = aTrackRect.GetHeight();
633  }
634 }
635 
636 void ImplDockingWindowWrapper::StartDocking( const Point& rPoint, tools::Rectangle const & rRect )
637 {
638  DockingData data( rPoint, rRect, IsFloatingMode() );
639 
641  mbDocking = true;
642 }
643 
644 bool ImplDockingWindowWrapper::Docking( const Point& rPoint, tools::Rectangle& rRect )
645 {
646  DockingData data( rPoint, rRect, IsFloatingMode() );
647 
649  rRect = data.maTrackRect;
650  return data.mbFloating;
651 }
652 
653 void ImplDockingWindowWrapper::EndDocking( const tools::Rectangle& rRect, bool bFloatMode )
654 {
655  tools::Rectangle aRect( rRect );
656 
657  bool bOrigDockCanceled = mbDockCanceled;
658  if (bFloatMode && !StyleSettings::GetDockingFloatsSupported())
659  mbDockCanceled = true;
660 
661  if ( !IsDockingCanceled() )
662  {
663  bool bShow = false;
664  if ( bFloatMode != IsFloatingMode() )
665  {
667  SetFloatingMode( bFloatMode );
668  bShow = true;
669  if ( bFloatMode )
670  {
671  // #i44800# always use outputsize - as in all other places
673  mpFloatWin->SetPosPixel( aRect.TopLeft() );
674  }
675  }
676  if ( !bFloatMode )
677  {
678  Point aPos = aRect.TopLeft();
679  aPos = GetWindow()->GetParent()->ScreenToOutputPixel( aPos );
680  GetWindow()->SetPosSizePixel( aPos, aRect.GetSize() );
681  }
682 
683  if ( bShow )
685  }
686 
689 
690  mbDocking = false;
691 
692  // must be enabled in Window::Notify to prevent permanent docking during mouse move
693  mbStartDockingEnabled = false;
694 
695  mbDockCanceled = bOrigDockCanceled;
696 }
697 
699 {
700  bool bFloating = true;
702  return bFloating;
703 }
704 
706 {
707  // notify dockingwindow/toolbox
708  // note: this must be done *before* notifying the
709  // listeners to have the toolbox in the proper state
710  if( GetWindow()->IsDockingWindow() )
711  static_cast<DockingWindow*>(GetWindow())->ToggleFloatingMode();
712 
713  // now notify listeners
715 
716  // must be enabled in Window::Notify to prevent permanent docking during mouse move
717  mbStartDockingEnabled = false;
718 }
719 
721 {
722  if( nType == TitleButton::Menu )
723  {
724  ToolBox *pToolBox = dynamic_cast< ToolBox* >( GetWindow() );
725  if( pToolBox )
726  {
727  pToolBox->ExecuteCustomMenu();
728  }
729  }
730  if( nType == TitleButton::Docking )
731  {
733  }
734 }
735 
737 {
738  // TODO: add virtual Resizing() to class Window, so we can get rid of class DockingWindow
739  DockingWindow *pDockingWindow = dynamic_cast< DockingWindow* >( GetWindow() );
740  if( pDockingWindow )
741  pDockingWindow->Resizing( rSize );
742 }
743 
745 {
746  if ( mpFloatWin )
747  mpFloatWin->ShowTitleButton( nButton, bVisible );
748  else
749  {
750  if ( nButton == TitleButton::Docking )
751  mbDockBtn = bVisible;
752  else // if ( nButton == TitleButton::Hide )
753  mbHideBtn = bVisible;
754  }
755 }
756 
758 {
760 
761  // prepare reparenting
764  if( mpOldBorderWin.get() == GetWindow() )
765  mpOldBorderWin = nullptr; // no border window found
766 
767  // the new parent for popup mode
768  VclPtrInstance<ImplPopupFloatWin> pWin( mpParent, GetWindow()->GetType() == WindowType::TOOLBOX );
769  pWin->SetPopupModeEndHdl( LINK( this, ImplDockingWindowWrapper, PopupModeEnd ) );
770 
771  // At least for DockingWindow, GetText() has a side effect of setting deferred
772  // properties. This must be done before setting the border window (see below),
773  // so that the border width will end up in mpWindowImpl->mnBorderWidth, not in
774  // the border window (See DockingWindow::setPosSizeOnContainee() and
775  // DockingWindow::GetOptimalSize()).
776  pWin->SetText( GetWindow()->GetText() );
778 
779  GetWindow()->mpWindowImpl->mpBorderWindow = nullptr;
780  GetWindow()->mpWindowImpl->mnLeftBorder = 0;
781  GetWindow()->mpWindowImpl->mnTopBorder = 0;
782  GetWindow()->mpWindowImpl->mnRightBorder = 0;
783  GetWindow()->mpWindowImpl->mnBottomBorder = 0;
784 
785  // reparent borderwindow and window
786  if ( mpOldBorderWin )
787  mpOldBorderWin->SetParent( pWin );
788  GetWindow()->SetParent( pWin );
789 
790  // correct border window pointers
791  GetWindow()->mpWindowImpl->mpBorderWindow = pWin;
792  pWin->mpWindowImpl->mpClientWindow = GetWindow();
793  GetWindow()->mpWindowImpl->mpRealParent = pRealParent;
794 
795  // set mpFloatWin not until all window positioning is done !!!
796  // (SetPosPixel etc. check for valid mpFloatWin pointer)
797  mpFloatWin = pWin;
798 }
799 
801 {
802  // do nothing if window is floating
803  if( IsFloatingMode() )
804  return;
805 
807 
808  // don't allow tearoff, if globally disabled
810  ( GetWindow()->GetType() == WindowType::TOOLBOX && ToolBox::AlwaysLocked() ) )
812 
813  // if the subtoolbar was opened via keyboard make sure that key events
814  // will go into subtoolbar
815  if( pParentToolBox->IsKeyEvent() )
817 
818  mpFloatWin->StartPopupMode( pParentToolBox, nFlags );
819  GetWindow()->Show();
820 
821  if( pParentToolBox->IsKeyEvent() )
822  {
823  // send HOME key to subtoolbar in order to select first item
825  GetWindow()->KeyInput(aEvent);
826  }
827 }
828 
830 {
831  // do nothing if window is floating
832  if( IsFloatingMode() )
833  return;
834 
836  mpFloatWin->StartPopupMode( rRect, nFlags );
837  GetWindow()->Show();
838 }
839 
841 {
842  GetWindow()->Show( false, ShowFlags::NoFocusChange );
843 
844  // set parameter for handler before destroying floating window
845  EndPopupModeData aData( mpFloatWin->GetWindow( GetWindowType::Border )->GetPosPixel(), mpFloatWin->IsPopupModeTearOff() );
846 
847  // before deleting change parent back, so we can delete the floating window alone
848  vcl::Window* pRealParent = GetWindow()->GetWindow( GetWindowType::Parent );
849  GetWindow()->mpWindowImpl->mpBorderWindow = nullptr;
850  if ( mpOldBorderWin )
851  {
852  GetWindow()->SetParent( mpOldBorderWin );
853  static_cast<ImplBorderWindow*>(mpOldBorderWin.get())->GetBorder(
854  GetWindow()->mpWindowImpl->mnLeftBorder, GetWindow()->mpWindowImpl->mnTopBorder,
855  GetWindow()->mpWindowImpl->mnRightBorder, GetWindow()->mpWindowImpl->mnBottomBorder );
856  mpOldBorderWin->Resize();
857  }
858  GetWindow()->mpWindowImpl->mpBorderWindow = mpOldBorderWin;
859  GetWindow()->SetParent( pRealParent );
860  GetWindow()->mpWindowImpl->mpRealParent = pRealParent;
861 
862  maPopupModeEndHdl.Call(mpFloatWin);
863  mpFloatWin.disposeAndClear();
864 
865  // call handler - which will destroy the window and thus the wrapper as well !
866  GetWindow()->CallEventListeners( VclEventId::WindowEndPopupMode, &aData );
867 }
868 
870 {
871  if( GetFloatingWindow() )
872  return GetFloatingWindow()->IsInPopupMode();
873  else
874  return false;
875 }
876 
878 {
879  // do nothing if window is docked and locked
880  if( !IsFloatingMode() && IsLocked() )
881  return;
882 
883  if ( IsFloatingMode() == bFloatMode )
884  return;
885 
886  if ( !PrepareToggleFloatingMode() )
887  return;
888 
889  bool bVisible = GetWindow()->IsVisible();
890 
891  if ( bFloatMode )
892  {
894 
896 
900  mpOldBorderWin = nullptr; // no border window found
901 
903  mpParent,
907  : mnFloatBits,
908  this );
909 
910  // At least for DockingWindow, GetText() has a side effect of setting deferred
911  // properties. This must be done before setting the border window (see below),
912  // so that the border width will end up in mpWindowImpl->mnBorderWidth, not in
913  // the border window (See DockingWindow::setPosSizeOnContainee() and
914  // DockingWindow::GetOptimalSize()).
915  pWin->SetText( GetWindow()->GetText() );
916 
917  GetWindow()->mpWindowImpl->mpBorderWindow = nullptr;
918  GetWindow()->mpWindowImpl->mnLeftBorder = 0;
919  GetWindow()->mpWindowImpl->mnTopBorder = 0;
920  GetWindow()->mpWindowImpl->mnRightBorder = 0;
921  GetWindow()->mpWindowImpl->mnBottomBorder = 0;
922 
923  // if the parent gets destroyed, we also have to reset the parent of the BorderWindow
924  if ( mpOldBorderWin )
925  mpOldBorderWin->SetParent( pWin );
926  GetWindow()->SetParent( pWin );
927  pWin->SetPosPixel( Point() );
928 
929  GetWindow()->mpWindowImpl->mpBorderWindow = pWin;
930  pWin->mpWindowImpl->mpClientWindow = mpDockingWindow;
931  GetWindow()->mpWindowImpl->mpRealParent = pRealParent;
932 
933  pWin->SetOutputSizePixel( GetWindow()->GetSizePixel() );
934  pWin->SetPosPixel( maFloatPos );
935  // pass on DockingData to FloatingWindow
936  pWin->ShowTitleButton( TitleButton::Docking, mbDockBtn );
937  pWin->ShowTitleButton( TitleButton::Hide, mbHideBtn );
938  if ( mbRollUp )
939  pWin->RollUp();
940  else
941  pWin->RollDown();
942  pWin->SetRollUpOutputSizePixel( maRollUpOutSize );
943  pWin->SetMinOutputSizePixel( maMinOutSize );
944  pWin->SetMaxOutputSizePixel( maMaxOutSize );
945 
946  mpFloatWin = pWin;
947 
948  if ( bVisible )
950 
952  }
953  else
954  {
956 
957  // store FloatingData in FloatingWindow
965 
966  vcl::Window* pRealParent = GetWindow()->GetWindow( GetWindowType::Parent ); //mpWindowImpl->mpRealParent;
967  GetWindow()->mpWindowImpl->mpBorderWindow = nullptr;
968  if ( mpOldBorderWin )
969  {
971  static_cast<ImplBorderWindow*>(mpOldBorderWin.get())->GetBorder(
972  GetWindow()->mpWindowImpl->mnLeftBorder, GetWindow()->mpWindowImpl->mnTopBorder,
973  GetWindow()->mpWindowImpl->mnRightBorder, GetWindow()->mpWindowImpl->mnBottomBorder );
975  }
976  GetWindow()->mpWindowImpl->mpBorderWindow = mpOldBorderWin;
977  GetWindow()->SetParent( pRealParent );
978  GetWindow()->mpWindowImpl->mpRealParent = pRealParent;
979 
982 
983  if ( bVisible )
984  GetWindow()->Show();
985 
987 
988  }
989 }
990 
992 {
993  mnFloatBits = nStyle;
994 }
995 
996 
998  long nWidth, long nHeight,
999  PosSizeFlags nFlags )
1000 {
1001  if ( mpFloatWin )
1002  mpFloatWin->setPosSizePixel( nX, nY, nWidth, nHeight, nFlags );
1003  else
1004  GetWindow()->setPosSizePixel( nX, nY, nWidth, nHeight, nFlags );
1005 }
1006 
1008 {
1009  if ( mpFloatWin )
1010  return mpFloatWin->GetPosPixel();
1011  else
1012  return mpDockingWindow->GetPosPixel();
1013 }
1014 
1016 {
1017  if ( mpFloatWin )
1018  return mpFloatWin->GetSizePixel();
1019  else
1020  return mpDockingWindow->GetSizePixel();
1021 }
1022 
1023 // old inlines from DockingWindow
1024 
1026 {
1027  if ( mpFloatWin )
1029  maMinOutSize = rSize;
1030 }
1031 
1033 {
1034  if ( mpFloatWin )
1036  maMaxOutSize = rSize;
1037 }
1038 
1040 {
1041  return (mpFloatWin != nullptr);
1042 }
1043 
1045 {
1046  maDragArea = rRect;
1047 }
1048 
1049 
1051 {
1052  mbLocked = true;
1053  // only toolbars support locking
1054  ToolBox *pToolBox = dynamic_cast< ToolBox * >( GetWindow() );
1055  if( pToolBox )
1056  pToolBox->Lock( mbLocked );
1057 }
1058 
1060 {
1061  mbLocked = false;
1062  // only toolbars support locking
1063  ToolBox *pToolBox = dynamic_cast< ToolBox * >( GetWindow() );
1064  if( pToolBox )
1065  pToolBox->Lock( mbLocked );
1066 }
1067 
1068 
1069 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual Point GetPosPixel() const
Definition: window.cxx:2792
Point TopLeft() const
long Width() const
void SetPos(const Point &rPoint)
bool IsInputEnabled() const
Definition: window2.cxx:1127
bool IsInPopupMode() const
Definition: floatwin.hxx:148
virtual void Move()
Definition: window.cxx:1827
WinBits const WB_NOSHADOW
long GetWidth() const
ActivateModeFlags GetActivateMode() const
Definition: window2.cxx:1137
void StartPopupMode(const tools::Rectangle &rRect, FloatWinPopupFlags nFlags)
Definition: floatwin.cxx:753
VclPtr< vcl::Window > mpOldBorderWin
Definition: dockwin.hxx:83
bool IsFloating(const vcl::Window *pWin)
Definition: dockmgr.cxx:299
void SetPopupModeEndHdl(const Link< FloatingWindow *, void > &rLink)
Definition: floatwin.hxx:153
bool bVisible
WinBits const WB_SYSTEMWINDOW
long GetHeight() const
constexpr sal_uInt16 KEY_MOD1
Definition: keycodes.hxx:31
void SetPopupModeEndHdl(const Link< FloatingWindow *, void > &rLink)
Definition: dockwin.hxx:141
void StartPopupMode(const tools::Rectangle &rRect, FloatWinPopupFlags nPopupModeFlags)
Definition: dockmgr.cxx:829
bool Docking(const Point &rPos, tools::Rectangle &rRect)
Definition: dockmgr.cxx:644
const char aData[]
tools::Rectangle GetPosSizePixel(const vcl::Window *pWin)
Definition: dockmgr.cxx:406
long Height() const
bool IsRollUp() const
Definition: syswin.hxx:146
long AdjustLeft(long nHorzMoveDelta)
SAL_DLLPRIVATE Point ImplOutputToFrame(const Point &rPos)
Definition: window2.cxx:937
Point AbsoluteScreenToOutputPixel(const Point &rPos) const
Definition: window.cxx:2863
void ExecuteCustomMenu(const tools::Rectangle &rRect=tools::Rectangle())
Definition: toolbox2.cxx:1603
VclPtr< vcl::Window > mpDockingWindow
Definition: dockwin.hxx:79
void disposeAndClear()
Definition: vclptr.hxx:200
Important idle events to be run before processing drawing events.
virtual void Resize() override
Definition: brdwin.cxx:1739
void HideTracking()
Definition: window2.cxx:147
void ImplStartDocking(const Point &rPos)
Definition: dockmgr.cxx:498
virtual Size GetSizePixel() const
Definition: window.cxx:2395
bool mbFloating
Definition: dockwin.hxx:35
SAL_DLLPRIVATE vcl::Window * ImplGetFrameWindow() const
Definition: window2.cxx:901
void SetPopupModeEndHdl(const vcl::Window *pWindow, const Link< FloatingWindow *, void > &rLink)
Definition: dockmgr.cxx:369
bool IsDockingCanceled() const
Definition: dockwin.hxx:154
void ShowTitleButton(TitleButton nButton, bool bVisible)
Definition: syswin.cxx:332
Point GetPosPixel() const
Definition: dockmgr.cxx:1007
const Size & GetMaxOutputSizePixel() const
Definition: syswin.cxx:429
static ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
Post a user event to the default window.
Definition: svapp.cxx:997
PosSizeFlags
Definition: window.hxx:140
virtual void Resizing(Size &rSize)
Definition: syswin.cxx:295
void SetMinOutputSizePixel(const Size &rSize)
Definition: dockmgr.cxx:1025
SAL_DLLPRIVATE void ImplUpdateAll()
Definition: paint.cxx:987
void Lock(const vcl::Window *pWin)
Definition: dockmgr.cxx:314
bool IsKeyEvent() const
Definition: toolbox.hxx:483
Size GetSizePixel() const
Definition: dockmgr.cxx:1015
void StartTracking(StartTrackingFlags nFlags=StartTrackingFlags::NONE)
Definition: window2.cxx:244
bool IsFloatingMode() const
Definition: dockmgr.cxx:1039
void Tracking(const TrackingEvent &rTEvt)
Definition: dockmgr.cxx:549
long AdjustBottom(long nVertMoveDelta)
virtual void setPosSizePixel(long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags=PosSizeFlags::All)
Definition: window.cxx:2667
WinBits const WB_OWNERDRAWDECORATION
sal_Int64 WinBits
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible()
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
tools::Rectangle maDragArea
Definition: dockwin.hxx:92
void ShowTracking(const tools::Rectangle &rRect, ShowTrackFlags nFlags=ShowTrackFlags::Small)
Definition: window2.cxx:124
std::vector< std::unique_ptr< ImplDockingWindowWrapper, o3tl::default_delete< ImplDockingWindowWrapper > > > mvDockingWindows
Definition: dockwin.hxx:172
void ShowTitleButton(TitleButton nButton, bool bVisible)
Definition: dockmgr.cxx:744
ImplDockingWindowWrapper(const vcl::Window *pWindow)
Definition: dockmgr.cxx:458
virtual void SetOutputSizePixel(const Size &rNewSize)
Definition: window2.cxx:1274
long Top() const
WinBits const WB_STDPOPUP
VclPtr< vcl::Window > mpParent
Definition: dockwin.hxx:84
void EndDocking(const tools::Rectangle &rRect, bool bFloatMode)
Definition: dockmgr.cxx:653
#define MOUSE_LEFT
Definition: event.hxx:99
const Size & GetMinOutputSizePixel() const
Definition: syswin.hxx:152
bool IsAlwaysOnTopEnabled() const
Definition: window2.cxx:1143
void SetDragArea(const tools::Rectangle &rRect)
Definition: dockmgr.cxx:1044
vcl::Window * GetWindow()
Definition: dockwin.hxx:120
static void RemoveUserEvent(ImplSVEvent *nUserEvent)
Remove user event based on event ID.
Definition: svapp.cxx:1025
void SetMinOutputSizePixel(const Size &rSize)
Definition: syswin.cxx:397
static bool AlwaysLocked()
Definition: toolbox2.cxx:1702
#define DOCKWIN_FLOATSTYLES
Definition: dockmgr.cxx:36
void SetMaxOutputSizePixel(const Size &rSize)
Definition: syswin.cxx:410
constexpr sal_uInt16 KEY_HOME
Definition: keycodes.hxx:114
const Size & GetRollUpOutputSizePixel() const
Definition: syswin.hxx:149
ImplDockingWindowWrapper.
Definition: dockwin.hxx:70
tools::Rectangle maTrackRect
Definition: dockwin.hxx:34
void TitleButtonClick(TitleButton nButton)
Definition: dockmgr.cxx:720
void SetParent(vcl::Window *pNewParent)
Definition: stacking.cxx:835
ShowTrackFlags
Definition: window.hxx:275
void Lock(bool bLock)
Definition: toolbox2.cxx:1684
VclPtr< FloatingWindow > mpFloatWin
Definition: dockwin.hxx:82
std::unique_ptr< WindowImpl > mpWindowImpl
Definition: window.hxx:519
void AddWindow(const vcl::Window *pWin)
Definition: dockmgr.cxx:376
virtual void Resize()
Definition: window.cxx:1829
bool IsInPopupMode() const
Definition: dockmgr.cxx:869
const AllSettings & GetSettings() const
Definition: outdev.hxx:418
Size GetOutputSizePixel() const
Definition: outdev.hxx:441
bool IsDockable(const vcl::Window *pWin)
Definition: dockmgr.cxx:288
Point ScreenToOutputPixel(const Point &rPos) const
Definition: window.cxx:2810
FloatWinPopupFlags
Definition: floatwin.hxx:31
bool IsTitleButtonVisible(TitleButton nButton) const
Definition: syswin.cxx:361
vcl::Window * GetParent() const
Definition: window2.cxx:1097
bool IsTrackingEnded() const
Definition: event.hxx:263
Size GetSize() const
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override
Definition: dockmgr.cxx:444
exports com.sun.star.chart2. data
virtual void SetPosSizePixel(const Point &rNewPos, const Size &rNewSize)
Definition: window2.cxx:1268
void SetFloatingMode(bool bFloatMode)
Definition: dockmgr.cxx:877
bool IsInPopupMode(const vcl::Window *pWin)
Definition: dockmgr.cxx:356
vcl::Window * GetWindow(GetWindowType nType) const
Definition: stacking.cxx:1039
bool PrepareToggleFloatingMode()
Definition: dockmgr.cxx:698
RegionData_Impl * mpParent
virtual void KeyInput(const KeyEvent &rKEvt)
Definition: window.cxx:1799
WinBits const WB_SIZEABLE
bool IsModifierChanged() const
Definition: event.hxx:141
void GetBorder(sal_Int32 &rLeftBorder, sal_Int32 &rTopBorder, sal_Int32 &rRightBorder, sal_Int32 &rBottomBorder) const
Definition: window.cxx:2417
A construction helper for a temporary VclPtr.
Definition: vclptr.hxx:275
void RemoveWindow(const vcl::Window *pWin)
Definition: dockmgr.cxx:384
ImplPopupFloatWin(vcl::Window *pParent, bool bToolBox)
Definition: dockmgr.cxx:427
long AdjustRight(long nHorzMoveDelta)
static bool GetDockingFloatsSupported()
bool IsSynthetic() const
Definition: event.hxx:139
#define SAL_WARN_IF(condition, area, stream)
void SetMaxOutputSizePixel(const Size &rSize)
Definition: dockmgr.cxx:1032
WinBits const WB_BORDER
bool IsVisible() const
Definition: window2.cxx:1102
void Unlock(const vcl::Window *pWin)
Definition: dockmgr.cxx:321
ImplDockingWindowWrapper * GetDockingWindowWrapper(const vcl::Window *pWin)
Definition: dockmgr.cxx:278
void StartDocking(const Point &rPos, tools::Rectangle const &rRect)
Definition: dockmgr.cxx:636
virtual void SetText(const OUString &rStr) override
Definition: syswin.cxx:1103
static VclPtr< reference_type > Create(Arg &&...arg)
A construction helper for VclPtr.
Definition: vclptr.hxx:127
SAL_DLLPRIVATE Point ImplFrameToOutput(const Point &rPos)
Definition: window2.cxx:942
bool IsLocked() const
Definition: dockwin.hxx:135
long AdjustTop(long nVertMoveDelta)
FloatingWindow * GetFloatingWindow() const
Definition: dockwin.hxx:158
void SetFloatingMode(const vcl::Window *pWin, bool bFloating)
Definition: dockmgr.cxx:328
const Point & GetPosPixel() const
Definition: event.hxx:120
void setPosSizePixel(long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags)
Definition: dockmgr.cxx:997
static sal_uInt64 GetSystemTicks()
void EndPopupMode(const vcl::Window *pWin)
Definition: dockmgr.cxx:362
long Left() const
virtual ~ImplPopupFloatWin() override
Definition: dockmgr.cxx:439
IMPL_LINK_NOARG(ImplDockFloatWin2, DockTimerHdl, Timer *, void)
Definition: dockmgr.cxx:114
bool IsAlwaysEnableInput() const
returns the current AlwaysEnableInput state
Definition: window2.cxx:1132
bool IsLocked(const vcl::Window *pWin)
Definition: dockmgr.cxx:308
reference_type * get() const
Get the body.
Definition: vclptr.hxx:143
bool IsEnabled() const
Definition: window2.cxx:1122
void StartPopupMode(const vcl::Window *pWin, const tools::Rectangle &rRect, FloatWinPopupFlags nPopupModeFlags)
Definition: dockmgr.cxx:335
bool IsTrackingCanceled() const
Definition: event.hxx:265
virtual void TitleButtonClick(TitleButton nButton)
Definition: syswin.cxx:291
Definition: timer.hxx:26
Point OutputToScreenPixel(const Point &rPos) const
Definition: window.cxx:2804
#define MOUSE_MIDDLE
Definition: event.hxx:100
WinBits const WB_CLOSEABLE
WinBits const WB_MOVEABLE
void dispose()
void CallEventListeners(VclEventId nEvent, void *pData=nullptr)
Definition: event.cxx:217
const MouseEvent & GetMouseEvent() const
Definition: event.hxx:259
virtual void Resizing(Size &rSize)
Definition: dockwin.cxx:638
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
Definition: floatwin.cxx:204
PointerState GetPointerState()
Definition: mouse.cxx:587
WinBits GetFloatStyle() const
Definition: dockwin.cxx:813
WinBits const WB_POPUP
#define MOUSE_RIGHT
Definition: event.hxx:101
void EndPopupMode(FloatWinPopupEndFlags nFlags=FloatWinPopupEndFlags::NONE)
Definition: floatwin.cxx:927
virtual void SetPosPixel(const Point &rNewPos)
Definition: window2.cxx:1257
virtual void Resize() override
Definition: syswin.cxx:1053
AnyEventRef aEvent
void SetFloatStyle(WinBits nWinStyle)
Definition: dockmgr.cxx:991
void Resizing(Size &rSize)
Definition: dockmgr.cxx:736
TitleButton
Definition: syswin.hxx:51
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)
Definition: window.cxx:2181
void SetPosSizePixel(vcl::Window const *pWin, long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags)
Definition: dockmgr.cxx:397