LibreOffice Module vcl (master)  1
dockwin.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 <vcl/accel.hxx>
23 #include <vcl/event.hxx>
24 #include <vcl/floatwin.hxx>
25 #include <vcl/dockwin.hxx>
26 #include <vcl/layout.hxx>
27 #include <vcl/svapp.hxx>
28 #include <vcl/timer.hxx>
29 #include <vcl/idle.hxx>
30 #include <vcl/settings.hxx>
31 
32 #include <svdata.hxx>
33 #include <window.h>
34 #include <brdwin.hxx>
35 
36 #define DOCKWIN_FLOATSTYLES (WB_SIZEABLE | WB_MOVEABLE | WB_CLOSEABLE | WB_STANDALONE | WB_ROLLABLE )
37 
39 {
40 public:
41  ImplData();
42 
45 };
46 
48 {
49  mpParent = nullptr;
50  maMaxOutSize = Size( SHRT_MAX, SHRT_MAX );
51 }
52 
53 namespace {
54 
55 class ImplDockFloatWin : public FloatingWindow
56 {
57 private:
58  VclPtr<DockingWindow> mpDockWin;
59  sal_uInt64 mnLastTicks;
60  Idle maDockIdle;
62  tools::Rectangle maDockRect;
63  bool mbInMove;
64  ImplSVEvent * mnLastUserEvent;
65 
66  DECL_LINK(DockingHdl, void *, void);
67  DECL_LINK(DockTimerHdl, Timer *, void);
68 public:
69  ImplDockFloatWin( vcl::Window* pParent, WinBits nWinBits,
70  DockingWindow* pDockingWin );
71  virtual ~ImplDockFloatWin() override;
72  virtual void dispose() override;
73 
74  virtual void Move() override;
75  virtual void Resize() override;
76  virtual void Resizing( Size& rSize ) override;
77  virtual bool Close() override;
78 };
79 
80 }
81 
82 ImplDockFloatWin::ImplDockFloatWin( vcl::Window* pParent, WinBits nWinBits,
83  DockingWindow* pDockingWin ) :
84  FloatingWindow( pParent, nWinBits ),
85  mpDockWin( pDockingWin ),
86  mnLastTicks( tools::Time::GetSystemTicks() ),
87  mbInMove( false ),
88  mnLastUserEvent( nullptr )
89 {
90  // copy settings of DockingWindow
91  if ( pDockingWin )
92  {
93  SetSettings( pDockingWin->GetSettings() );
94  Enable( pDockingWin->IsEnabled(), false );
95  EnableInput( pDockingWin->IsInputEnabled(), false );
96  AlwaysEnableInput( pDockingWin->IsAlwaysEnableInput(), false );
97  EnableAlwaysOnTop( pDockingWin->IsAlwaysOnTopEnabled() );
98  SetActivateMode( pDockingWin->GetActivateMode() );
99  }
100 
101  SetBackground();
102 
103  maDockIdle.SetInvokeHandler( LINK( this, ImplDockFloatWin, DockTimerHdl ) );
104  maDockIdle.SetPriority( TaskPriority::HIGH_IDLE );
105  maDockIdle.SetDebugName( "vcl::ImplDockFloatWin maDockIdle" );
106 }
107 
108 ImplDockFloatWin::~ImplDockFloatWin()
109 {
110  disposeOnce();
111 }
112 
113 void ImplDockFloatWin::dispose()
114 {
115  if( mnLastUserEvent )
116  Application::RemoveUserEvent( mnLastUserEvent );
117 
118  disposeBuilder();
119 
120  mpDockWin.clear();
122 }
123 
124 IMPL_LINK_NOARG(ImplDockFloatWin, DockTimerHdl, Timer *, void)
125 {
126  SAL_WARN_IF( !mpDockWin->IsFloatingMode(), "vcl", "docktimer called but not floating" );
127 
128  maDockIdle.Stop();
129  PointerState aState = GetPointerState();
130 
131  if( aState.mnState & KEY_MOD1 )
132  {
133  // i43499 CTRL disables docking now
134  mpDockWin->GetParent()->ImplGetFrameWindow()->HideTracking();
135  mpDockWin->EndDocking( maDockRect, true );
136  if( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) )
137  maDockIdle.Start();
138  }
139  else if( ! ( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) ) )
140  {
141  mpDockWin->GetParent()->ImplGetFrameWindow()->HideTracking();
142  mpDockWin->EndDocking( maDockRect, false );
143  }
144  else
145  {
146  mpDockWin->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, ShowTrackFlags::Big | ShowTrackFlags::TrackWindow );
147  maDockIdle.Start();
148  }
149 }
150 
151 IMPL_LINK_NOARG(ImplDockFloatWin, DockingHdl, void*, void)
152 {
153  PointerState aState = mpDockWin->GetParent()->GetPointerState();
154 
155  mnLastUserEvent = nullptr;
156  if( mpDockWin->IsDockable() &&
157  (tools::Time::GetSystemTicks() - mnLastTicks > 500) &&
158  ( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) ) &&
159  !(aState.mnState & KEY_MOD1) ) // i43499 CTRL disables docking now
160  {
161  maDockPos = mpDockWin->GetParent()->AbsoluteScreenToOutputPixel( OutputToAbsoluteScreenPixel( Point() ) );
162  maDockPos = mpDockWin->GetParent()->OutputToScreenPixel( maDockPos ); // sfx expects screen coordinates
163 
164  if( ! mpDockWin->IsDocking() )
165  mpDockWin->StartDocking();
166  maDockRect = tools::Rectangle( maDockPos, mpDockWin->GetSizePixel() );
167 
168  // mouse pos also in screen pixels
169  Point aMousePos = mpDockWin->GetParent()->OutputToScreenPixel( aState.maPos );
170 
171  bool bFloatMode = mpDockWin->Docking( aMousePos, maDockRect );
172  if( ! bFloatMode )
173  {
174  mpDockWin->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, ShowTrackFlags::Object | ShowTrackFlags::TrackWindow );
175  DockTimerHdl( nullptr );
176  }
177  else
178  {
179  mpDockWin->GetParent()->ImplGetFrameWindow()->HideTracking();
180  maDockIdle.Stop();
181  mpDockWin->EndDocking( maDockRect, true );
182  }
183  }
184  mbInMove = false;
185 }
186 
187 void ImplDockFloatWin::Move()
188 {
189  if( mbInMove )
190  return;
191 
192  mbInMove = true;
194  mpDockWin->Move();
195 
196  /*
197  * note: the window should only dock if
198  * the user releases all mouse buttons. The real problem here
199  * is that we don't get mouse events (at least not on X)
200  * if the mouse is on the decoration. So we have to start an
201  * awkward timer based process that polls the modifier/buttons
202  * to see whether they are in the right condition shortly after the
203  * last Move message.
204  */
205  if( ! mnLastUserEvent )
206  mnLastUserEvent = Application::PostUserEvent( LINK( this, ImplDockFloatWin, DockingHdl ), nullptr, true );
207 }
208 
209 void ImplDockFloatWin::Resize()
210 {
212  Size aSize( GetSizePixel() );
213  mpDockWin->ImplPosSizeWindow( 0, 0, aSize.Width(), aSize.Height(), PosSizeFlags::PosSize );
214 }
215 
216 void ImplDockFloatWin::Resizing( Size& rSize )
217 {
218  FloatingWindow::Resizing( rSize );
219  mpDockWin->Resizing( rSize );
220 }
221 
222 bool ImplDockFloatWin::Close()
223 {
224  return mpDockWin->Close();
225 }
226 
227 void DockingWindow::ImplStartDocking( const Point& rPos )
228 {
229  if ( !mbDockable )
230  return;
231 
232  maMouseOff = rPos;
233  mbDocking = true;
236 
237  // calculate FloatingBorder
239  if ( mpFloatWin )
240  pWin = mpFloatWin;
241  else
242  pWin = VclPtr<ImplDockFloatWin>::Create( mpImplData->mpParent, mnFloatBits, nullptr );
244  if ( !mpFloatWin )
245  pWin.disposeAndClear();
246 
247  Point aPos = ImplOutputToFrame( Point() );
248  Size aSize = Window::GetOutputSizePixel();
249  mnTrackX = aPos.X();
250  mnTrackY = aPos.Y();
251  mnTrackWidth = aSize.Width();
252  mnTrackHeight = aSize.Height();
253 
254  if ( mbLastFloatMode )
255  {
256  maMouseOff.AdjustX(mnDockLeft );
257  maMouseOff.AdjustY(mnDockTop );
258  mnTrackX -= mnDockLeft;
259  mnTrackY -= mnDockTop;
262  }
263 
264  if ( GetSettings().GetStyleSettings().GetDragFullOptions() & DragFullOptions::Docking &&
265  !( mnFloatBits & ( WB_MOVEABLE | WB_SIZEABLE | WB_CLOSEABLE ) ) ) // no full drag when migrating to system window
266  mbDragFull = true;
267  else
268  {
269  StartDocking();
270  mbDragFull = false;
271  ImplUpdateAll();
273  }
274 
276 }
277 
279 {
280  mpWindowImpl->mbDockWin = true;
281  mpFloatWin = nullptr;
282  mpOldBorderWin = nullptr;
283  mpImplData.reset(new ImplData);
284  mnTrackX = 0;
285  mnTrackY = 0;
286  mnTrackWidth = 0;
287  mnTrackHeight = 0;
288  mnDockLeft = 0;
289  mnDockTop = 0;
290  mnDockRight = 0;
291  mnDockBottom = 0;
292  mnFloatBits = 0;
293  mbDockCanceled = false;
294  mbDockable = false;
295  mbDocking = false;
296  mbDragFull = false;
297  mbLastFloatMode = false;
298  mbStartFloat = false;
299  mbRollUp = false;
300  mbDockBtn = false;
301  mbHideBtn = false;
302  mbIsDeferredInit = false;
304  mpDialogParent = nullptr;
305 
306  //To-Do, reuse maResizeTimer
308  maLayoutIdle.SetInvokeHandler( LINK( this, DockingWindow, ImplHandleLayoutTimerHdl ) );
309  maLayoutIdle.SetDebugName( "vcl::DockingWindow maLayoutIdle" );
310 }
311 
313 {
314  if ( !(nStyle & WB_NODIALOGCONTROL) )
315  nStyle |= WB_DIALOGCONTROL;
316 
317  mpImplData->mpParent = pParent;
318  mbDockable = (nStyle & WB_DOCKABLE) != 0;
320  nStyle &= ~(DOCKWIN_FLOATSTYLES | WB_BORDER);
321 
322  Window::ImplInit( pParent, nStyle, nullptr );
323 
325 }
326 
328 {
329  // Hack: to be able to build DockingWindows w/o background before switching
330  // TODO: Hack
331  if ( IsBackground() )
332  {
333  const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
334 
335  Color aColor;
336  if ( IsControlBackground() )
337  aColor = GetControlBackground();
338  else if ( Window::GetStyle() & WB_3DLOOK )
339  aColor = rStyleSettings.GetFaceColor();
340  else
341  aColor = rStyleSettings.GetWindowColor();
342  SetBackground( aColor );
343  }
344 }
345 
347  Window(nType)
348 {
350 }
351 
354 {
356  ImplInit( pParent, nStyle );
357 }
358 
359 //Find the real parent stashed in mpDialogParent.
361 {
362  vcl::Window *pParent = mpDialogParent;
363  mpDialogParent = nullptr;
364  ImplInit(pParent, nBits);
365  mbIsDeferredInit = false;
366 }
367 
368 void DockingWindow::loadUI(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription,
369  const css::uno::Reference<css::frame::XFrame> &rFrame)
370 {
371  mbIsDeferredInit = true;
372  mpDialogParent = pParent; //should be unset in doDeferredInit
373  m_pUIBuilder.reset( new VclBuilder(this, getUIRootDir(), rUIXMLDescription, rID, rFrame) );
374 }
375 
376 DockingWindow::DockingWindow(vcl::Window* pParent, const OString& rID,
377  const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame> &rFrame)
379 {
381 
382  loadUI(pParent, rID, rUIXMLDescription, rFrame);
383 }
384 
386 {
387  disposeOnce();
388 }
389 
391 {
392  if ( IsFloatingMode() )
393  {
394  Show( false, ShowFlags::NoFocusChange );
395  SetFloatingMode(false);
396  }
397  mpImplData.reset();
398  mpFloatWin.clear();
401  disposeBuilder();
402  Window::dispose();
403 }
404 
406 {
407  if( GetDockingManager()->IsDockable( this ) ) // new docking interface
408  return Window::Tracking( rTEvt );
409 
410  if ( mbDocking )
411  {
412  if ( rTEvt.IsTrackingEnded() )
413  {
414  mbDocking = false;
415  if ( mbDragFull )
416  {
417  // reset old state on Cancel
418  if ( rTEvt.IsTrackingCanceled() )
419  {
420  StartDocking();
422  EndDocking( aRect, mbStartFloat );
423  }
424  }
425  else
426  {
427  HideTracking();
428  if ( rTEvt.IsTrackingCanceled() )
429  {
430  mbDockCanceled = true;
432  mbDockCanceled = false;
433  }
434  else
436  }
437  }
438  // dock only for non-synthetic MouseEvents
439  else if ( !rTEvt.GetMouseEvent().IsSynthetic() || rTEvt.GetMouseEvent().IsModifierChanged() )
440  {
441  Point aMousePos = rTEvt.GetMouseEvent().GetPosPixel();
442  Point aFrameMousePos = ImplOutputToFrame( aMousePos );
443  Size aFrameSize = mpWindowImpl->mpFrameWindow->GetOutputSizePixel();
444  if ( aFrameMousePos.X() < 0 )
445  aFrameMousePos.setX( 0 );
446  if ( aFrameMousePos.Y() < 0 )
447  aFrameMousePos.setY( 0 );
448  if ( aFrameMousePos.X() > aFrameSize.Width()-1 )
449  aFrameMousePos.setX( aFrameSize.Width()-1 );
450  if ( aFrameMousePos.Y() > aFrameSize.Height()-1 )
451  aFrameMousePos.setY( aFrameSize.Height()-1 );
452  aMousePos = ImplFrameToOutput( aFrameMousePos );
453  aMousePos.AdjustX( -(maMouseOff.X()) );
454  aMousePos.AdjustY( -(maMouseOff.Y()) );
455  Point aFramePos = ImplOutputToFrame( aMousePos );
456  tools::Rectangle aTrackRect( aFramePos, Size( mnTrackWidth, mnTrackHeight ) );
457  tools::Rectangle aCompRect = aTrackRect;
458  aFramePos.AdjustX(maMouseOff.X() );
459  aFramePos.AdjustY(maMouseOff.Y() );
460  if ( mbDragFull )
461  StartDocking();
462  bool bFloatMode = Docking( aFramePos, aTrackRect );
463  if ( mbLastFloatMode != bFloatMode )
464  {
465  if ( bFloatMode )
466  {
467  aTrackRect.AdjustLeft( -mnDockLeft );
468  aTrackRect.AdjustTop( -mnDockTop );
469  aTrackRect.AdjustRight(mnDockRight );
470  aTrackRect.AdjustBottom(mnDockBottom );
471  }
472  else
473  {
474  if ( aCompRect == aTrackRect )
475  {
476  aTrackRect.AdjustLeft(mnDockLeft );
477  aTrackRect.AdjustTop(mnDockTop );
478  aTrackRect.AdjustRight( -mnDockRight );
479  aTrackRect.AdjustBottom( -mnDockBottom );
480  }
481  }
482  mbLastFloatMode = bFloatMode;
483  }
484  if ( mbDragFull )
485  {
486  Point aOldPos = OutputToScreenPixel( Point() );
487  EndDocking( aTrackRect, mbLastFloatMode );
488  // repaint if state or position has changed
489  if ( aOldPos != OutputToScreenPixel( Point() ) )
490  {
491  ImplUpdateAll();
493  }
494 // EndDocking( aTrackRect, mbLastFloatMode );
495  }
496  else
497  {
498  ShowTrackFlags nTrackStyle;
499  if ( bFloatMode )
500  nTrackStyle = ShowTrackFlags::Big;
501  else
502  nTrackStyle = ShowTrackFlags::Object;
503  tools::Rectangle aShowTrackRect = aTrackRect;
504  aShowTrackRect.SetPos( ImplFrameToOutput( aShowTrackRect.TopLeft() ) );
505  ShowTracking( aShowTrackRect, nTrackStyle );
506 
507  // recalculate mouse offset, as the rectangle was changed
508  maMouseOff.setX( aFramePos.X() - aTrackRect.Left() );
509  maMouseOff.setY( aFramePos.Y() - aTrackRect.Top() );
510  }
511 
512  mnTrackX = aTrackRect.Left();
513  mnTrackY = aTrackRect.Top();
514  mnTrackWidth = aTrackRect.GetWidth();
515  mnTrackHeight = aTrackRect.GetHeight();
516  }
517  }
518 }
519 
521 {
522  if( GetDockingManager()->IsDockable( this ) ) // new docking interface
523  return Window::EventNotify( rNEvt );
524 
525  if ( mbDockable )
526  {
527  const bool bDockingSupportCrippled = !StyleSettings::GetDockingFloatsSupported();
528 
530  {
531  const MouseEvent* pMEvt = rNEvt.GetMouseEvent();
532  if ( pMEvt->IsLeft() )
533  {
534  if (!bDockingSupportCrippled && pMEvt->IsMod1() && (pMEvt->GetClicks() == 2) )
535  {
537  if ( IsFloatingMode() )
539  return true;
540  }
541  else if ( pMEvt->GetClicks() == 1 )
542  {
543  // check if window is floating standalone (IsFloating())
544  // or only partially floating and still docked with one border
545  // ( !mpWindowImpl->mbFrame)
546  if( ! IsFloatingMode() || ! mpFloatWin->mpWindowImpl->mbFrame )
547  {
548  Point aPos = pMEvt->GetPosPixel();
549  vcl::Window* pWindow = rNEvt.GetWindow();
550  if ( pWindow != this )
551  {
552  aPos = pWindow->OutputToScreenPixel( aPos );
553  aPos = ScreenToOutputPixel( aPos );
554  }
555  ImplStartDocking( aPos );
556  }
557  return true;
558  }
559  }
560  }
561  else if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
562  {
563  const vcl::KeyCode& rKey = rNEvt.GetKeyEvent()->GetKeyCode();
564  if( rKey.GetCode() == KEY_F10 && rKey.GetModifier() &&
565  rKey.IsShift() && rKey.IsMod1() && !bDockingSupportCrippled )
566  {
568  if ( IsFloatingMode() )
570  return true;
571  }
572  }
573  }
574 
575  return Window::EventNotify( rNEvt );
576 }
577 
579 {
580  mbDocking = true;
581 }
582 
584 {
585  return IsFloatingMode();
586 }
587 
588 void DockingWindow::EndDocking( const tools::Rectangle& rRect, bool bFloatMode )
589 {
590  bool bOrigDockCanceled = mbDockCanceled;
591  if (bFloatMode && !StyleSettings::GetDockingFloatsSupported())
592  mbDockCanceled = true;
593 
594  if ( !IsDockingCanceled() )
595  {
596  if ( bFloatMode != IsFloatingMode() )
597  {
598  SetFloatingMode( bFloatMode );
599  if ( IsFloatingMode() )
601  if ( bFloatMode && mpFloatWin )
602  mpFloatWin->SetPosSizePixel( rRect.TopLeft(), rRect.GetSize() );
603  }
604  if ( !bFloatMode )
605  {
606  Point aPos = rRect.TopLeft();
607  aPos = GetParent()->ScreenToOutputPixel( aPos );
608  Window::SetPosSizePixel( aPos, rRect.GetSize() );
609  }
610  }
611  mbDocking = false;
612  mbDockCanceled = bOrigDockCanceled;
613 }
614 
616 {
617  return true;
618 }
619 
621 {
622  VclPtr<vcl::Window> xWindow = this;
624  if ( xWindow->IsDisposed() )
625  return false;
626 
627  if ( mpWindowImpl->mxWindowPeer.is() && IsCreatedWithToolkit() )
628  return false;
629 
630  Show( false, ShowFlags::NoFocusChange );
631  return true;
632 }
633 
635 {
636 }
637 
639 {
640 }
641 
643 {
644  if (GetSettings().GetStyleSettings().GetAutoMnemonic())
645  Accelerator::GenerateAutoMnemonicsOnHierarchy(this);
646 
647  if (isLayoutEnabled())
648  {
651  if (IsFloatingMode())
654  }
655 }
656 
658 {
659  switch(nType)
660  {
662  DoInitialLayout();
663  break;
664 
667  Invalidate();
668  break;
669 
671  mbDockable = (GetStyle() & WB_DOCKABLE) != 0;
672  break;
673 
674  default:
675  break;
676  }
677 
678  Window::StateChanged( nType );
679 }
680 
682 {
683  if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) &&
684  (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) )
685  {
687  Invalidate();
688  }
689  else
690  Window::DataChanged( rDCEvt );
691 }
692 
693 void DockingWindow::SetFloatingMode( bool bFloatMode )
694 {
695  ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this );
696  if( pWrapper )
697  {
698  pWrapper->SetFloatingMode( bFloatMode );
699  return;
700  }
701  if ( IsFloatingMode() != bFloatMode )
702  {
703  if ( PrepareToggleFloatingMode() ) // changes to floating mode can be vetoed
704  {
705  bool bVisible = IsVisible();
706 
707  if ( bFloatMode )
708  {
709  // set deferred properties early, so border width will end up
710  // in our mpWindowImpl->mnBorderWidth, not in mpBorderWindow.
711  // (see its usage in setPosSizeOnContainee and GetOptimalSize.)
713 
714  Show( false, ShowFlags::NoFocusChange );
715 
716  maDockPos = Window::GetPosPixel();
717 
718  vcl::Window* pRealParent = mpWindowImpl->mpRealParent;
719  mpOldBorderWin = mpWindowImpl->mpBorderWindow;
720 
722  mpImplData->mpParent,
724  this );
725  mpFloatWin = pWin;
726  mpWindowImpl->mpBorderWindow = nullptr;
727  mpWindowImpl->mnLeftBorder = 0;
728  mpWindowImpl->mnTopBorder = 0;
729  mpWindowImpl->mnRightBorder = 0;
730  mpWindowImpl->mnBottomBorder = 0;
731  // if the parent gets destroyed, we also have to reset the parent of the BorderWindow
732  if ( mpOldBorderWin )
733  mpOldBorderWin->SetParent( pWin );
734 
735  // #i123765# reset the buffered DropTargets when undocking, else it may not
736  // be correctly initialized
737  mpWindowImpl->mxDNDListenerContainer.clear();
738 
739  SetParent( pWin );
740  SetPosPixel( Point() );
741  mpWindowImpl->mpBorderWindow = pWin;
742  pWin->mpWindowImpl->mpClientWindow = this;
743  mpWindowImpl->mpRealParent = pRealParent;
744  pWin->SetText( Window::GetText() );
745  Size aSize(Window::GetSizePixel());
746  pWin->SetOutputSizePixel(aSize);
747  pWin->SetPosPixel( maFloatPos );
748  // pass on DockingData to FloatingWindow
749  pWin->ShowTitleButton( TitleButton::Docking, mbDockBtn );
750  pWin->ShowTitleButton( TitleButton::Hide, mbHideBtn );
751  if ( mbRollUp )
752  pWin->RollUp();
753  else
754  pWin->RollDown();
755  pWin->SetRollUpOutputSizePixel( maRollUpOutSize );
756  pWin->SetMinOutputSizePixel( maMinOutSize );
757 
758  pWin->SetMaxOutputSizePixel( mpImplData->maMaxOutSize );
759 
761 
762  if ( bVisible )
763  Show();
764  }
765  else
766  {
767  Show( false, ShowFlags::NoFocusChange );
768 
769  // store FloatingData in FloatingWindow
776  mpImplData->maMaxOutSize = mpFloatWin->GetMaxOutputSizePixel();
777 
778  vcl::Window* pRealParent = mpWindowImpl->mpRealParent;
779  mpWindowImpl->mpBorderWindow = nullptr;
780  if ( mpOldBorderWin )
781  {
783  static_cast<ImplBorderWindow*>(mpOldBorderWin.get())->GetBorder( mpWindowImpl->mnLeftBorder, mpWindowImpl->mnTopBorder, mpWindowImpl->mnRightBorder, mpWindowImpl->mnBottomBorder );
785  }
786  mpWindowImpl->mpBorderWindow = mpOldBorderWin;
787  SetParent( pRealParent );
788  mpWindowImpl->mpRealParent = pRealParent;
791 
793 
794  if ( bVisible )
795  Show();
796  }
797  }
798  }
799 }
800 
802 {
803  ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this );
804  if( pWrapper )
805  {
806  pWrapper->SetFloatStyle( nStyle );
807  return;
808  }
809 
810  mnFloatBits = nStyle;
811 }
812 
814 {
815  ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this );
816  if( pWrapper )
817  {
818  return pWrapper->GetFloatStyle();
819  }
820 
821  return mnFloatBits;
822 }
823 
824 void DockingWindow::setPosSizePixel( long nX, long nY,
825  long nWidth, long nHeight,
826  PosSizeFlags nFlags )
827 {
828  ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this );
829  if (pWrapper)
830  {
831  if (!pWrapper->mpFloatWin)
832  Window::setPosSizePixel( nX, nY, nWidth, nHeight, nFlags );
833  }
834  else
835  {
836  if (!mpFloatWin)
837  Window::setPosSizePixel( nX, nY, nWidth, nHeight, nFlags );
838  else
839  {
840  mpFloatWin->SetOutputSizePixel(Size(nWidth, nHeight));
841  mpFloatWin->SetPosPixel(Point(nX, nY));
842  }
843  }
844 
845  if (::isLayoutEnabled(this))
847 }
848 
850 {
851  ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this );
852  if( pWrapper )
853  {
854  if ( pWrapper->mpFloatWin )
855  return pWrapper->mpFloatWin->GetPosPixel();
856  else
857  return Window::GetPosPixel();
858  }
859 
860  if ( mpFloatWin )
861  return mpFloatWin->GetPosPixel();
862  else
863  return Window::GetPosPixel();
864 }
865 
867 {
868  ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this );
869  if( pWrapper )
870  {
871  if ( pWrapper->mpFloatWin )
872  return pWrapper->mpFloatWin->GetSizePixel();
873  else
874  return Window::GetSizePixel();
875  }
876 
877  if ( mpFloatWin )
878  return mpFloatWin->GetSizePixel();
879  else
880  return Window::GetSizePixel();
881 }
882 
884 {
885  ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this );
886  if( pWrapper )
887  {
888  if ( pWrapper->mpFloatWin )
889  pWrapper->mpFloatWin->SetOutputSizePixel( rNewSize );
890  else
891  Window::SetOutputSizePixel( rNewSize );
892  return;
893  }
894 
895  if ( mpFloatWin )
896  mpFloatWin->SetOutputSizePixel( rNewSize );
897  else
898  Window::SetOutputSizePixel( rNewSize );
899 }
900 
902 {
903  ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this );
904  if( pWrapper )
905  {
906  if ( pWrapper->mpFloatWin )
907  return pWrapper->mpFloatWin->GetOutputSizePixel();
908  else
909  return Window::GetOutputSizePixel();
910  }
911 
912  if ( mpFloatWin )
913  return mpFloatWin->GetOutputSizePixel();
914  else
915  return Window::GetOutputSizePixel();
916 }
917 
919 {
920  ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this );
921  if( pWrapper )
922  {
923  if ( pWrapper->mpFloatWin )
924  {
926  aData.SetMask( WindowStateMask::Pos );
927  pWrapper->mpFloatWin->GetWindowStateData( aData );
928  Point aPos( aData.GetX(), aData.GetY() );
929  aPos = pWrapper->mpFloatWin->GetParent()->ImplGetFrameWindow()->AbsoluteScreenToOutputPixel( aPos );
930  return aPos;
931  }
932  else
933  return maFloatPos;
934  }
935 
936  if ( mpFloatWin )
937  {
939  aData.SetMask( WindowStateMask::Pos );
940  mpFloatWin->GetWindowStateData( aData );
941  Point aPos( aData.GetX(), aData.GetY() );
943  return aPos;
944  }
945  else
946  return maFloatPos;
947 }
948 
950 {
951  ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this );
952  if( pWrapper )
953  return pWrapper->IsFloatingMode();
954  else
955  return (mpFloatWin != nullptr);
956 }
957 
959 {
960  if ( mpFloatWin )
962  mpImplData->maMaxOutSize = rSize;
963 }
964 
965 void DockingWindow::SetText(const OUString& rStr)
966 {
968  Window::SetText(rStr);
969 }
970 
971 OUString DockingWindow::GetText() const
972 {
973  const_cast<DockingWindow*>(this)->setDeferredProperties();
974  return Window::GetText();
975 }
976 
978 {
979  //pre dtor called, and single child is a container => we're layout enabled
980  return mpImplData && ::isLayoutEnabled(this);
981 }
982 
984 {
985  maLayoutIdle.Stop();
986 
987  //resize DockingWindow to fit requisition on initial show
988  Size aSize = get_preferred_size();
989 
991 
992  aSize.setWidth( std::min(aMax.Width(), aSize.Width()) );
993  aSize.setHeight( std::min(aMax.Height(), aSize.Height()) );
994 
995  SetMinOutputSizePixel(aSize);
997 }
998 
1000 {
1001  Size aSize = GetOutputSizePixel();
1002 
1003  // Don't make the border width accessible via get_border_width(),
1004  // otherwise the floating window will handle the border as well.
1005  sal_Int32 nBorderWidth = mpWindowImpl->mnBorderWidth;
1006 
1007  aSize.AdjustWidth( -(2 * nBorderWidth) );
1008  aSize.AdjustHeight( -(2 * nBorderWidth) );
1009 
1011  assert(pBox);
1012  VclContainer::setLayoutAllocation(*pBox, Point(nBorderWidth, nBorderWidth), aSize);
1013 }
1014 
1016 {
1017  if (!isLayoutEnabled())
1018  return Window::GetOptimalSize();
1019 
1021 
1022  // Don't make the border width accessible via get_border_width(),
1023  // otherwise the floating window will handle the border as well.
1024  sal_Int32 nBorderWidth = mpWindowImpl->mnBorderWidth;
1025 
1026  aSize.AdjustHeight(2 * nBorderWidth );
1027  aSize.AdjustWidth(2 * nBorderWidth );
1028 
1029  return aSize;
1030 }
1031 
1033 {
1034  bool bTriggerLayout = true;
1036  {
1037  bTriggerLayout = false;
1038  }
1039  if (!isLayoutEnabled())
1040  {
1041  bTriggerLayout = false;
1042  }
1043  if (bTriggerLayout)
1044  {
1046  maLayoutIdle.Start();
1047  }
1048  vcl::Window::queue_resize(eReason);
1049 }
1050 
1051 IMPL_LINK_NOARG(DockingWindow, ImplHandleLayoutTimerHdl, Timer*, void)
1052 {
1053  if (!isLayoutEnabled())
1054  {
1055  SAL_WARN_IF(GetWindow(GetWindowType::FirstChild), "vcl.layout", "DockingWindow has become non-layout because extra children have been added directly to it.");
1056  return;
1057  }
1058  setPosSizeOnContainee();
1059 }
1060 
1061 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual Point GetPosPixel() const
Definition: window.cxx:2857
Point TopLeft() const
void setOptimalLayoutSize()
Definition: dockwin.cxx:983
long Width() const
void SetOutputSizePixel(const Size &rNewSize) override
Definition: dockwin.cxx:883
void SetPos(const Point &rPoint)
bool IsControlBackground() const
Definition: window2.cxx:1087
bool IsInputEnabled() const
Definition: window2.cxx:1127
virtual void Move()
Definition: window.cxx:1847
WinBits const WB_DOCKABLE
long GetWidth() const
bool mbLastFloatMode
Definition: dockwin.hxx:232
void setDeferredProperties()
Definition: builder.hxx:481
ActivateModeFlags GetActivateMode() const
Definition: window2.cxx:1137
static void setLayoutAllocation(vcl::Window &rWindow, const Point &rPos, const Size &rSize)
Definition: layout.cxx:61
virtual void SetText(const OUString &rStr) override
Definition: dockwin.cxx:965
bool mbDocking
Definition: dockwin.hxx:232
SAL_DLLPRIVATE void DoInitialLayout()
Definition: dockwin.cxx:642
bool bVisible
WinBits const WB_SYSTEMWINDOW
long GetHeight() const
constexpr sal_uInt16 KEY_MOD1
Definition: keycodes.hxx:31
Idle maLayoutIdle
Definition: dockwin.hxx:231
virtual bool PrepareToggleFloatingMode()
Definition: dockwin.cxx:615
virtual void Tracking(const TrackingEvent &rTEvt) override
Definition: dockwin.cxx:405
bool IsDockable() const
Definition: dockwin.hxx:307
long AdjustWidth(long n)
const char aData[]
SAL_DLLPRIVATE void setPosSizeOnContainee()
Definition: dockwin.cxx:999
long Height() const
bool IsRollUp() const
Definition: syswin.hxx:147
WinBits const WB_NODIALOGCONTROL
bool IsBackground() const
Definition: outdev.hxx:640
Resize runs before repaint, so we won't paint twice.
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
int GetY() const
Definition: windowstate.hxx:61
sal_Int32 mnDockRight
Definition: dockwin.hxx:228
static Size getLayoutRequisition(const vcl::Window &rWindow)
Definition: layout.cxx:136
void disposeAndClear()
Definition: vclptr.hxx:200
const StyleSettings & GetStyleSettings() const
bool mbIsDeferredInit
Definition: dockwin.hxx:244
Point maDockPos
Definition: dockwin.hxx:218
const Color & GetFaceColor() const
bool mbDockBtn
Definition: dockwin.hxx:232
Important idle events to be run before processing drawing events.
void InvalidateSizeCache()
clear OptimalSize cache
Definition: window2.cxx:1307
void HideTracking()
Definition: window2.cxx:147
int GetX() const
Definition: windowstate.hxx:59
virtual Size GetSizePixel() const
Definition: window.cxx:2415
SAL_DLLPRIVATE vcl::Window * ImplGetFrameWindow() const
Definition: window2.cxx:901
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
sal_uInt16 GetCode() const
Definition: keycod.hxx:53
PosSizeFlags
Definition: window.hxx:141
DataChangedEventType GetType() const
Definition: event.hxx:361
const KeyEvent * GetKeyEvent() const
Definition: event.hxx:315
#define DOCKWIN_FLOATSTYLES
Definition: dockwin.cxx:36
Point maMouseOff
Definition: dockwin.hxx:219
tools::Rectangle GetDesktopRectPixel() const
Definition: window.cxx:2862
virtual void Resizing(Size &rSize)
Definition: syswin.cxx:295
virtual void SetSettings(const AllSettings &rSettings) override
const Color & GetControlBackground() const
Definition: window2.cxx:1082
bool IsCreatedWithToolkit() const
Definition: window2.cxx:1237
SAL_DLLPRIVATE void ImplUpdateAll()
Definition: paint.cxx:985
bool IsDockingCanceled() const
Definition: dockwin.hxx:308
long AdjustHeight(long n)
Point GetPosPixel() const override
Definition: dockwin.cxx:849
void StartTracking(StartTrackingFlags nFlags=StartTrackingFlags::NONE)
Definition: window2.cxx:244
bool IsFloatingMode() const
Definition: dockmgr.cxx:1029
DockingWindow(const DockingWindow &)=delete
long AdjustBottom(long nVertMoveDelta)
void ImplStartDocking(const Point &rPos)
Definition: dockwin.cxx:227
long mnTrackWidth
Definition: dockwin.hxx:224
bool IsActive() const
Definition: task.hxx:90
StateChangedType
Definition: window.hxx:311
sal_uInt16 GetClicks() const
Definition: event.hxx:123
sal_Int64 WinBits
vcl::Window * GetWindow() const
Definition: event.hxx:308
void SetBackground()
IMPL_LINK_NOARG(ImplDockFloatWin, DockTimerHdl, Timer *, void)
Definition: dockwin.cxx:124
void Enable(bool bEnable=true, bool bChild=true)
Definition: window.cxx:2446
virtual Size GetOptimalSize() const override
Definition: dockwin.cxx:1015
void EnableAlwaysOnTop(bool bEnable=true)
Definition: stacking.cxx:598
void ShowTracking(const tools::Rectangle &rRect, ShowTrackFlags nFlags=ShowTrackFlags::Small)
Definition: window2.cxx:124
virtual void StartDocking()
Definition: dockwin.cxx:578
AllSettingsFlags GetFlags() const
Definition: event.hxx:362
virtual void Start() override
Activates the timer task.
Definition: idle.cxx:34
void loadUI(vcl::Window *pParent, const OString &rID, const OUString &rUIXMLDescription, const css::uno::Reference< css::frame::XFrame > &rFrame)
Definition: dockwin.cxx:368
void SetFloatStyle(WinBits nWinStyle)
Definition: dockwin.cxx:801
virtual void queue_resize(StateChangedType eReason=StateChangedType::Layout)
Definition: window2.cxx:1314
bool mbHideBtn
Definition: dockwin.hxx:232
virtual void SetOutputSizePixel(const Size &rNewSize)
Definition: window2.cxx:1274
sal_uInt16 GetModifier() const
Definition: keycod.hxx:56
virtual void queue_resize(StateChangedType eReason=StateChangedType::Layout) override
Definition: dockwin.cxx:1032
long Top() const
WinBits mnFloatBits
Definition: dockwin.hxx:230
virtual void setPosSizePixel(long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags=PosSizeFlags::All) override
Definition: dockwin.cxx:824
virtual bool Docking(const Point &rPos, tools::Rectangle &rRect)
Definition: dockwin.cxx:583
Size GetOutputSizePixel() const
Definition: dockwin.cxx:901
#define MOUSE_LEFT
Definition: event.hxx:99
const Size & GetMinOutputSizePixel() const
Definition: syswin.hxx:153
virtual void EndDocking(const tools::Rectangle &rRect, bool bFloatMode)
Definition: dockwin.cxx:588
void SetDebugName(const char *pDebugName)
Definition: task.hxx:81
bool isLayoutEnabled() const
Definition: dockwin.cxx:977
bool IsAlwaysOnTopEnabled() const
Definition: window2.cxx:1143
sal_Int32 mnDockBottom
Definition: dockwin.hxx:229
static void RemoveUserEvent(ImplSVEvent *nUserEvent)
Remove user event based on event ID.
Definition: svapp.cxx:1034
void EnableInput(bool bEnable=true, bool bChild=true)
Definition: window.cxx:2523
WinBits const WB_DIALOGCONTROL
void clear()
Definition: vclptr.hxx:190
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
Definition: dockwin.cxx:390
bool mbIsCalculatingInitialLayoutSize
Definition: dockwin.hxx:232
void SetActivateMode(ActivateModeFlags nMode)
Definition: window.cxx:2701
VclPtr< vcl::Window > mpParent
Definition: dockwin.cxx:43
Window(WindowType nType)
Definition: window.cxx:85
Point maFloatPos
Definition: dockwin.hxx:217
bool IsFloatingMode() const
Definition: dockwin.cxx:949
virtual ~DockingWindow() override
Definition: dockwin.cxx:385
void ToTop(ToTopFlags nFlags=ToTopFlags::NONE)
Definition: stacking.cxx:420
void SetMaxOutputSizePixel(const Size &rSize)
Definition: syswin.cxx:410
WinBits GetFloatStyle() const
Definition: dockwin.hxx:159
const Size & GetRollUpOutputSizePixel() const
Definition: syswin.hxx:150
ImplDockingWindowWrapper.
Definition: dockwin.hxx:71
void SetParent(vcl::Window *pNewParent)
Definition: stacking.cxx:842
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
Definition: paint.cxx:1160
ShowTrackFlags
Definition: window.hxx:269
VclPtr< FloatingWindow > mpFloatWin
Definition: dockwin.hxx:83
bool mbDockable
Definition: dockwin.hxx:232
std::unique_ptr< WindowImpl > mpWindowImpl
Definition: window.hxx:511
void SetFloatingMode(bool bFloatMode)
Definition: dockwin.cxx:693
virtual void Resize()
Definition: window.cxx:1849
Size get_preferred_size() const
Definition: window2.cxx:1640
std::unique_ptr< VclBuilder > m_pUIBuilder
Definition: builder.hxx:498
bool isLayoutEnabled(const vcl::Window *pWindow)
Definition: layout.cxx:2722
MouseNotifyEvent GetType() const
Definition: event.hxx:307
const AllSettings & GetSettings() const
Definition: outdev.hxx:420
Size GetOutputSizePixel() const
Definition: outdev.hxx:441
static OUString getUIRootDir()
Definition: dialog.cxx:545
SAL_DLLPRIVATE void ImplInitDockingWindowData()
Definition: dockwin.cxx:278
Point ScreenToOutputPixel(const Point &rPos) const
Definition: window.cxx:2875
Size maMinOutSize
Definition: dockwin.hxx:221
bool IsTitleButtonVisible(TitleButton nButton) const
Definition: syswin.cxx:361
constexpr sal_uInt16 KEY_F10
Definition: keycodes.hxx:92
vcl::Window * GetParent() const
Definition: window2.cxx:1097
bool IsTrackingEnded() const
Definition: event.hxx:267
Point OutputToAbsoluteScreenPixel(const Point &rPos) const
Definition: window.cxx:2918
virtual void StateChanged(StateChangedType nType) override
Definition: dockwin.cxx:657
Size GetSize() const
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
void disposeBuilder()
Definition: dialog.cxx:539
virtual bool EventNotify(NotifyEvent &rNEvt) override
Definition: dockwin.cxx:520
void SetMask(WindowStateMask nValidMask)
Definition: windowstate.hxx:55
VclPtr< vcl::Window > mpOldBorderWin
Definition: dockwin.hxx:215
WinBits const WB_3DLOOK
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
void GetWindowStateData(WindowStateData &rData) const
Definition: syswin.cxx:799
A construction helper for a temporary VclPtr.
Definition: vclptr.hxx:275
Size GetSizePixel() const override
Definition: dockwin.cxx:866
const vcl::KeyCode & GetKeyCode() const
Definition: event.hxx:54
bool IsShift() const
Definition: keycod.hxx:58
Point GetFloatingPos() const
Definition: dockwin.cxx:918
SAL_DLLPRIVATE void ImplInitSettings()
Definition: dockwin.cxx:327
void AlwaysEnableInput(bool bAlways, bool bChild=true)
Override EnableInput.
Definition: window.cxx:2647
long AdjustRight(long nHorzMoveDelta)
void Stop()
Definition: scheduler.cxx:593
DockingManager * ImplGetDockingManager()
Definition: svdata.cxx:307
WindowType
static bool GetDockingFloatsSupported()
bool IsSynthetic() const
Definition: event.hxx:139
#define SAL_WARN_IF(condition, area, stream)
WinBits const WB_BORDER
const MouseEvent * GetMouseEvent() const
Definition: event.hxx:323
void SetMaxOutputSizePixel(const Size &rSize)
Definition: dockwin.cxx:958
bool IsVisible() const
Definition: window2.cxx:1102
virtual void doDeferredInit(WinBits nBits)
Definition: dockwin.cxx:360
bool IsLeft() const
Definition: event.hxx:146
bool IsMod1() const
Definition: keycod.hxx:60
static VclPtr< reference_type > Create(Arg &&...arg)
A construction helper for VclPtr.
Definition: vclptr.hxx:127
sal_Int32 mnDockTop
Definition: dockwin.hxx:227
SAL_DLLPRIVATE Point ImplFrameToOutput(const Point &rPos)
Definition: window2.cxx:942
long AdjustTop(long nVertMoveDelta)
void SetInvokeHandler(const Link< Timer *, void > &rLink)
Definition: timer.hxx:56
const Color & GetWindowColor() const
const Point & GetPosPixel() const
Definition: event.hxx:120
static sal_uInt64 GetSystemTicks()
long Left() const
std::unique_ptr< ImplData > mpImplData
Definition: dockwin.hxx:216
bool IsDisposed() const
Definition: window.cxx:136
bool mbStartFloat
Definition: dockwin.hxx:232
long mnTrackHeight
Definition: dockwin.hxx:225
bool IsAlwaysEnableInput() const
returns the current AlwaysEnableInput state
Definition: window2.cxx:1132
virtual OUString GetText() const override
Definition: dockwin.cxx:971
reference_type * get() const
Get the body.
Definition: vclptr.hxx:143
bool IsEnabled() const
Definition: window2.cxx:1122
virtual bool Close()
Definition: dockwin.cxx:620
sal_Int32 mnDockLeft
Definition: dockwin.hxx:226
bool IsTrackingCanceled() const
Definition: event.hxx:269
WinBits GetStyle() const
Definition: window2.cxx:953
Definition: timer.hxx:26
void SetPriority(TaskPriority ePriority)
Definition: scheduler.cxx:600
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
Size maRollUpOutSize
Definition: dockwin.hxx:220
VclPtr< FloatingWindow > mpFloatWin
Definition: dockwin.hxx:214
void CallEventListeners(VclEventId nEvent, void *pData=nullptr)
Definition: event.cxx:213
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
Definition: dockwin.cxx:681
const MouseEvent & GetMouseEvent() const
Definition: event.hxx:263
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle)
Definition: dockwin.cxx:312
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
void setWidth(long nWidth)
void SetMinOutputSizePixel(const Size &rSize)
Definition: dockwin.hxx:351
#define MOUSE_RIGHT
Definition: event.hxx:101
virtual void SetPosPixel(const Point &rNewPos)
Definition: window2.cxx:1257
virtual void Resize() override
Definition: syswin.cxx:1053
virtual void ToggleFloatingMode()
Definition: dockwin.cxx:634
bool mbDockCanceled
Definition: dockwin.hxx:232
VclPtr< vcl::Window > mpDialogParent
Definition: dockwin.hxx:245
bool mbDragFull
Definition: dockwin.hxx:232
An idle is a timer to be scheduled immediately.
Definition: idle.hxx:30
static DockingManager * GetDockingManager()
Definition: window2.cxx:803
void SetFloatStyle(WinBits nWinStyle)
Definition: dockmgr.cxx:981
Size bestmaxFrameSizeForScreenSize(const Size &rScreenSize)
Definition: dialog.cxx:691
bool IsMod1() const
Definition: event.hxx:157
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)
Definition: window.cxx:2201
void setHeight(long nHeight)