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)
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 
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  // deleting wrappers calls set of actions which may want to use
392  // wrapper we want to delete - avoid crash using temporary owner
393  // while erasing
394  auto pTemporaryOwner = std::move(*it);
395  mvDockingWindows.erase( it );
396  break;
397  }
398  }
399 }
400 
402  tools::Long nWidth, tools::Long nHeight,
403  PosSizeFlags nFlags )
404 {
405  ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
406  if( pWrapper )
407  pWrapper->setPosSizePixel( nX, nY, nWidth, nHeight, nFlags );
408 }
409 
411 {
412  tools::Rectangle aRect;
413  ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
414  if( pWrapper )
415  aRect = tools::Rectangle( pWrapper->GetPosPixel(), pWrapper->GetSizePixel() );
416 
417  return aRect;
418 }
419 
421 {
422 private:
423  bool mbToolBox;
424 
425 public:
426  ImplPopupFloatWin( vcl::Window* pParent, bool bToolBox );
427  virtual ~ImplPopupFloatWin() override;
428  virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override;
429 };
430 
433  mbToolBox( bToolBox )
434 {
435  if ( bToolBox )
436  {
437  // indicate window type, required for accessibility
438  // which should not see this window as a toplevel window
439  mpWindowImpl->mbToolbarFloatingWindow = true;
440  }
441 }
442 
444 {
445  disposeOnce();
446 }
447 
448 css::uno::Reference< css::accessibility::XAccessible > ImplPopupFloatWin::CreateAccessible()
449 {
450  if ( !mbToolBox )
452 
453  // switch off direct accessibility support for this window
454 
455  // this is to avoid appearance of this window as standalone window in the accessibility hierarchy
456  // as this window is only used as a helper for subtoolbars that are not teared-off, the parent toolbar
457  // has to provide accessibility support (as implemented in the toolkit)
458  // so the contained toolbar should appear as child of the corresponding toolbar item of the parent toolbar
459  return css::uno::Reference< css::accessibility::XAccessible >();
460 }
461 
463  : mpDockingWindow(const_cast<vcl::Window*>(pWindow))
464  , mpFloatWin(nullptr)
465  , mpOldBorderWin(nullptr)
466  , mpParent(pWindow->GetParent())
467  , maMaxOutSize( SHRT_MAX, SHRT_MAX )
468  , mnTrackX(0)
469  , mnTrackY(0)
470  , mnTrackWidth(0)
471  , mnTrackHeight(0)
472  , mnDockLeft(0)
473  , mnDockTop(0)
474  , mnDockRight(0)
475  , mnDockBottom(0)
476  , mnFloatBits(WB_BORDER | WB_CLOSEABLE | WB_SIZEABLE | (pWindow->GetStyle() & DOCKWIN_FLOATSTYLES))
477  , mbDockCanceled(false)
478  , mbDocking(false)
479  , mbLastFloatMode(false)
480  , mbDockBtn(false)
481  , mbHideBtn(false)
482  // must be enabled in Window::Notify to prevent permanent docking during mouse move
483  , mbStartDockingEnabled(false)
484  , mbLocked(false)
485 {
487  DockingWindow *pDockWin = dynamic_cast< DockingWindow* > ( mpDockingWindow.get() );
488  if( pDockWin )
489  mnFloatBits = pDockWin->GetFloatStyle();
490 }
491 
493 {
494  if ( IsFloatingMode() )
495  {
497  SetFloatingMode(false);
498  }
499 }
500 
502 {
503  if( !mbStartDockingEnabled )
504  return;
505 
506  maMouseOff = rPos;
507  mbDocking = true;
509 
510  // calculate FloatingBorder
512  if ( mpFloatWin )
513  pWin = mpFloatWin;
514  else
517  if ( !mpFloatWin )
518  pWin.disposeAndClear();
519 
520  Point aPos = GetWindow()->ImplOutputToFrame( Point() );
521  Size aSize = GetWindow()->GetOutputSizePixel();
522  mnTrackX = aPos.X();
523  mnTrackY = aPos.Y();
524  mnTrackWidth = aSize.Width();
525  mnTrackHeight = aSize.Height();
526 
527  if ( mbLastFloatMode )
528  {
529  maMouseOff.AdjustX(mnDockLeft );
530  maMouseOff.AdjustY(mnDockTop );
531  mnTrackX -= mnDockLeft;
532  mnTrackY -= mnDockTop;
535  }
536 
537  vcl::Window *pDockingArea = GetWindow()->GetParent();
538  vcl::Window::PointerState aState = pDockingArea->GetPointerState();
539 
540  // mouse pos in screen pixels
541  Point aMousePos = pDockingArea->OutputToScreenPixel( aState.maPos );
542  Point aDockPos = pDockingArea->AbsoluteScreenToOutputPixel( GetWindow()->OutputToAbsoluteScreenPixel( GetWindow()->GetPosPixel() ) );
543  tools::Rectangle aDockRect( aDockPos, GetWindow()->GetSizePixel() );
544  StartDocking( aMousePos, aDockRect );
545 
548 
550 }
551 
553 {
554  // used during docking of a currently docked window
555  if ( !mbDocking )
556  return;
557 
558  if ( rTEvt.IsTrackingEnded() )
559  {
560  mbDocking = false;
561  GetWindow()->HideTracking();
562  if ( rTEvt.IsTrackingCanceled() )
563  {
564  mbDockCanceled = true;
566  mbDockCanceled = false;
567  }
568  else
570  }
571  // Docking only upon non-synthetic MouseEvents
572  else if ( !rTEvt.GetMouseEvent().IsSynthetic() || rTEvt.GetMouseEvent().IsModifierChanged() )
573  {
574  Point aMousePos = rTEvt.GetMouseEvent().GetPosPixel();
575  Point aFrameMousePos = GetWindow()->ImplOutputToFrame( aMousePos );
577  if ( aFrameMousePos.X() < 0 )
578  aFrameMousePos.setX( 0 );
579  if ( aFrameMousePos.Y() < 0 )
580  aFrameMousePos.setY( 0 );
581  if ( aFrameMousePos.X() > aFrameSize.Width()-1 )
582  aFrameMousePos.setX( aFrameSize.Width()-1 );
583  if ( aFrameMousePos.Y() > aFrameSize.Height()-1 )
584  aFrameMousePos.setY( aFrameSize.Height()-1 );
585  aMousePos = GetWindow()->ImplFrameToOutput( aFrameMousePos );
586  aMousePos.AdjustX( -(maMouseOff.X()) );
587  aMousePos.AdjustY( -(maMouseOff.Y()) );
588  Point aPos = GetWindow()->ImplOutputToFrame( aMousePos );
589  tools::Rectangle aTrackRect( aPos, Size( mnTrackWidth, mnTrackHeight ) );
590  tools::Rectangle aCompRect = aTrackRect;
591  aPos.AdjustX(maMouseOff.X() );
592  aPos.AdjustY(maMouseOff.Y() );
593 
594  bool bFloatMode = Docking( aPos, aTrackRect );
595 
596  if ( mbLastFloatMode != bFloatMode )
597  {
598  if ( bFloatMode )
599  {
600  aTrackRect.AdjustLeft( -mnDockLeft );
601  aTrackRect.AdjustTop( -mnDockTop );
602  aTrackRect.AdjustRight(mnDockRight );
603  aTrackRect.AdjustBottom(mnDockBottom );
604  }
605  else
606  {
607  if ( aCompRect == aTrackRect )
608  {
609  aTrackRect.AdjustLeft(mnDockLeft );
610  aTrackRect.AdjustTop(mnDockTop );
611  aTrackRect.AdjustRight( -mnDockRight );
612  aTrackRect.AdjustBottom( -mnDockBottom );
613  }
614  }
615  mbLastFloatMode = bFloatMode;
616  }
617 
618  ShowTrackFlags nTrackStyle;
619  if ( bFloatMode )
620  nTrackStyle = ShowTrackFlags::Object;
621  else
622  nTrackStyle = ShowTrackFlags::Big;
623  tools::Rectangle aShowTrackRect = aTrackRect;
624  aShowTrackRect.SetPos( GetWindow()->ImplFrameToOutput( aShowTrackRect.TopLeft() ) );
625 
626  GetWindow()->ShowTracking( aShowTrackRect, nTrackStyle );
627 
628  // calculate mouse offset again, as the rectangle was changed
629  maMouseOff.setX( aPos.X() - aTrackRect.Left() );
630  maMouseOff.setY( aPos.Y() - aTrackRect.Top() );
631 
632  mnTrackX = aTrackRect.Left();
633  mnTrackY = aTrackRect.Top();
634  mnTrackWidth = aTrackRect.GetWidth();
635  mnTrackHeight = aTrackRect.GetHeight();
636  }
637 }
638 
639 void ImplDockingWindowWrapper::StartDocking( const Point& rPoint, tools::Rectangle const & rRect )
640 {
641  DockingData data( rPoint, rRect, IsFloatingMode() );
642 
644  mbDocking = true;
645 }
646 
647 bool ImplDockingWindowWrapper::Docking( const Point& rPoint, tools::Rectangle& rRect )
648 {
649  DockingData data( rPoint, rRect, IsFloatingMode() );
650 
652  rRect = data.maTrackRect;
653  return data.mbFloating;
654 }
655 
656 void ImplDockingWindowWrapper::EndDocking( const tools::Rectangle& rRect, bool bFloatMode )
657 {
658  tools::Rectangle aRect( rRect );
659 
660  bool bOrigDockCanceled = mbDockCanceled;
661  if (bFloatMode && !StyleSettings::GetDockingFloatsSupported())
662  mbDockCanceled = true;
663 
664  if ( !IsDockingCanceled() )
665  {
666  bool bShow = false;
667  if ( bFloatMode != IsFloatingMode() )
668  {
670  SetFloatingMode( bFloatMode );
671  bShow = true;
672  if ( bFloatMode )
673  {
674  // #i44800# always use outputsize - as in all other places
676  mpFloatWin->SetPosPixel( aRect.TopLeft() );
677  }
678  }
679  if ( !bFloatMode )
680  {
681  Point aPos = aRect.TopLeft();
682  aPos = GetWindow()->GetParent()->ScreenToOutputPixel( aPos );
683  GetWindow()->SetPosSizePixel( aPos, aRect.GetSize() );
684  }
685 
686  if ( bShow )
688  }
689 
692 
693  mbDocking = false;
694 
695  // must be enabled in Window::Notify to prevent permanent docking during mouse move
696  mbStartDockingEnabled = false;
697 
698  mbDockCanceled = bOrigDockCanceled;
699 }
700 
702 {
703  bool bFloating = true;
705  return bFloating;
706 }
707 
709 {
710  // notify dockingwindow/toolbox
711  // note: this must be done *before* notifying the
712  // listeners to have the toolbox in the proper state
713  if( GetWindow()->IsDockingWindow() )
714  static_cast<DockingWindow*>(GetWindow())->ToggleFloatingMode();
715 
716  // now notify listeners
718 
719  // must be enabled in Window::Notify to prevent permanent docking during mouse move
720  mbStartDockingEnabled = false;
721 }
722 
724 {
725  if( nType == TitleButton::Menu )
726  {
727  ToolBox *pToolBox = dynamic_cast< ToolBox* >( GetWindow() );
728  if( pToolBox )
729  {
730  pToolBox->ExecuteCustomMenu();
731  }
732  }
733  if( nType == TitleButton::Docking )
734  {
736  }
737 }
738 
740 {
741  // TODO: add virtual Resizing() to class Window, so we can get rid of class DockingWindow
742  DockingWindow *pDockingWindow = dynamic_cast< DockingWindow* >( GetWindow() );
743  if( pDockingWindow )
744  pDockingWindow->Resizing( rSize );
745 }
746 
748 {
749  if ( mpFloatWin )
750  mpFloatWin->ShowTitleButton( nButton, bVisible );
751  else
752  {
753  if ( nButton == TitleButton::Docking )
754  mbDockBtn = bVisible;
755  else // if ( nButton == TitleButton::Hide )
756  mbHideBtn = bVisible;
757  }
758 }
759 
761 {
762  VclPtr<vcl::Window> xWindow = GetWindow();
763  xWindow->Show( false, ShowFlags::NoFocusChange );
764 
765  // prepare reparenting
766  vcl::Window* pRealParent = xWindow->GetWindow( GetWindowType::Parent );
768  if( mpOldBorderWin.get() == xWindow )
769  mpOldBorderWin = nullptr; // no border window found
770 
771  // the new parent for popup mode
772  VclPtrInstance<ImplPopupFloatWin> pWin( mpParent, xWindow->GetType() == WindowType::TOOLBOX );
773  pWin->SetPopupModeEndHdl( LINK( this, ImplDockingWindowWrapper, PopupModeEnd ) );
774 
775  // At least for DockingWindow, GetText() has a side effect of setting deferred
776  // properties. This must be done before setting the border window (see below),
777  // so that the border width will end up in mpWindowImpl->mnBorderWidth, not in
778  // the border window (See DockingWindow::setPosSizeOnContainee() and
779  // DockingWindow::GetOptimalSize()).
780  pWin->SetText( xWindow->GetText() );
781  pWin->SetOutputSizePixel( xWindow->GetSizePixel() );
782 
783  xWindow->mpWindowImpl->mpBorderWindow = nullptr;
784  xWindow->mpWindowImpl->mnLeftBorder = 0;
785  xWindow->mpWindowImpl->mnTopBorder = 0;
786  xWindow->mpWindowImpl->mnRightBorder = 0;
787  xWindow->mpWindowImpl->mnBottomBorder = 0;
788 
789  // reparent borderwindow and window
790  if ( mpOldBorderWin )
791  mpOldBorderWin->SetParent( pWin );
792  xWindow->SetParent( pWin );
793 
794  // correct border window pointers
795  xWindow->mpWindowImpl->mpBorderWindow = pWin;
796  pWin->mpWindowImpl->mpClientWindow = xWindow;
797  xWindow->mpWindowImpl->mpRealParent = pRealParent;
798 
799  // set mpFloatWin not until all window positioning is done !!!
800  // (SetPosPixel etc. check for valid mpFloatWin pointer)
801  mpFloatWin = pWin;
802 }
803 
805 {
806  // do nothing if window is floating
807  if( IsFloatingMode() )
808  return;
809 
811 
812  // don't allow tearoff, if globally disabled
814  ( GetWindow()->GetType() == WindowType::TOOLBOX && ToolBox::AlwaysLocked() ) )
816 
817  // if the subtoolbar was opened via keyboard make sure that key events
818  // will go into subtoolbar
819  if( pParentToolBox->IsKeyEvent() )
821 
822  mpFloatWin->StartPopupMode( pParentToolBox, nFlags );
823  GetWindow()->Show();
824 
825  if( pParentToolBox->IsKeyEvent() )
826  {
827  // send HOME key to subtoolbar in order to select first item
829  GetWindow()->KeyInput(aEvent);
830  }
831 }
832 
834 {
835  // do nothing if window is floating
836  if( IsFloatingMode() )
837  return;
838 
840  mpFloatWin->StartPopupMode( rRect, nFlags );
841  GetWindow()->Show();
842 }
843 
845 {
846  VclPtr<vcl::Window> xWindow = GetWindow();
847  xWindow->Show( false, ShowFlags::NoFocusChange );
848 
849  // set parameter for handler before destroying floating window
850  EndPopupModeData aData( mpFloatWin->GetWindow( GetWindowType::Border )->GetPosPixel(), mpFloatWin->IsPopupModeTearOff() );
851 
852  // before deleting change parent back, so we can delete the floating window alone
853  vcl::Window* pRealParent = xWindow->GetWindow( GetWindowType::Parent );
854  xWindow->mpWindowImpl->mpBorderWindow = nullptr;
855  if ( mpOldBorderWin )
856  {
857  xWindow->SetParent( mpOldBorderWin );
858  static_cast<ImplBorderWindow*>(mpOldBorderWin.get())->GetBorder(
859  xWindow->mpWindowImpl->mnLeftBorder, xWindow->mpWindowImpl->mnTopBorder,
860  xWindow->mpWindowImpl->mnRightBorder, xWindow->mpWindowImpl->mnBottomBorder );
861  mpOldBorderWin->Resize();
862  }
863  xWindow->mpWindowImpl->mpBorderWindow = mpOldBorderWin;
864  xWindow->SetParent( pRealParent );
865  xWindow->mpWindowImpl->mpRealParent = pRealParent;
866 
867  // take ownership to local variable to protect against maPopupModeEndHdl destroying this object
868  auto xFloatWin = std::move(mpFloatWin);
869  maPopupModeEndHdl.Call(xFloatWin);
870  xFloatWin.disposeAndClear();
871 
872  // call handler - which will destroy the window and thus the wrapper as well !
874 }
875 
877 {
878  if( GetFloatingWindow() )
879  return GetFloatingWindow()->IsInPopupMode();
880  else
881  return false;
882 }
883 
885 {
886  // do nothing if window is docked and locked
887  if( !IsFloatingMode() && IsLocked() )
888  return;
889 
890  if ( IsFloatingMode() == bFloatMode )
891  return;
892 
893  if ( !PrepareToggleFloatingMode() )
894  return;
895 
896  bool bVisible = GetWindow()->IsVisible();
897 
898  if ( bFloatMode )
899  {
901 
903 
907  mpOldBorderWin = nullptr; // no border window found
908 
910  mpParent,
914  : mnFloatBits,
915  this );
916 
917  // At least for DockingWindow, GetText() has a side effect of setting deferred
918  // properties. This must be done before setting the border window (see below),
919  // so that the border width will end up in mpWindowImpl->mnBorderWidth, not in
920  // the border window (See DockingWindow::setPosSizeOnContainee() and
921  // DockingWindow::GetOptimalSize()).
922  pWin->SetText( GetWindow()->GetText() );
923 
924  GetWindow()->mpWindowImpl->mpBorderWindow = nullptr;
925  GetWindow()->mpWindowImpl->mnLeftBorder = 0;
926  GetWindow()->mpWindowImpl->mnTopBorder = 0;
927  GetWindow()->mpWindowImpl->mnRightBorder = 0;
928  GetWindow()->mpWindowImpl->mnBottomBorder = 0;
929 
930  // if the parent gets destroyed, we also have to reset the parent of the BorderWindow
931  if ( mpOldBorderWin )
932  mpOldBorderWin->SetParent( pWin );
933  GetWindow()->SetParent( pWin );
934  pWin->SetPosPixel( Point() );
935 
936  GetWindow()->mpWindowImpl->mpBorderWindow = pWin;
937  pWin->mpWindowImpl->mpClientWindow = mpDockingWindow;
938  GetWindow()->mpWindowImpl->mpRealParent = pRealParent;
939 
940  pWin->SetOutputSizePixel( GetWindow()->GetSizePixel() );
941  pWin->SetPosPixel( maFloatPos );
942  // pass on DockingData to FloatingWindow
943  pWin->ShowTitleButton( TitleButton::Docking, mbDockBtn );
944  pWin->ShowTitleButton( TitleButton::Hide, mbHideBtn );
945  pWin->SetMinOutputSizePixel( maMinOutSize );
946  pWin->SetMaxOutputSizePixel( maMaxOutSize );
947 
948  mpFloatWin = pWin;
949 
950  if ( bVisible )
952 
954  }
955  else
956  {
958 
959  // 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  tools::Long nWidth, tools::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:2782
Point TopLeft() const
void SetPos(const Point &rPoint)
bool IsInputEnabled() const
Definition: window2.cxx:1125
bool IsInPopupMode() const
Definition: floatwin.hxx:127
virtual void Move()
Definition: window.cxx:1825
WinBits const WB_NOSHADOW
ActivateModeFlags GetActivateMode() const
Definition: window2.cxx:1135
void StartPopupMode(const tools::Rectangle &rRect, FloatWinPopupFlags nFlags)
Definition: floatwin.cxx:776
VclPtr< vcl::Window > mpOldBorderWin
Definition: dockwin.hxx:85
bool IsFloating(const vcl::Window *pWin)
Definition: dockmgr.cxx:299
bool bVisible
WinBits const WB_SYSTEMWINDOW
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:833
tools::Long AdjustRight(tools::Long nHorzMoveDelta)
bool Docking(const Point &rPos, tools::Rectangle &rRect)
Definition: dockmgr.cxx:647
tools::Rectangle GetPosSizePixel(const vcl::Window *pWin)
Definition: dockmgr.cxx:410
SAL_DLLPRIVATE Point ImplOutputToFrame(const Point &rPos)
Definition: window2.cxx:935
Point AbsoluteScreenToOutputPixel(const Point &rPos) const
Definition: window.cxx:2853
void ExecuteCustomMenu(const tools::Rectangle &rRect=tools::Rectangle())
Definition: toolbox2.cxx:1583
VclPtr< vcl::Window > mpDockingWindow
Definition: dockwin.hxx:81
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:1663
void HideTracking()
Definition: window2.cxx:147
void ImplStartDocking(const Point &rPos)
Definition: dockmgr.cxx:501
virtual Size GetSizePixel() const
Definition: window.cxx:2393
bool mbFloating
Definition: dockwin.hxx:37
SAL_DLLPRIVATE vcl::Window * ImplGetFrameWindow() const
Definition: window2.cxx:899
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:401
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:1020
tools::Long GetWidth() const
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:985
void Lock(const vcl::Window *pWin)
Definition: dockmgr.cxx:314
FloatWinPopupFlags
Definition: vclenum.hxx:369
bool IsKeyEvent() const
Definition: toolbox.hxx:477
Size GetSizePixel() const
Definition: dockmgr.cxx:1015
void StartTracking(StartTrackingFlags nFlags=StartTrackingFlags::NONE)
Definition: window2.cxx:242
bool IsFloatingMode() const
Definition: dockmgr.cxx:1039
void Tracking(const TrackingEvent &rTEvt)
Definition: dockmgr.cxx:552
WinBits const WB_OWNERDRAWDECORATION
sal_Int64 WinBits
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible()
tools::Long Left() const
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:172
void ShowTitleButton(TitleButton nButton, bool bVisible)
Definition: dockmgr.cxx:747
ImplDockingWindowWrapper(const vcl::Window *pWindow)
Definition: dockmgr.cxx:462
tools::Long mnTrackHeight
Definition: dockwin.hxx:97
virtual void SetOutputSizePixel(const Size &rNewSize)
Definition: window2.cxx:1272
virtual OUString GetText() const
Definition: window.cxx:3046
tools::Long mnTrackY
Definition: dockwin.hxx:95
WinBits const WB_STDPOPUP
VclPtr< vcl::Window > mpParent
Definition: dockwin.hxx:86
tools::Long AdjustBottom(tools::Long nVertMoveDelta)
void EndDocking(const tools::Rectangle &rRect, bool bFloatMode)
Definition: dockmgr.cxx:656
#define MOUSE_LEFT
Definition: event.hxx:99
const Size & GetMinOutputSizePixel() const
Definition: syswin.hxx:178
constexpr OUStringLiteral aData
bool IsAlwaysOnTopEnabled() const
Definition: window2.cxx:1141
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:1048
void SetMinOutputSizePixel(const Size &rSize)
Definition: syswin.cxx:369
static bool AlwaysLocked()
Definition: toolbox2.cxx:1682
#define DOCKWIN_FLOATSTYLES
Definition: dockmgr.cxx:36
void SetMaxOutputSizePixel(const Size &rSize)
Definition: syswin.cxx:382
constexpr sal_uInt16 KEY_HOME
Definition: keycodes.hxx:114
ImplDockingWindowWrapper.
Definition: dockwin.hxx:72
tools::Rectangle maTrackRect
Definition: dockwin.hxx:36
void TitleButtonClick(TitleButton nButton)
Definition: dockmgr.cxx:723
void SetParent(vcl::Window *pNewParent)
Definition: stacking.cxx:831
ShowTrackFlags
Definition: window.hxx:275
void Lock(bool bLock)
Definition: toolbox2.cxx:1664
VclPtr< FloatingWindow > mpFloatWin
Definition: dockwin.hxx:84
tools::Long Width() const
std::unique_ptr< WindowImpl > mpWindowImpl
Definition: window.hxx:521
void AddWindow(const vcl::Window *pWin)
Definition: dockmgr.cxx:376
virtual void Resize()
Definition: window.cxx:1827
bool IsInPopupMode() const
Definition: dockmgr.cxx:876
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
tools::Long Top() const
Point ScreenToOutputPixel(const Point &rPos) const
Definition: window.cxx:2800
bool IsTitleButtonVisible(TitleButton nButton) const
Definition: syswin.cxx:361
vcl::Window * GetParent() const
Definition: window2.cxx:1095
tools::Long mnTrackX
Definition: dockwin.hxx:94
bool IsTrackingEnded() const
Definition: event.hxx:263
Size GetSize() const
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override
Definition: dockmgr.cxx:448
exports com.sun.star.chart2. data
virtual void SetPosSizePixel(const Point &rNewPos, const Size &rNewSize)
Definition: window2.cxx:1266
void SetFloatingMode(bool bFloatMode)
Definition: dockmgr.cxx:884
bool IsInPopupMode(const vcl::Window *pWin)
Definition: dockmgr.cxx:356
tools::Long AdjustTop(tools::Long nVertMoveDelta)
vcl::Window * GetWindow(GetWindowType nType) const
Definition: stacking.cxx:1035
bool PrepareToggleFloatingMode()
Definition: dockmgr.cxx:701
RegionData_Impl * mpParent
void setPosSizePixel(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags)
Definition: dockmgr.cxx:997
virtual void setPosSizePixel(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags=PosSizeFlags::All)
Definition: window.cxx:2657
virtual void KeyInput(const KeyEvent &rKEvt)
Definition: window.cxx:1797
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:2415
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:431
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:1100
void SetPosSizePixel(vcl::Window const *pWin, tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags)
Definition: dockmgr.cxx:401
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:639
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:940
tools::Long Height() const
bool IsLocked() const
Definition: dockwin.hxx:135
FloatingWindow * GetFloatingWindow() const
Definition: dockwin.hxx:158
tools::Long mnTrackWidth
Definition: dockwin.hxx:96
void SetFloatingMode(const vcl::Window *pWin, bool bFloating)
Definition: dockmgr.cxx:328
const Point & GetPosPixel() const
Definition: event.hxx:120
static sal_uInt64 GetSystemTicks()
void EndPopupMode(const vcl::Window *pWin)
Definition: dockmgr.cxx:362
virtual ~ImplPopupFloatWin() override
Definition: dockmgr.cxx:443
IMPL_LINK_NOARG(ImplDockFloatWin2, DockTimerHdl, Timer *, void)
Definition: dockmgr.cxx:114
tools::Long GetHeight() const
WindowType GetType() const
Definition: window2.cxx:972
bool IsAlwaysEnableInput() const
returns the current AlwaysEnableInput state
Definition: window2.cxx:1130
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:1120
void StartPopupMode(const vcl::Window *pWin, const tools::Rectangle &rRect, FloatWinPopupFlags nPopupModeFlags)
Definition: dockmgr.cxx:335
tools::Long AdjustLeft(tools::Long nHorzMoveDelta)
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:2794
#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:216
const MouseEvent & GetMouseEvent() const
Definition: event.hxx:259
virtual void Resizing(Size &rSize)
Definition: dockwin.cxx:637
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:805
WinBits const WB_POPUP
#define MOUSE_RIGHT
Definition: event.hxx:101
void EndPopupMode(FloatWinPopupEndFlags nFlags=FloatWinPopupEndFlags::NONE)
Definition: floatwin.cxx:949
virtual void SetPosPixel(const Point &rNewPos)
Definition: window2.cxx:1255
virtual void Resize() override
Definition: syswin.cxx:1006
AnyEventRef aEvent
void SetFloatStyle(WinBits nWinStyle)
Definition: dockmgr.cxx:991
void Resizing(Size &rSize)
Definition: dockmgr.cxx:739
TitleButton
Definition: syswin.hxx:55
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)
Definition: window.cxx:2179