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->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  if( (*it)->mpDockingWindow == pWindow )
389  {
390  mvDockingWindows.erase( it );
391  break;
392  }
393  }
394 }
395 
396 void DockingManager::SetPosSizePixel( vcl::Window const *pWindow, long nX, long nY,
397  long nWidth, long nHeight,
398  PosSizeFlags nFlags )
399 {
400  ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
401  if( pWrapper )
402  pWrapper->setPosSizePixel( nX, nY, nWidth, nHeight, nFlags );
403 }
404 
406 {
407  tools::Rectangle aRect;
408  ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
409  if( pWrapper )
410  aRect = tools::Rectangle( pWrapper->GetPosPixel(), pWrapper->GetSizePixel() );
411 
412  return aRect;
413 }
414 
416 {
417 private:
418  bool mbToolBox;
419 
420 public:
421  ImplPopupFloatWin( vcl::Window* pParent, bool bToolBox );
422  virtual ~ImplPopupFloatWin() override;
423  virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override;
424 };
425 
428  mbToolBox( bToolBox )
429 {
430  if ( bToolBox )
431  {
432  // indicate window type, required for accessibility
433  // which should not see this window as a toplevel window
434  mpWindowImpl->mbToolbarFloatingWindow = true;
435  }
436 }
437 
439 {
440  disposeOnce();
441 }
442 
443 css::uno::Reference< css::accessibility::XAccessible > ImplPopupFloatWin::CreateAccessible()
444 {
445  if ( !mbToolBox )
447 
448  // switch off direct accessibility support for this window
449 
450  // this is to avoid appearance of this window as standalone window in the accessibility hierarchy
451  // as this window is only used as a helper for subtoolbars that are not teared-off, the parent toolbar
452  // has to provide accessibility support (as implemented in the toolkit)
453  // so the contained toolbar should appear as child of the corresponding toolbar item of the parent toolbar
454  return css::uno::Reference< css::accessibility::XAccessible >();
455 }
456 
458  : mpDockingWindow(const_cast<vcl::Window*>(pWindow))
459  , mpFloatWin(nullptr)
460  , mpOldBorderWin(nullptr)
461  , mpParent(pWindow->GetParent())
462  , maMaxOutSize( SHRT_MAX, SHRT_MAX )
463  , mnTrackX(0)
464  , mnTrackY(0)
465  , mnTrackWidth(0)
466  , mnTrackHeight(0)
467  , mnDockLeft(0)
468  , mnDockTop(0)
469  , mnDockRight(0)
470  , mnDockBottom(0)
471  , mnFloatBits(WB_BORDER | WB_CLOSEABLE | WB_SIZEABLE | (pWindow->GetStyle() & DOCKWIN_FLOATSTYLES))
472  , mbDockCanceled(false)
473  , mbDocking(false)
474  , mbLastFloatMode(false)
475  , mbRollUp(false)
476  , mbDockBtn(false)
477  , mbHideBtn(false)
478  // must be enabled in Window::Notify to prevent permanent docking during mouse move
479  , mbStartDockingEnabled(false)
480  , mbLocked(false)
481 {
483  DockingWindow *pDockWin = dynamic_cast< DockingWindow* > ( mpDockingWindow.get() );
484  if( pDockWin )
485  mnFloatBits = pDockWin->GetFloatStyle();
486 }
487 
489 {
490  if ( IsFloatingMode() )
491  {
493  SetFloatingMode(false);
494  }
495 }
496 
498 {
499  if( !mbStartDockingEnabled )
500  return;
501 
502  maMouseOff = rPos;
503  mbDocking = true;
505 
506  // calculate FloatingBorder
508  if ( mpFloatWin )
509  pWin = mpFloatWin;
510  else
513  if ( !mpFloatWin )
514  pWin.disposeAndClear();
515 
516  Point aPos = GetWindow()->ImplOutputToFrame( Point() );
517  Size aSize = GetWindow()->GetOutputSizePixel();
518  mnTrackX = aPos.X();
519  mnTrackY = aPos.Y();
520  mnTrackWidth = aSize.Width();
521  mnTrackHeight = aSize.Height();
522 
523  if ( mbLastFloatMode )
524  {
525  maMouseOff.AdjustX(mnDockLeft );
526  maMouseOff.AdjustY(mnDockTop );
527  mnTrackX -= mnDockLeft;
528  mnTrackY -= mnDockTop;
531  }
532 
533  vcl::Window *pDockingArea = GetWindow()->GetParent();
534  vcl::Window::PointerState aState = pDockingArea->GetPointerState();
535 
536  // mouse pos in screen pixels
537  Point aMousePos = pDockingArea->OutputToScreenPixel( aState.maPos );
538  Point aDockPos = pDockingArea->AbsoluteScreenToOutputPixel( GetWindow()->OutputToAbsoluteScreenPixel( GetWindow()->GetPosPixel() ) );
539  tools::Rectangle aDockRect( aDockPos, GetWindow()->GetSizePixel() );
540  StartDocking( aMousePos, aDockRect );
541 
544 
546 }
547 
549 {
550  // used during docking of a currently docked window
551  if ( mbDocking )
552  {
553  if ( rTEvt.IsTrackingEnded() )
554  {
555  mbDocking = false;
556  GetWindow()->HideTracking();
557  if ( rTEvt.IsTrackingCanceled() )
558  {
559  mbDockCanceled = true;
561  mbDockCanceled = false;
562  }
563  else
565  }
566  // Docking only upon non-synthetic MouseEvents
567  else if ( !rTEvt.GetMouseEvent().IsSynthetic() || rTEvt.GetMouseEvent().IsModifierChanged() )
568  {
569  Point aMousePos = rTEvt.GetMouseEvent().GetPosPixel();
570  Point aFrameMousePos = GetWindow()->ImplOutputToFrame( aMousePos );
572  if ( aFrameMousePos.X() < 0 )
573  aFrameMousePos.setX( 0 );
574  if ( aFrameMousePos.Y() < 0 )
575  aFrameMousePos.setY( 0 );
576  if ( aFrameMousePos.X() > aFrameSize.Width()-1 )
577  aFrameMousePos.setX( aFrameSize.Width()-1 );
578  if ( aFrameMousePos.Y() > aFrameSize.Height()-1 )
579  aFrameMousePos.setY( aFrameSize.Height()-1 );
580  aMousePos = GetWindow()->ImplFrameToOutput( aFrameMousePos );
581  aMousePos.AdjustX( -(maMouseOff.X()) );
582  aMousePos.AdjustY( -(maMouseOff.Y()) );
583  Point aPos = GetWindow()->ImplOutputToFrame( aMousePos );
584  tools::Rectangle aTrackRect( aPos, Size( mnTrackWidth, mnTrackHeight ) );
585  tools::Rectangle aCompRect = aTrackRect;
586  aPos.AdjustX(maMouseOff.X() );
587  aPos.AdjustY(maMouseOff.Y() );
588 
589  bool bFloatMode = Docking( aPos, aTrackRect );
590 
591  if ( mbLastFloatMode != bFloatMode )
592  {
593  if ( bFloatMode )
594  {
595  aTrackRect.AdjustLeft( -mnDockLeft );
596  aTrackRect.AdjustTop( -mnDockTop );
597  aTrackRect.AdjustRight(mnDockRight );
598  aTrackRect.AdjustBottom(mnDockBottom );
599  }
600  else
601  {
602  if ( aCompRect == aTrackRect )
603  {
604  aTrackRect.AdjustLeft(mnDockLeft );
605  aTrackRect.AdjustTop(mnDockTop );
606  aTrackRect.AdjustRight( -mnDockRight );
607  aTrackRect.AdjustBottom( -mnDockBottom );
608  }
609  }
610  mbLastFloatMode = bFloatMode;
611  }
612 
613  ShowTrackFlags nTrackStyle;
614  if ( bFloatMode )
615  nTrackStyle = ShowTrackFlags::Object;
616  else
617  nTrackStyle = ShowTrackFlags::Big;
618  tools::Rectangle aShowTrackRect = aTrackRect;
619  aShowTrackRect.SetPos( GetWindow()->ImplFrameToOutput( aShowTrackRect.TopLeft() ) );
620 
621  GetWindow()->ShowTracking( aShowTrackRect, nTrackStyle );
622 
623  // calculate mouse offset again, as the rectangle was changed
624  maMouseOff.setX( aPos.X() - aTrackRect.Left() );
625  maMouseOff.setY( aPos.Y() - aTrackRect.Top() );
626 
627  mnTrackX = aTrackRect.Left();
628  mnTrackY = aTrackRect.Top();
629  mnTrackWidth = aTrackRect.GetWidth();
630  mnTrackHeight = aTrackRect.GetHeight();
631  }
632  }
633 }
634 
635 void ImplDockingWindowWrapper::StartDocking( const Point& rPoint, tools::Rectangle const & rRect )
636 {
637  DockingData data( rPoint, rRect, IsFloatingMode() );
638 
640  mbDocking = true;
641 }
642 
643 bool ImplDockingWindowWrapper::Docking( const Point& rPoint, tools::Rectangle& rRect )
644 {
645  DockingData data( rPoint, rRect, IsFloatingMode() );
646 
648  rRect = data.maTrackRect;
649  return data.mbFloating;
650 }
651 
652 void ImplDockingWindowWrapper::EndDocking( const tools::Rectangle& rRect, bool bFloatMode )
653 {
654  tools::Rectangle aRect( rRect );
655 
656  bool bOrigDockCanceled = mbDockCanceled;
657  if (bFloatMode && !StyleSettings::GetDockingFloatsSupported())
658  mbDockCanceled = true;
659 
660  if ( !IsDockingCanceled() )
661  {
662  bool bShow = false;
663  if ( bFloatMode != IsFloatingMode() )
664  {
666  SetFloatingMode( bFloatMode );
667  bShow = true;
668  if ( bFloatMode )
669  {
670  // #i44800# always use outputsize - as in all other places
672  mpFloatWin->SetPosPixel( aRect.TopLeft() );
673  }
674  }
675  if ( !bFloatMode )
676  {
677  Point aPos = aRect.TopLeft();
678  aPos = GetWindow()->GetParent()->ScreenToOutputPixel( aPos );
679  GetWindow()->SetPosSizePixel( aPos, aRect.GetSize() );
680  }
681 
682  if ( bShow )
684  }
685 
688 
689  mbDocking = false;
690 
691  // must be enabled in Window::Notify to prevent permanent docking during mouse move
692  mbStartDockingEnabled = false;
693 
694  mbDockCanceled = bOrigDockCanceled;
695 }
696 
698 {
699  bool bFloating = true;
701  return bFloating;
702 }
703 
705 {
706  // notify dockingwindow/toolbox
707  // note: this must be done *before* notifying the
708  // listeners to have the toolbox in the proper state
709  if( GetWindow()->IsDockingWindow() )
710  static_cast<DockingWindow*>(GetWindow())->ToggleFloatingMode();
711 
712  // now notify listeners
714 
715  // must be enabled in Window::Notify to prevent permanent docking during mouse move
716  mbStartDockingEnabled = false;
717 }
718 
720 {
721  if( nType == TitleButton::Menu )
722  {
723  ToolBox *pToolBox = dynamic_cast< ToolBox* >( GetWindow() );
724  if( pToolBox )
725  {
726  pToolBox->ExecuteCustomMenu();
727  }
728  }
729  if( nType == TitleButton::Docking )
730  {
732  }
733 }
734 
736 {
737  // TODO: add virtual Resizing() to class Window, so we can get rid of class DockingWindow
738  DockingWindow *pDockingWindow = dynamic_cast< DockingWindow* >( GetWindow() );
739  if( pDockingWindow )
740  pDockingWindow->Resizing( rSize );
741 }
742 
744 {
745  if ( mpFloatWin )
746  mpFloatWin->ShowTitleButton( nButton, bVisible );
747  else
748  {
749  if ( nButton == TitleButton::Docking )
750  mbDockBtn = bVisible;
751  else // if ( nButton == TitleButton::Hide )
752  mbHideBtn = bVisible;
753  }
754 }
755 
757 {
759 
760  // prepare reparenting
763  if( mpOldBorderWin.get() == GetWindow() )
764  mpOldBorderWin = nullptr; // no border window found
765 
766  // the new parent for popup mode
767  VclPtrInstance<ImplPopupFloatWin> pWin( mpParent, GetWindow()->GetType() == WindowType::TOOLBOX );
768  pWin->SetPopupModeEndHdl( LINK( this, ImplDockingWindowWrapper, PopupModeEnd ) );
769 
770  // At least for DockingWindow, GetText() has a side effect of setting deferred
771  // properties. This must be done before setting the border window (see below),
772  // so that the border width will end up in mpWindowImpl->mnBorderWidth, not in
773  // the border window (See DockingWindow::setPosSizeOnContainee() and
774  // DockingWindow::GetOptimalSize()).
775  pWin->SetText( GetWindow()->GetText() );
777 
778  GetWindow()->mpWindowImpl->mpBorderWindow = nullptr;
779  GetWindow()->mpWindowImpl->mnLeftBorder = 0;
780  GetWindow()->mpWindowImpl->mnTopBorder = 0;
781  GetWindow()->mpWindowImpl->mnRightBorder = 0;
782  GetWindow()->mpWindowImpl->mnBottomBorder = 0;
783 
784  // reparent borderwindow and window
785  if ( mpOldBorderWin )
786  mpOldBorderWin->SetParent( pWin );
787  GetWindow()->SetParent( pWin );
788 
789  // correct border window pointers
790  GetWindow()->mpWindowImpl->mpBorderWindow = pWin;
791  pWin->mpWindowImpl->mpClientWindow = GetWindow();
792  GetWindow()->mpWindowImpl->mpRealParent = pRealParent;
793 
794  // set mpFloatWin not until all window positioning is done !!!
795  // (SetPosPixel etc. check for valid mpFloatWin pointer)
796  mpFloatWin = pWin;
797 }
798 
800 {
801  // do nothing if window is floating
802  if( IsFloatingMode() )
803  return;
804 
806 
807  // don't allow tearoff, if globally disabled
809  ( GetWindow()->GetType() == WindowType::TOOLBOX && ToolBox::AlwaysLocked() ) )
811 
812  // if the subtoolbar was opened via keyboard make sure that key events
813  // will go into subtoolbar
814  if( pParentToolBox->IsKeyEvent() )
816 
817  mpFloatWin->StartPopupMode( pParentToolBox, nFlags );
818  GetWindow()->Show();
819 
820  if( pParentToolBox->IsKeyEvent() )
821  {
822  // send HOME key to subtoolbar in order to select first item
824  GetWindow()->KeyInput(aEvent);
825  }
826 }
827 
829 {
830  // do nothing if window is floating
831  if( IsFloatingMode() )
832  return;
833 
835  mpFloatWin->StartPopupMode( rRect, nFlags );
836  GetWindow()->Show();
837 }
838 
840 {
841  GetWindow()->Show( false, ShowFlags::NoFocusChange );
842 
843  // set parameter for handler before destroying floating window
844  EndPopupModeData aData( mpFloatWin->GetWindow( GetWindowType::Border )->GetPosPixel(), mpFloatWin->IsPopupModeTearOff() );
845 
846  // before deleting change parent back, so we can delete the floating window alone
847  vcl::Window* pRealParent = GetWindow()->GetWindow( GetWindowType::Parent );
848  GetWindow()->mpWindowImpl->mpBorderWindow = nullptr;
849  if ( mpOldBorderWin )
850  {
851  GetWindow()->SetParent( mpOldBorderWin );
852  static_cast<ImplBorderWindow*>(mpOldBorderWin.get())->GetBorder(
853  GetWindow()->mpWindowImpl->mnLeftBorder, GetWindow()->mpWindowImpl->mnTopBorder,
854  GetWindow()->mpWindowImpl->mnRightBorder, GetWindow()->mpWindowImpl->mnBottomBorder );
855  mpOldBorderWin->Resize();
856  }
857  GetWindow()->mpWindowImpl->mpBorderWindow = mpOldBorderWin;
858  GetWindow()->SetParent( pRealParent );
859  GetWindow()->mpWindowImpl->mpRealParent = pRealParent;
860 
861  maPopupModeEndHdl.Call(mpFloatWin);
862  mpFloatWin.disposeAndClear();
863 
864  // call handler - which will destroy the window and thus the wrapper as well !
865  GetWindow()->CallEventListeners( VclEventId::WindowEndPopupMode, &aData );
866 }
867 
869 {
870  if( GetFloatingWindow() )
871  return GetFloatingWindow()->IsInPopupMode();
872  else
873  return false;
874 }
875 
877 {
878  // do nothing if window is docked and locked
879  if( !IsFloatingMode() && IsLocked() )
880  return;
881 
882  if ( IsFloatingMode() != bFloatMode )
883  {
885  {
886  bool bVisible = GetWindow()->IsVisible();
887 
888  if ( bFloatMode )
889  {
891 
893 
897  mpOldBorderWin = nullptr; // no border window found
898 
900  mpParent,
904  : mnFloatBits,
905  this );
906 
907  // At least for DockingWindow, GetText() has a side effect of setting deferred
908  // properties. This must be done before setting the border window (see below),
909  // so that the border width will end up in mpWindowImpl->mnBorderWidth, not in
910  // the border window (See DockingWindow::setPosSizeOnContainee() and
911  // DockingWindow::GetOptimalSize()).
912  pWin->SetText( GetWindow()->GetText() );
913 
914  GetWindow()->mpWindowImpl->mpBorderWindow = nullptr;
915  GetWindow()->mpWindowImpl->mnLeftBorder = 0;
916  GetWindow()->mpWindowImpl->mnTopBorder = 0;
917  GetWindow()->mpWindowImpl->mnRightBorder = 0;
918  GetWindow()->mpWindowImpl->mnBottomBorder = 0;
919 
920  // if the parent gets destroyed, we also have to reset the parent of the BorderWindow
921  if ( mpOldBorderWin )
922  mpOldBorderWin->SetParent( pWin );
923  GetWindow()->SetParent( pWin );
924  pWin->SetPosPixel( Point() );
925 
926  GetWindow()->mpWindowImpl->mpBorderWindow = pWin;
927  pWin->mpWindowImpl->mpClientWindow = mpDockingWindow;
928  GetWindow()->mpWindowImpl->mpRealParent = pRealParent;
929 
930  pWin->SetOutputSizePixel( GetWindow()->GetSizePixel() );
931  pWin->SetPosPixel( maFloatPos );
932  // pass on DockingData to FloatingWindow
933  pWin->ShowTitleButton( TitleButton::Docking, mbDockBtn );
934  pWin->ShowTitleButton( TitleButton::Hide, mbHideBtn );
935  if ( mbRollUp )
936  pWin->RollUp();
937  else
938  pWin->RollDown();
939  pWin->SetRollUpOutputSizePixel( maRollUpOutSize );
940  pWin->SetMinOutputSizePixel( maMinOutSize );
941  pWin->SetMaxOutputSizePixel( maMaxOutSize );
942 
943  mpFloatWin = pWin;
944 
945  if ( bVisible )
947 
949  }
950  else
951  {
953 
954  // store FloatingData in FloatingWindow
962 
963  vcl::Window* pRealParent = GetWindow()->GetWindow( GetWindowType::Parent ); //mpWindowImpl->mpRealParent;
964  GetWindow()->mpWindowImpl->mpBorderWindow = nullptr;
965  if ( mpOldBorderWin )
966  {
968  static_cast<ImplBorderWindow*>(mpOldBorderWin.get())->GetBorder(
969  GetWindow()->mpWindowImpl->mnLeftBorder, GetWindow()->mpWindowImpl->mnTopBorder,
970  GetWindow()->mpWindowImpl->mnRightBorder, GetWindow()->mpWindowImpl->mnBottomBorder );
972  }
973  GetWindow()->mpWindowImpl->mpBorderWindow = mpOldBorderWin;
974  GetWindow()->SetParent( pRealParent );
975  GetWindow()->mpWindowImpl->mpRealParent = pRealParent;
976 
979 
980  if ( bVisible )
981  GetWindow()->Show();
982 
984 
985  }
986  }
987  }
988 }
989 
991 {
992  mnFloatBits = nStyle;
993 }
994 
995 
997  long nWidth, long nHeight,
998  PosSizeFlags nFlags )
999 {
1000  if ( mpFloatWin )
1001  mpFloatWin->setPosSizePixel( nX, nY, nWidth, nHeight, nFlags );
1002  else
1003  GetWindow()->setPosSizePixel( nX, nY, nWidth, nHeight, nFlags );
1004 }
1005 
1007 {
1008  if ( mpFloatWin )
1009  return mpFloatWin->GetPosPixel();
1010  else
1011  return mpDockingWindow->GetPosPixel();
1012 }
1013 
1015 {
1016  if ( mpFloatWin )
1017  return mpFloatWin->GetSizePixel();
1018  else
1019  return mpDockingWindow->GetSizePixel();
1020 }
1021 
1022 // old inlines from DockingWindow
1023 
1025 {
1026  if ( mpFloatWin )
1028  maMinOutSize = rSize;
1029 }
1030 
1032 {
1033  if ( mpFloatWin )
1035  maMaxOutSize = rSize;
1036 }
1037 
1039 {
1040  return (mpFloatWin != nullptr);
1041 }
1042 
1044 {
1045  maDragArea = rRect;
1046 }
1047 
1048 
1050 {
1051  mbLocked = true;
1052  // only toolbars support locking
1053  ToolBox *pToolBox = dynamic_cast< ToolBox * >( GetWindow() );
1054  if( pToolBox )
1055  pToolBox->Lock( mbLocked );
1056 }
1057 
1059 {
1060  mbLocked = false;
1061  // only toolbars support locking
1062  ToolBox *pToolBox = dynamic_cast< ToolBox * >( GetWindow() );
1063  if( pToolBox )
1064  pToolBox->Lock( mbLocked );
1065 }
1066 
1067 
1068 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual Point GetPosPixel() const
Definition: window.cxx:2838
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:1828
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:84
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:142
void StartPopupMode(const tools::Rectangle &rRect, FloatWinPopupFlags nPopupModeFlags)
Definition: dockmgr.cxx:828
bool Docking(const Point &rPos, tools::Rectangle &rRect)
Definition: dockmgr.cxx:643
const char aData[]
tools::Rectangle GetPosSizePixel(const vcl::Window *pWin)
Definition: dockmgr.cxx:405
long Height() const
bool IsRollUp() const
Definition: syswin.hxx:147
long AdjustLeft(long nHorzMoveDelta)
SAL_DLLPRIVATE Point ImplOutputToFrame(const Point &rPos)
Definition: window2.cxx:937
Point AbsoluteScreenToOutputPixel(const Point &rPos) const
Definition: window.cxx:2909
void ExecuteCustomMenu(const tools::Rectangle &rRect=tools::Rectangle())
Definition: toolbox2.cxx:1601
VclPtr< vcl::Window > mpDockingWindow
Definition: dockwin.hxx:80
void disposeAndClear()
Definition: vclptr.hxx:200
Important idle events to be run before processing drawing events.
virtual void Resize() override
Definition: brdwin.cxx:1736
void HideTracking()
Definition: window2.cxx:147
void ImplStartDocking(const Point &rPos)
Definition: dockmgr.cxx:497
virtual Size GetSizePixel() const
Definition: window.cxx:2396
bool mbFloating
Definition: dockwin.hxx:36
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:155
void ShowTitleButton(TitleButton nButton, bool bVisible)
Definition: syswin.cxx:332
Point GetPosPixel() const
Definition: dockmgr.cxx:1006
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:1007
PosSizeFlags
Definition: window.hxx:140
virtual void Resizing(Size &rSize)
Definition: syswin.cxx:295
void SetMinOutputSizePixel(const Size &rSize)
Definition: dockmgr.cxx:1024
SAL_DLLPRIVATE void ImplUpdateAll()
Definition: paint.cxx:987
void Lock(const vcl::Window *pWin)
Definition: dockmgr.cxx:314
bool IsKeyEvent() const
Definition: toolbox.hxx:479
Size GetSizePixel() const
Definition: dockmgr.cxx:1014
void StartTracking(StartTrackingFlags nFlags=StartTrackingFlags::NONE)
Definition: window2.cxx:244
bool IsFloatingMode() const
Definition: dockmgr.cxx:1038
void Tracking(const TrackingEvent &rTEvt)
Definition: dockmgr.cxx:548
long AdjustBottom(long nVertMoveDelta)
virtual void setPosSizePixel(long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags=PosSizeFlags::All)
Definition: window.cxx:2713
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:93
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:173
void ShowTitleButton(TitleButton nButton, bool bVisible)
Definition: dockmgr.cxx:743
ImplDockingWindowWrapper(const vcl::Window *pWindow)
Definition: dockmgr.cxx:457
virtual void SetOutputSizePixel(const Size &rNewSize)
Definition: window2.cxx:1274
long Top() const
WinBits const WB_STDPOPUP
VclPtr< vcl::Window > mpParent
Definition: dockwin.hxx:85
void EndDocking(const tools::Rectangle &rRect, bool bFloatMode)
Definition: dockmgr.cxx:652
#define MOUSE_LEFT
Definition: event.hxx:99
const Size & GetMinOutputSizePixel() const
Definition: syswin.hxx:153
bool IsAlwaysOnTopEnabled() const
Definition: window2.cxx:1143
void SetDragArea(const tools::Rectangle &rRect)
Definition: dockmgr.cxx:1043
vcl::Window * GetWindow()
Definition: dockwin.hxx:121
static void RemoveUserEvent(ImplSVEvent *nUserEvent)
Remove user event based on event ID.
Definition: svapp.cxx:1035
void SetMinOutputSizePixel(const Size &rSize)
Definition: syswin.cxx:397
static bool AlwaysLocked()
Definition: toolbox2.cxx:1700
#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:150
ImplDockingWindowWrapper.
Definition: dockwin.hxx:71
tools::Rectangle maTrackRect
Definition: dockwin.hxx:35
void TitleButtonClick(TitleButton nButton)
Definition: dockmgr.cxx:719
void SetParent(vcl::Window *pNewParent)
Definition: stacking.cxx:842
ShowTrackFlags
Definition: window.hxx:268
void Lock(bool bLock)
Definition: toolbox2.cxx:1682
VclPtr< FloatingWindow > mpFloatWin
Definition: dockwin.hxx:83
std::unique_ptr< WindowImpl > mpWindowImpl
Definition: window.hxx:510
void AddWindow(const vcl::Window *pWin)
Definition: dockmgr.cxx:376
virtual void Resize()
Definition: window.cxx:1830
bool IsInPopupMode() const
Definition: dockmgr.cxx:868
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:2856
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:443
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:876
bool IsInPopupMode(const vcl::Window *pWin)
Definition: dockmgr.cxx:356
vcl::Window * GetWindow(GetWindowType nType) const
Definition: stacking.cxx:1046
bool PrepareToggleFloatingMode()
Definition: dockmgr.cxx:697
RegionData_Impl * mpParent
virtual void KeyInput(const KeyEvent &rKEvt)
Definition: window.cxx:1800
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:2418
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:426
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:1031
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:635
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:136
long AdjustTop(long nVertMoveDelta)
FloatingWindow * GetFloatingWindow() const
Definition: dockwin.hxx:159
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:996
static sal_uInt64 GetSystemTicks()
void EndPopupMode(const vcl::Window *pWin)
Definition: dockmgr.cxx:362
long Left() const
virtual ~ImplPopupFloatWin() override
Definition: dockmgr.cxx:438
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:2850
#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:586
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:990
void Resizing(Size &rSize)
Definition: dockmgr.cxx:735
TitleButton
Definition: syswin.hxx:52
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)
Definition: window.cxx:2182
void SetPosSizePixel(vcl::Window const *pWin, long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags)
Definition: dockmgr.cxx:396