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 
270 DockingManager::DockingManager()
271 {
272 }
273 
274 DockingManager::~DockingManager()
275 {
276 }
277 
278 ImplDockingWindowWrapper* DockingManager::GetDockingWindowWrapper( const vcl::Window *pWindow )
279 {
280  for( const auto& xWrapper : mvDockingWindows )
281  {
282  if( xWrapper->mpDockingWindow == pWindow )
283  return xWrapper.get();
284  }
285  return nullptr;
286 }
287 
288 bool DockingManager::IsDockable( const vcl::Window *pWindow )
289 {
290  ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
291 
292  /*
293  if( pWindow->HasDockingHandler() )
294  return true;
295  */
296  return (pWrapper != nullptr);
297 }
298 
299 bool DockingManager::IsFloating( const vcl::Window *pWindow )
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 
335 void DockingManager::StartPopupMode( const vcl::Window *pWindow, const tools::Rectangle& rRect, FloatWinPopupFlags nFlags )
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 
356 bool DockingManager::IsInPopupMode( const vcl::Window *pWindow )
357 {
358  ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
359  return pWrapper && pWrapper->IsInPopupMode();
360 }
361 
362 void DockingManager::EndPopupMode( const vcl::Window *pWin )
363 {
364  ImplDockingWindowWrapper *pWrapper = GetDockingWindowWrapper( pWin );
365  if( pWrapper && pWrapper->GetFloatingWindow() && pWrapper->GetFloatingWindow()->IsInPopupMode() )
366  pWrapper->GetFloatingWindow()->EndPopupMode();
367 }
368 
369 void DockingManager::AddWindow( const vcl::Window *pWindow )
370 {
371  ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
372  if( pWrapper )
373  return;
374  mvDockingWindows.emplace_back( new ImplDockingWindowWrapper( pWindow ) );
375 }
376 
377 void DockingManager::RemoveWindow( const vcl::Window *pWindow )
378 {
379  for( auto it = mvDockingWindows.begin(); it != mvDockingWindows.end(); ++it )
380  {
381  if( (*it)->mpDockingWindow == pWindow )
382  {
383  mvDockingWindows.erase( it );
384  break;
385  }
386  }
387 }
388 
389 void DockingManager::SetPosSizePixel( vcl::Window const *pWindow, long nX, long nY,
390  long nWidth, long nHeight,
391  PosSizeFlags nFlags )
392 {
393  ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
394  if( pWrapper )
395  pWrapper->setPosSizePixel( nX, nY, nWidth, nHeight, nFlags );
396 }
397 
398 tools::Rectangle DockingManager::GetPosSizePixel( const vcl::Window *pWindow )
399 {
400  tools::Rectangle aRect;
401  ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
402  if( pWrapper )
403  aRect = tools::Rectangle( pWrapper->GetPosPixel(), pWrapper->GetSizePixel() );
404 
405  return aRect;
406 }
407 
409 {
410 private:
411  bool mbToolBox;
412 
413 public:
414  ImplPopupFloatWin( vcl::Window* pParent, bool bToolBox );
415  virtual ~ImplPopupFloatWin() override;
416  virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override;
417 };
418 
421  mbToolBox( bToolBox )
422 {
423  if ( bToolBox )
424  {
425  // indicate window type, required for accessibility
426  // which should not see this window as a toplevel window
427  mpWindowImpl->mbToolbarFloatingWindow = true;
428  }
429 }
430 
432 {
433  disposeOnce();
434 }
435 
436 css::uno::Reference< css::accessibility::XAccessible > ImplPopupFloatWin::CreateAccessible()
437 {
438  if ( !mbToolBox )
440 
441  // switch off direct accessibility support for this window
442 
443  // this is to avoid appearance of this window as standalone window in the accessibility hierarchy
444  // as this window is only used as a helper for subtoolbars that are not teared-off, the parent toolbar
445  // has to provide accessibility support (as implemented in the toolkit)
446  // so the contained toolbar should appear as child of the corresponding toolbar item of the parent toolbar
447  return css::uno::Reference< css::accessibility::XAccessible >();
448 }
449 
451  : mpDockingWindow(const_cast<vcl::Window*>(pWindow))
452  , mpFloatWin(nullptr)
453  , mpOldBorderWin(nullptr)
454  , mpParent(pWindow->GetParent())
455  , maMaxOutSize( SHRT_MAX, SHRT_MAX )
456  , mnTrackX(0)
457  , mnTrackY(0)
458  , mnTrackWidth(0)
459  , mnTrackHeight(0)
460  , mnDockLeft(0)
461  , mnDockTop(0)
462  , mnDockRight(0)
463  , mnDockBottom(0)
464  , mnFloatBits(WB_BORDER | WB_CLOSEABLE | WB_SIZEABLE | (pWindow->GetStyle() & DOCKWIN_FLOATSTYLES))
465  , mbDockCanceled(false)
466  , mbDocking(false)
467  , mbLastFloatMode(false)
468  , mbRollUp(false)
469  , mbDockBtn(false)
470  , mbHideBtn(false)
471  // must be enabled in Window::Notify to prevent permanent docking during mouse move
472  , mbStartDockingEnabled(false)
473  , mbLocked(false)
474 {
475  DockingWindow *pDockWin = dynamic_cast< DockingWindow* > ( mpDockingWindow.get() );
476  if( pDockWin )
477  mnFloatBits = pDockWin->GetFloatStyle();
478 }
479 
481 {
482  if ( IsFloatingMode() )
483  {
485  SetFloatingMode(false);
486  }
487 }
488 
490 {
491  if( !mbStartDockingEnabled )
492  return;
493 
494  maMouseOff = rPos;
495  mbDocking = true;
497 
498  // calculate FloatingBorder
500  if ( mpFloatWin )
501  pWin = mpFloatWin;
502  else
505  if ( !mpFloatWin )
506  pWin.disposeAndClear();
507 
508  Point aPos = GetWindow()->ImplOutputToFrame( Point() );
509  Size aSize = GetWindow()->GetOutputSizePixel();
510  mnTrackX = aPos.X();
511  mnTrackY = aPos.Y();
512  mnTrackWidth = aSize.Width();
513  mnTrackHeight = aSize.Height();
514 
515  if ( mbLastFloatMode )
516  {
517  maMouseOff.AdjustX(mnDockLeft );
518  maMouseOff.AdjustY(mnDockTop );
519  mnTrackX -= mnDockLeft;
520  mnTrackY -= mnDockTop;
523  }
524 
525  vcl::Window *pDockingArea = GetWindow()->GetParent();
526  vcl::Window::PointerState aState = pDockingArea->GetPointerState();
527 
528  // mouse pos in screen pixels
529  Point aMousePos = pDockingArea->OutputToScreenPixel( aState.maPos );
530  Point aDockPos = pDockingArea->AbsoluteScreenToOutputPixel( GetWindow()->OutputToAbsoluteScreenPixel( GetWindow()->GetPosPixel() ) );
531  tools::Rectangle aDockRect( aDockPos, GetWindow()->GetSizePixel() );
532  StartDocking( aMousePos, aDockRect );
533 
536 
538 }
539 
541 {
542  // used during docking of a currently docked window
543  if ( mbDocking )
544  {
545  if ( rTEvt.IsTrackingEnded() )
546  {
547  mbDocking = false;
548  GetWindow()->HideTracking();
549  if ( rTEvt.IsTrackingCanceled() )
550  {
551  mbDockCanceled = true;
553  mbDockCanceled = false;
554  }
555  else
557  }
558  // Docking only upon non-synthetic MouseEvents
559  else if ( !rTEvt.GetMouseEvent().IsSynthetic() || rTEvt.GetMouseEvent().IsModifierChanged() )
560  {
561  Point aMousePos = rTEvt.GetMouseEvent().GetPosPixel();
562  Point aFrameMousePos = GetWindow()->ImplOutputToFrame( aMousePos );
564  if ( aFrameMousePos.X() < 0 )
565  aFrameMousePos.setX( 0 );
566  if ( aFrameMousePos.Y() < 0 )
567  aFrameMousePos.setY( 0 );
568  if ( aFrameMousePos.X() > aFrameSize.Width()-1 )
569  aFrameMousePos.setX( aFrameSize.Width()-1 );
570  if ( aFrameMousePos.Y() > aFrameSize.Height()-1 )
571  aFrameMousePos.setY( aFrameSize.Height()-1 );
572  aMousePos = GetWindow()->ImplFrameToOutput( aFrameMousePos );
573  aMousePos.AdjustX( -(maMouseOff.X()) );
574  aMousePos.AdjustY( -(maMouseOff.Y()) );
575  Point aPos = GetWindow()->ImplOutputToFrame( aMousePos );
576  tools::Rectangle aTrackRect( aPos, Size( mnTrackWidth, mnTrackHeight ) );
577  tools::Rectangle aCompRect = aTrackRect;
578  aPos.AdjustX(maMouseOff.X() );
579  aPos.AdjustY(maMouseOff.Y() );
580 
581  bool bFloatMode = Docking( aPos, aTrackRect );
582 
583  if ( mbLastFloatMode != bFloatMode )
584  {
585  if ( bFloatMode )
586  {
587  aTrackRect.AdjustLeft( -mnDockLeft );
588  aTrackRect.AdjustTop( -mnDockTop );
589  aTrackRect.AdjustRight(mnDockRight );
590  aTrackRect.AdjustBottom(mnDockBottom );
591  }
592  else
593  {
594  if ( aCompRect == aTrackRect )
595  {
596  aTrackRect.AdjustLeft(mnDockLeft );
597  aTrackRect.AdjustTop(mnDockTop );
598  aTrackRect.AdjustRight( -mnDockRight );
599  aTrackRect.AdjustBottom( -mnDockBottom );
600  }
601  }
602  mbLastFloatMode = bFloatMode;
603  }
604 
605  ShowTrackFlags nTrackStyle;
606  if ( bFloatMode )
607  nTrackStyle = ShowTrackFlags::Object;
608  else
609  nTrackStyle = ShowTrackFlags::Big;
610  tools::Rectangle aShowTrackRect = aTrackRect;
611  aShowTrackRect.SetPos( GetWindow()->ImplFrameToOutput( aShowTrackRect.TopLeft() ) );
612 
613  GetWindow()->ShowTracking( aShowTrackRect, nTrackStyle );
614 
615  // calculate mouse offset again, as the rectangle was changed
616  maMouseOff.setX( aPos.X() - aTrackRect.Left() );
617  maMouseOff.setY( aPos.Y() - aTrackRect.Top() );
618 
619  mnTrackX = aTrackRect.Left();
620  mnTrackY = aTrackRect.Top();
621  mnTrackWidth = aTrackRect.GetWidth();
622  mnTrackHeight = aTrackRect.GetHeight();
623  }
624  }
625 }
626 
627 void ImplDockingWindowWrapper::StartDocking( const Point& rPoint, tools::Rectangle const & rRect )
628 {
629  DockingData data( rPoint, rRect, IsFloatingMode() );
630 
632  mbDocking = true;
633 }
634 
635 bool ImplDockingWindowWrapper::Docking( const Point& rPoint, tools::Rectangle& rRect )
636 {
637  DockingData data( rPoint, rRect, IsFloatingMode() );
638 
640  rRect = data.maTrackRect;
641  return data.mbFloating;
642 }
643 
644 void ImplDockingWindowWrapper::EndDocking( const tools::Rectangle& rRect, bool bFloatMode )
645 {
646  tools::Rectangle aRect( rRect );
647 
648  bool bOrigDockCanceled = mbDockCanceled;
649  if (bFloatMode && !StyleSettings::GetDockingFloatsSupported())
650  mbDockCanceled = true;
651 
652  if ( !IsDockingCanceled() )
653  {
654  bool bShow = false;
655  if ( bFloatMode != IsFloatingMode() )
656  {
658  SetFloatingMode( bFloatMode );
659  bShow = true;
660  if ( bFloatMode )
661  {
662  // #i44800# always use outputsize - as in all other places
664  mpFloatWin->SetPosPixel( aRect.TopLeft() );
665  }
666  }
667  if ( !bFloatMode )
668  {
669  Point aPos = aRect.TopLeft();
670  aPos = GetWindow()->GetParent()->ScreenToOutputPixel( aPos );
671  GetWindow()->SetPosSizePixel( aPos, aRect.GetSize() );
672  }
673 
674  if ( bShow )
676  }
677 
678  EndDockingData data( aRect, IsFloatingMode(), IsDockingCanceled() );
680 
681  mbDocking = false;
682 
683  // must be enabled in Window::Notify to prevent permanent docking during mouse move
684  mbStartDockingEnabled = false;
685 
686  mbDockCanceled = bOrigDockCanceled;
687 }
688 
690 {
691  bool bFloating = true;
693  return bFloating;
694 }
695 
697 {
698  // notify dockingwindow/toolbox
699  // note: this must be done *before* notifying the
700  // listeners to have the toolbox in the proper state
701  if( GetWindow()->IsDockingWindow() )
702  static_cast<DockingWindow*>(GetWindow())->ToggleFloatingMode();
703 
704  // now notify listeners
706 
707  // must be enabled in Window::Notify to prevent permanent docking during mouse move
708  mbStartDockingEnabled = false;
709 }
710 
712 {
713  if( nType == TitleButton::Menu )
714  {
715  ToolBox *pToolBox = dynamic_cast< ToolBox* >( GetWindow() );
716  if( pToolBox )
717  {
718  pToolBox->ExecuteCustomMenu();
719  }
720  }
721  if( nType == TitleButton::Docking )
722  {
724  }
725 }
726 
728 {
729  // TODO: add virtual Resizing() to class Window, so we can get rid of class DockingWindow
730  DockingWindow *pDockingWindow = dynamic_cast< DockingWindow* >( GetWindow() );
731  if( pDockingWindow )
732  pDockingWindow->Resizing( rSize );
733 }
734 
736 {
737  if ( mpFloatWin )
738  mpFloatWin->ShowTitleButton( nButton, bVisible );
739  else
740  {
741  if ( nButton == TitleButton::Docking )
742  mbDockBtn = bVisible;
743  else // if ( nButton == TitleButton::Hide )
744  mbHideBtn = bVisible;
745  }
746 }
747 
749 {
751 
752  // prepare reparenting
755  if( mpOldBorderWin.get() == GetWindow() )
756  mpOldBorderWin = nullptr; // no border window found
757 
758  // the new parent for popup mode
759  VclPtrInstance<ImplPopupFloatWin> pWin( mpParent, GetWindow()->GetType() == WindowType::TOOLBOX );
760  pWin->SetPopupModeEndHdl( LINK( this, ImplDockingWindowWrapper, PopupModeEnd ) );
761 
762  // At least for DockingWindow, GetText() has a side effect of setting deferred
763  // properties. This must be done before setting the border window (see below),
764  // so that the border width will end up in mpWindowImpl->mnBorderWidth, not in
765  // the border window (See DockingWindow::setPosSizeOnContainee() and
766  // DockingWindow::GetOptimalSize()).
767  pWin->SetText( GetWindow()->GetText() );
769 
770  GetWindow()->mpWindowImpl->mpBorderWindow = nullptr;
771  GetWindow()->mpWindowImpl->mnLeftBorder = 0;
772  GetWindow()->mpWindowImpl->mnTopBorder = 0;
773  GetWindow()->mpWindowImpl->mnRightBorder = 0;
774  GetWindow()->mpWindowImpl->mnBottomBorder = 0;
775 
776  // reparent borderwindow and window
777  if ( mpOldBorderWin )
778  mpOldBorderWin->SetParent( pWin );
779  GetWindow()->SetParent( pWin );
780 
781  // correct border window pointers
782  GetWindow()->mpWindowImpl->mpBorderWindow = pWin;
783  pWin->mpWindowImpl->mpClientWindow = GetWindow();
784  GetWindow()->mpWindowImpl->mpRealParent = pRealParent;
785 
786  // set mpFloatWin not until all window positioning is done !!!
787  // (SetPosPixel etc. check for valid mpFloatWin pointer)
788  mpFloatWin = pWin;
789 }
790 
792 {
793  // do nothing if window is floating
794  if( IsFloatingMode() )
795  return;
796 
798 
799  // don't allow tearoff, if globally disabled
801  ( GetWindow()->GetType() == WindowType::TOOLBOX && ToolBox::AlwaysLocked() ) )
803 
804  // if the subtoolbar was opened via keyboard make sure that key events
805  // will go into subtoolbar
806  if( pParentToolBox->IsKeyEvent() )
808 
809  mpFloatWin->StartPopupMode( pParentToolBox, nFlags );
810  GetWindow()->Show();
811 
812  if( pParentToolBox->IsKeyEvent() )
813  {
814  // send HOME key to subtoolbar in order to select first item
816  GetWindow()->KeyInput(aEvent);
817  }
818 }
819 
821 {
822  // do nothing if window is floating
823  if( IsFloatingMode() )
824  return;
825 
827  mpFloatWin->StartPopupMode( rRect, nFlags );
828  GetWindow()->Show();
829 }
830 
832 {
833  GetWindow()->Show( false, ShowFlags::NoFocusChange );
834 
835  // set parameter for handler before destroying floating window
836  EndPopupModeData aData( mpFloatWin->GetWindow( GetWindowType::Border )->GetPosPixel(), mpFloatWin->IsPopupModeTearOff() );
837 
838  // before deleting change parent back, so we can delete the floating window alone
839  vcl::Window* pRealParent = GetWindow()->GetWindow( GetWindowType::Parent );
840  GetWindow()->mpWindowImpl->mpBorderWindow = nullptr;
841  if ( mpOldBorderWin )
842  {
843  GetWindow()->SetParent( mpOldBorderWin );
844  static_cast<ImplBorderWindow*>(mpOldBorderWin.get())->GetBorder(
845  GetWindow()->mpWindowImpl->mnLeftBorder, GetWindow()->mpWindowImpl->mnTopBorder,
846  GetWindow()->mpWindowImpl->mnRightBorder, GetWindow()->mpWindowImpl->mnBottomBorder );
847  mpOldBorderWin->Resize();
848  }
849  GetWindow()->mpWindowImpl->mpBorderWindow = mpOldBorderWin;
850  GetWindow()->SetParent( pRealParent );
851  GetWindow()->mpWindowImpl->mpRealParent = pRealParent;
852 
853  mpFloatWin.disposeAndClear();
854 
855  // call handler - which will destroy the window and thus the wrapper as well !
856  GetWindow()->CallEventListeners( VclEventId::WindowEndPopupMode, &aData );
857 }
858 
860 {
861  if( GetFloatingWindow() )
862  return GetFloatingWindow()->IsInPopupMode();
863  else
864  return false;
865 }
866 
868 {
869  // do nothing if window is docked and locked
870  if( !IsFloatingMode() && IsLocked() )
871  return;
872 
873  if ( IsFloatingMode() != bFloatMode )
874  {
876  {
877  bool bVisible = GetWindow()->IsVisible();
878 
879  if ( bFloatMode )
880  {
882 
884 
888  mpOldBorderWin = nullptr; // no border window found
889 
891  mpParent,
895  : mnFloatBits,
896  this );
897 
898  // At least for DockingWindow, GetText() has a side effect of setting deferred
899  // properties. This must be done before setting the border window (see below),
900  // so that the border width will end up in mpWindowImpl->mnBorderWidth, not in
901  // the border window (See DockingWindow::setPosSizeOnContainee() and
902  // DockingWindow::GetOptimalSize()).
903  pWin->SetText( GetWindow()->GetText() );
904 
905  GetWindow()->mpWindowImpl->mpBorderWindow = nullptr;
906  GetWindow()->mpWindowImpl->mnLeftBorder = 0;
907  GetWindow()->mpWindowImpl->mnTopBorder = 0;
908  GetWindow()->mpWindowImpl->mnRightBorder = 0;
909  GetWindow()->mpWindowImpl->mnBottomBorder = 0;
910 
911  // if the parent gets destroyed, we also have to reset the parent of the BorderWindow
912  if ( mpOldBorderWin )
913  mpOldBorderWin->SetParent( pWin );
914  GetWindow()->SetParent( pWin );
915  pWin->SetPosPixel( Point() );
916 
917  GetWindow()->mpWindowImpl->mpBorderWindow = pWin;
918  pWin->mpWindowImpl->mpClientWindow = mpDockingWindow;
919  GetWindow()->mpWindowImpl->mpRealParent = pRealParent;
920 
921  pWin->SetOutputSizePixel( GetWindow()->GetSizePixel() );
922  pWin->SetPosPixel( maFloatPos );
923  // pass on DockingData to FloatingWindow
924  pWin->ShowTitleButton( TitleButton::Docking, mbDockBtn );
925  pWin->ShowTitleButton( TitleButton::Hide, mbHideBtn );
926  if ( mbRollUp )
927  pWin->RollUp();
928  else
929  pWin->RollDown();
930  pWin->SetRollUpOutputSizePixel( maRollUpOutSize );
931  pWin->SetMinOutputSizePixel( maMinOutSize );
932  pWin->SetMaxOutputSizePixel( maMaxOutSize );
933 
934  mpFloatWin = pWin;
935 
936  if ( bVisible )
938 
940  }
941  else
942  {
944 
945  // store FloatingData in FloatingWindow
953 
954  vcl::Window* pRealParent = GetWindow()->GetWindow( GetWindowType::Parent ); //mpWindowImpl->mpRealParent;
955  GetWindow()->mpWindowImpl->mpBorderWindow = nullptr;
956  if ( mpOldBorderWin )
957  {
959  static_cast<ImplBorderWindow*>(mpOldBorderWin.get())->GetBorder(
960  GetWindow()->mpWindowImpl->mnLeftBorder, GetWindow()->mpWindowImpl->mnTopBorder,
961  GetWindow()->mpWindowImpl->mnRightBorder, GetWindow()->mpWindowImpl->mnBottomBorder );
963  }
964  GetWindow()->mpWindowImpl->mpBorderWindow = mpOldBorderWin;
965  GetWindow()->SetParent( pRealParent );
966  GetWindow()->mpWindowImpl->mpRealParent = pRealParent;
967 
970 
971  if ( bVisible )
972  GetWindow()->Show();
973 
975 
976  }
977  }
978  }
979 }
980 
982 {
983  mnFloatBits = nStyle;
984 }
985 
986 
988  long nWidth, long nHeight,
989  PosSizeFlags nFlags )
990 {
991  if ( mpFloatWin )
992  mpFloatWin->setPosSizePixel( nX, nY, nWidth, nHeight, nFlags );
993  else
994  GetWindow()->setPosSizePixel( nX, nY, nWidth, nHeight, nFlags );
995 }
996 
998 {
999  if ( mpFloatWin )
1000  return mpFloatWin->GetPosPixel();
1001  else
1002  return mpDockingWindow->GetPosPixel();
1003 }
1004 
1006 {
1007  if ( mpFloatWin )
1008  return mpFloatWin->GetSizePixel();
1009  else
1010  return mpDockingWindow->GetSizePixel();
1011 }
1012 
1013 // old inlines from DockingWindow
1014 
1016 {
1017  if ( mpFloatWin )
1019  maMinOutSize = rSize;
1020 }
1021 
1023 {
1024  if ( mpFloatWin )
1026  maMaxOutSize = rSize;
1027 }
1028 
1030 {
1031  return (mpFloatWin != nullptr);
1032 }
1033 
1035 {
1036  maDragArea = rRect;
1037 }
1038 
1039 
1041 {
1042  mbLocked = true;
1043  // only toolbars support locking
1044  ToolBox *pToolBox = dynamic_cast< ToolBox * >( GetWindow() );
1045  if( pToolBox )
1046  pToolBox->Lock( mbLocked );
1047 }
1048 
1050 {
1051  mbLocked = false;
1052  // only toolbars support locking
1053  ToolBox *pToolBox = dynamic_cast< ToolBox * >( GetWindow() );
1054  if( pToolBox )
1055  pToolBox->Lock( mbLocked );
1056 }
1057 
1058 
1059 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual Point GetPosPixel() const
Definition: window.cxx:2857
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:1847
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:731
VclPtr< vcl::Window > mpOldBorderWin
Definition: dockwin.hxx:84
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 StartPopupMode(const tools::Rectangle &rRect, FloatWinPopupFlags nPopupModeFlags)
Definition: dockmgr.cxx:820
bool Docking(const Point &rPos, tools::Rectangle &rRect)
Definition: dockmgr.cxx:635
const char aData[]
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:2928
void ExecuteCustomMenu(const tools::Rectangle &rRect=tools::Rectangle())
Definition: toolbox2.cxx:1600
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:1735
void HideTracking()
Definition: window2.cxx:147
void ImplStartDocking(const Point &rPos)
Definition: dockmgr.cxx:489
virtual Size GetSizePixel() const
Definition: window.cxx:2415
bool mbFloating
Definition: dockwin.hxx:36
SAL_DLLPRIVATE vcl::Window * ImplGetFrameWindow() const
Definition: window2.cxx:901
bool IsDockingCanceled() const
Definition: dockwin.hxx:152
void ShowTitleButton(TitleButton nButton, bool bVisible)
Definition: syswin.cxx:332
Point GetPosPixel() const
Definition: dockmgr.cxx:997
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:1006
PosSizeFlags
Definition: window.hxx:141
virtual void Resizing(Size &rSize)
Definition: syswin.cxx:295
void SetMinOutputSizePixel(const Size &rSize)
Definition: dockmgr.cxx:1015
SAL_DLLPRIVATE void ImplUpdateAll()
Definition: paint.cxx:985
bool IsKeyEvent() const
Definition: toolbox.hxx:484
Size GetSizePixel() const
Definition: dockmgr.cxx:1005
void StartTracking(StartTrackingFlags nFlags=StartTrackingFlags::NONE)
Definition: window2.cxx:244
bool IsFloatingMode() const
Definition: dockmgr.cxx:1029
void Tracking(const TrackingEvent &rTEvt)
Definition: dockmgr.cxx:540
long AdjustBottom(long nVertMoveDelta)
virtual void setPosSizePixel(long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags=PosSizeFlags::All)
Definition: window.cxx:2732
WinBits const WB_OWNERDRAWDECORATION
sal_Int64 WinBits
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible()
tools::Rectangle maDragArea
Definition: dockwin.hxx:92
void ShowTracking(const tools::Rectangle &rRect, ShowTrackFlags nFlags=ShowTrackFlags::Small)
Definition: window2.cxx:124
void ShowTitleButton(TitleButton nButton, bool bVisible)
Definition: dockmgr.cxx:735
ImplDockingWindowWrapper(const vcl::Window *pWindow)
Definition: dockmgr.cxx:450
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:644
#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:1034
vcl::Window * GetWindow()
Definition: dockwin.hxx:120
static void RemoveUserEvent(ImplSVEvent *nUserEvent)
Remove user event based on event ID.
Definition: svapp.cxx:1034
void SetMinOutputSizePixel(const Size &rSize)
Definition: syswin.cxx:397
static bool AlwaysLocked()
Definition: toolbox2.cxx:1699
#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:711
void SetParent(vcl::Window *pNewParent)
Definition: stacking.cxx:842
ShowTrackFlags
Definition: window.hxx:269
void Lock(bool bLock)
Definition: toolbox2.cxx:1681
VclPtr< FloatingWindow > mpFloatWin
Definition: dockwin.hxx:83
std::unique_ptr< WindowImpl > mpWindowImpl
Definition: window.hxx:511
virtual void Resize()
Definition: window.cxx:1849
bool IsInPopupMode() const
Definition: dockmgr.cxx:859
const AllSettings & GetSettings() const
Definition: outdev.hxx:420
Size GetOutputSizePixel() const
Definition: outdev.hxx:441
Point ScreenToOutputPixel(const Point &rPos) const
Definition: window.cxx:2875
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:267
Size GetSize() const
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override
Definition: dockmgr.cxx:436
virtual void SetPosSizePixel(const Point &rNewPos, const Size &rNewSize)
Definition: window2.cxx:1268
void SetFloatingMode(bool bFloatMode)
Definition: dockmgr.cxx:867
vcl::Window * GetWindow(GetWindowType nType) const
Definition: stacking.cxx:1046
bool PrepareToggleFloatingMode()
Definition: dockmgr.cxx:689
RegionData_Impl * mpParent
virtual void KeyInput(const KeyEvent &rKEvt)
Definition: window.cxx:1819
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:2437
A construction helper for a temporary VclPtr.
Definition: vclptr.hxx:275
ImplPopupFloatWin(vcl::Window *pParent, bool bToolBox)
Definition: dockmgr.cxx:419
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:1022
WinBits const WB_BORDER
bool IsVisible() const
Definition: window2.cxx:1102
void StartDocking(const Point &rPos, tools::Rectangle const &rRect)
Definition: dockmgr.cxx:627
virtual void SetText(const OUString &rStr) override
Definition: syswin.cxx:1103
static VclPtr< reference_type > Create(Arg &&...arg)
A construction helper for VclPtr.
Definition: vclptr.hxx:127
SAL_DLLPRIVATE Point ImplFrameToOutput(const Point &rPos)
Definition: window2.cxx:942
bool IsLocked() const
Definition: dockwin.hxx:135
long AdjustTop(long nVertMoveDelta)
FloatingWindow * GetFloatingWindow() const
Definition: dockwin.hxx:156
const Point & GetPosPixel() const
Definition: event.hxx:120
void setPosSizePixel(long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags)
Definition: dockmgr.cxx:987
static sal_uInt64 GetSystemTicks()
long Left() const
virtual ~ImplPopupFloatWin() override
Definition: dockmgr.cxx:431
IMPL_LINK_NOARG(ImplDockFloatWin2, DockTimerHdl, Timer *, void)
Definition: dockmgr.cxx:114
bool IsAlwaysEnableInput() const
returns the current AlwaysEnableInput state
Definition: window2.cxx:1132
reference_type * get() const
Get the body.
Definition: vclptr.hxx:143
bool IsEnabled() const
Definition: window2.cxx:1122
bool IsTrackingCanceled() const
Definition: event.hxx:269
virtual void TitleButtonClick(TitleButton nButton)
Definition: syswin.cxx:291
Definition: timer.hxx:26
Point OutputToScreenPixel(const Point &rPos) const
Definition: window.cxx:2869
#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:213
const MouseEvent & GetMouseEvent() const
Definition: event.hxx:263
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:203
PointerState GetPointerState()
Definition: mouse.cxx:587
WinBits GetFloatStyle() const
Definition: dockwin.cxx:813
WinBits const WB_POPUP
#define MOUSE_RIGHT
Definition: event.hxx:101
void EndPopupMode(FloatWinPopupEndFlags nFlags=FloatWinPopupEndFlags::NONE)
Definition: floatwin.cxx:905
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:981
void Resizing(Size &rSize)
Definition: dockmgr.cxx:727
TitleButton
Definition: syswin.hxx:52
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)
Definition: window.cxx:2201