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