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