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