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/toolkit/floatwin.hxx>
25 #include <vcl/layout.hxx>
26 #include <vcl/dockwin.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 #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  mbInMove( false ),
90  mnLastUserEvent( nullptr )
91 {
92  // copy settings of DockingWindow
93  if ( pDockingWin )
94  {
95  GetOutDev()->SetSettings( pDockingWin->GetSettings() );
96  Enable( pDockingWin->IsEnabled(), false );
97  EnableInput( pDockingWin->IsInputEnabled(), false );
98  AlwaysEnableInput( pDockingWin->IsAlwaysEnableInput(), false );
99  EnableAlwaysOnTop( pDockingWin->IsAlwaysOnTopEnabled() );
100  SetActivateMode( pDockingWin->GetActivateMode() );
101  }
102 
103  SetBackground();
104 
105  maDockIdle.SetInvokeHandler( LINK( this, ImplDockFloatWin, DockTimerHdl ) );
106  maDockIdle.SetPriority( TaskPriority::HIGH_IDLE );
107  maDockIdle.SetDebugName( "vcl::ImplDockFloatWin maDockIdle" );
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  maLayoutIdle.SetDebugName( "vcl::DockingWindow maLayoutIdle" );
311 }
312 
314 {
315  if ( !(nStyle & WB_NODIALOGCONTROL) )
316  nStyle |= WB_DIALOGCONTROL;
317 
318  mpImplData->mpParent = pParent;
319  mbDockable = (nStyle & WB_DOCKABLE) != 0;
321  nStyle &= ~(DOCKWIN_FLOATSTYLES | WB_BORDER);
322 
323  Window::ImplInit( pParent, nStyle, nullptr );
324 
326 }
327 
329 {
330  // Hack: to be able to build DockingWindows w/o background before switching
331  // TODO: Hack
332  if ( !IsBackground() )
333  return;
334 
335  const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
336 
337  Color aColor;
338  if ( IsControlBackground() )
339  aColor = GetControlBackground();
340  else if ( Window::GetStyle() & WB_3DLOOK )
341  aColor = rStyleSettings.GetFaceColor();
342  else
343  aColor = rStyleSettings.GetWindowColor();
344  SetBackground( aColor );
345 }
346 
348  Window(nType)
349 {
351 }
352 
355 {
357  ImplInit( pParent, nStyle );
358 }
359 
360 //Find the real parent stashed in mpDialogParent.
362 {
363  vcl::Window *pParent = mpDialogParent;
364  mpDialogParent = nullptr;
365  ImplInit(pParent, nBits);
366  mbIsDeferredInit = false;
367 }
368 
369 void DockingWindow::loadUI(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription,
370  const css::uno::Reference<css::frame::XFrame> &rFrame)
371 {
372  mbIsDeferredInit = true;
373  mpDialogParent = pParent; //should be unset in doDeferredInit
374  m_pUIBuilder.reset( new VclBuilder(this, AllSettings::GetUIRootDir(), rUIXMLDescription, rID, rFrame) );
375 }
376 
377 DockingWindow::DockingWindow(vcl::Window* pParent, const OString& rID,
378  const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame> &rFrame)
380 {
382 
383  loadUI(pParent, rID, rUIXMLDescription, rFrame);
384 }
385 
387 {
388  disposeOnce();
389 }
390 
392 {
393  if ( IsFloatingMode() )
394  {
395  Show( false, ShowFlags::NoFocusChange );
396  SetFloatingMode(false);
397  }
398  mpImplData.reset();
399  mpFloatWin.clear();
402  disposeBuilder();
403  Window::dispose();
404 }
405 
407 {
408  if( GetDockingManager()->IsDockable( this ) ) // new docking interface
409  return Window::Tracking( rTEvt );
410 
411  if ( !mbDocking )
412  return;
413 
414  if ( rTEvt.IsTrackingEnded() )
415  {
416  mbDocking = false;
417  if ( mbDragFull )
418  {
419  // reset old state on Cancel
420  if ( rTEvt.IsTrackingCanceled() )
421  {
422  StartDocking();
424  EndDocking( aRect, mbStartFloat );
425  }
426  }
427  else
428  {
429  HideTracking();
430  if ( rTEvt.IsTrackingCanceled() )
431  {
432  mbDockCanceled = true;
434  mbDockCanceled = false;
435  }
436  else
438  }
439  }
440  // dock only for non-synthetic MouseEvents
441  else if ( !rTEvt.GetMouseEvent().IsSynthetic() || rTEvt.GetMouseEvent().IsModifierChanged() )
442  {
443  Point aMousePos = rTEvt.GetMouseEvent().GetPosPixel();
444  Point aFrameMousePos = ImplOutputToFrame( aMousePos );
445  Size aFrameSize = mpWindowImpl->mpFrameWindow->GetOutputSizePixel();
446  if ( aFrameMousePos.X() < 0 )
447  aFrameMousePos.setX( 0 );
448  if ( aFrameMousePos.Y() < 0 )
449  aFrameMousePos.setY( 0 );
450  if ( aFrameMousePos.X() > aFrameSize.Width()-1 )
451  aFrameMousePos.setX( aFrameSize.Width()-1 );
452  if ( aFrameMousePos.Y() > aFrameSize.Height()-1 )
453  aFrameMousePos.setY( aFrameSize.Height()-1 );
454  aMousePos = ImplFrameToOutput( aFrameMousePos );
455  aMousePos.AdjustX( -(maMouseOff.X()) );
456  aMousePos.AdjustY( -(maMouseOff.Y()) );
457  Point aFramePos = ImplOutputToFrame( aMousePos );
458  tools::Rectangle aTrackRect( aFramePos, Size( mnTrackWidth, mnTrackHeight ) );
459  tools::Rectangle aCompRect = aTrackRect;
460  aFramePos.AdjustX(maMouseOff.X() );
461  aFramePos.AdjustY(maMouseOff.Y() );
462  if ( mbDragFull )
463  StartDocking();
464  bool bFloatMode = Docking( aFramePos, aTrackRect );
465  if ( mbLastFloatMode != bFloatMode )
466  {
467  if ( bFloatMode )
468  {
469  aTrackRect.AdjustLeft( -mnDockLeft );
470  aTrackRect.AdjustTop( -mnDockTop );
471  aTrackRect.AdjustRight(mnDockRight );
472  aTrackRect.AdjustBottom(mnDockBottom );
473  }
474  else
475  {
476  if ( aCompRect == aTrackRect )
477  {
478  aTrackRect.AdjustLeft(mnDockLeft );
479  aTrackRect.AdjustTop(mnDockTop );
480  aTrackRect.AdjustRight( -mnDockRight );
481  aTrackRect.AdjustBottom( -mnDockBottom );
482  }
483  }
484  mbLastFloatMode = bFloatMode;
485  }
486  if ( mbDragFull )
487  {
488  Point aOldPos = OutputToScreenPixel( Point() );
489  EndDocking( aTrackRect, mbLastFloatMode );
490  // repaint if state or position has changed
491  if ( aOldPos != OutputToScreenPixel( Point() ) )
492  {
493  ImplUpdateAll();
495  }
496 // EndDocking( aTrackRect, mbLastFloatMode );
497  }
498  else
499  {
500  ShowTrackFlags nTrackStyle;
501  if ( bFloatMode )
502  nTrackStyle = ShowTrackFlags::Big;
503  else
504  nTrackStyle = ShowTrackFlags::Object;
505  tools::Rectangle aShowTrackRect = aTrackRect;
506  aShowTrackRect.SetPos( ImplFrameToOutput( aShowTrackRect.TopLeft() ) );
507  ShowTracking( aShowTrackRect, nTrackStyle );
508 
509  // recalculate mouse offset, as the rectangle was changed
510  maMouseOff.setX( aFramePos.X() - aTrackRect.Left() );
511  maMouseOff.setY( aFramePos.Y() - aTrackRect.Top() );
512  }
513 
514  mnTrackX = aTrackRect.Left();
515  mnTrackY = aTrackRect.Top();
516  mnTrackWidth = aTrackRect.GetWidth();
517  mnTrackHeight = aTrackRect.GetHeight();
518  }
519 }
520 
522 {
523  if( GetDockingManager()->IsDockable( this ) ) // new docking interface
524  return Window::EventNotify( rNEvt );
525 
526  if ( mbDockable )
527  {
528  const bool bDockingSupportCrippled = !StyleSettings::GetDockingFloatsSupported();
529 
531  {
532  const MouseEvent* pMEvt = rNEvt.GetMouseEvent();
533  if ( pMEvt->IsLeft() )
534  {
535  if (!bDockingSupportCrippled && pMEvt->IsMod1() && (pMEvt->GetClicks() == 2) )
536  {
538  if ( IsFloatingMode() )
540  return true;
541  }
542  else if ( pMEvt->GetClicks() == 1 )
543  {
544  // check if window is floating standalone (IsFloating())
545  // or only partially floating and still docked with one border
546  // ( !mpWindowImpl->mbFrame)
547  if( ! IsFloatingMode() || ! mpFloatWin->mpWindowImpl->mbFrame )
548  {
549  Point aPos = pMEvt->GetPosPixel();
550  vcl::Window* pWindow = rNEvt.GetWindow();
551  if ( pWindow != this )
552  {
553  aPos = pWindow->OutputToScreenPixel( aPos );
554  aPos = ScreenToOutputPixel( aPos );
555  }
556  ImplStartDocking( aPos );
557  }
558  return true;
559  }
560  }
561  }
562  else if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
563  {
564  const vcl::KeyCode& rKey = rNEvt.GetKeyEvent()->GetKeyCode();
565  if( rKey.GetCode() == KEY_F10 && rKey.GetModifier() &&
566  rKey.IsShift() && rKey.IsMod1() && !bDockingSupportCrippled )
567  {
569  if ( IsFloatingMode() )
571  return true;
572  }
573  }
574  }
575 
576  return Window::EventNotify( rNEvt );
577 }
578 
580 {
581  mbDocking = true;
582 }
583 
585 {
586  return IsFloatingMode();
587 }
588 
589 void DockingWindow::EndDocking( const tools::Rectangle& rRect, bool bFloatMode )
590 {
591  bool bOrigDockCanceled = mbDockCanceled;
592  if (bFloatMode && !StyleSettings::GetDockingFloatsSupported())
593  mbDockCanceled = true;
594 
595  if ( !IsDockingCanceled() )
596  {
597  if ( bFloatMode != IsFloatingMode() )
598  {
599  SetFloatingMode( bFloatMode );
600  if ( IsFloatingMode() )
602  if ( bFloatMode && mpFloatWin )
603  mpFloatWin->SetPosSizePixel( rRect.TopLeft(), rRect.GetSize() );
604  }
605  if ( !bFloatMode )
606  {
607  Point aPos = rRect.TopLeft();
608  aPos = GetParent()->ScreenToOutputPixel( aPos );
609  Window::SetPosSizePixel( aPos, rRect.GetSize() );
610  }
611  }
612  mbDocking = false;
613  mbDockCanceled = bOrigDockCanceled;
614 }
615 
617 {
618  return true;
619 }
620 
622 {
623  VclPtr<vcl::Window> xWindow = this;
625  if ( xWindow->isDisposed() )
626  return false;
627 
628  if ( mpWindowImpl->mxWindowPeer.is() && IsCreatedWithToolkit() )
629  return false;
630 
631  Show( false, ShowFlags::NoFocusChange );
632  return true;
633 }
634 
636 {
637 }
638 
640 {
641 }
642 
644 {
645  if (GetSettings().GetStyleSettings().GetAutoMnemonic())
646  Accelerator::GenerateAutoMnemonicsOnHierarchy(this);
647 
648  if (isLayoutEnabled())
649  {
652  if (IsFloatingMode())
655  }
656 }
657 
659 {
660  switch(nType)
661  {
663  DoInitialLayout();
664  break;
665 
668  Invalidate();
669  break;
670 
672  mbDockable = (GetStyle() & WB_DOCKABLE) != 0;
673  break;
674 
675  default:
676  break;
677  }
678 
679  Window::StateChanged( nType );
680 }
681 
683 {
684  if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) &&
685  (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) )
686  {
688  Invalidate();
689  }
690  else
691  Window::DataChanged( rDCEvt );
692 }
693 
694 void DockingWindow::SetFloatingMode( bool bFloatMode )
695 {
697  if( pWrapper )
698  {
699  pWrapper->SetFloatingMode( bFloatMode );
700  return;
701  }
702  if ( IsFloatingMode() == bFloatMode )
703  return;
704 
705  if ( !PrepareToggleFloatingMode() ) // changes to floating mode can be vetoed
706  return;
707 
708  bool bVisible = IsVisible();
709 
710  if ( bFloatMode )
711  {
712  // set deferred properties early, so border width will end up
713  // in our mpWindowImpl->mnBorderWidth, not in mpBorderWindow.
714  // (see its usage in setPosSizeOnContainee and GetOptimalSize.)
716 
717  Show( false, ShowFlags::NoFocusChange );
718 
719  maDockPos = Window::GetPosPixel();
720 
721  vcl::Window* pRealParent = mpWindowImpl->mpRealParent;
722  mpOldBorderWin = mpWindowImpl->mpBorderWindow;
723 
725  mpImplData->mpParent,
727  this );
728  mpFloatWin = pWin;
729  mpWindowImpl->mpBorderWindow = nullptr;
730  mpWindowImpl->mnLeftBorder = 0;
731  mpWindowImpl->mnTopBorder = 0;
732  mpWindowImpl->mnRightBorder = 0;
733  mpWindowImpl->mnBottomBorder = 0;
734  // if the parent gets destroyed, we also have to reset the parent of the BorderWindow
735  if ( mpOldBorderWin )
736  mpOldBorderWin->SetParent( pWin );
737 
738  // #i123765# reset the buffered DropTargets when undocking, else it may not
739  // be correctly initialized
740  mpWindowImpl->mxDNDListenerContainer.clear();
741 
742  SetParent( pWin );
743  SetPosPixel( Point() );
744  mpWindowImpl->mpBorderWindow = pWin;
745  pWin->mpWindowImpl->mpClientWindow = this;
746  mpWindowImpl->mpRealParent = pRealParent;
747  pWin->SetText( Window::GetText() );
748  Size aSize(Window::GetSizePixel());
749  pWin->SetOutputSizePixel(aSize);
750  pWin->SetPosPixel( maFloatPos );
751  // pass on DockingData to FloatingWindow
752  pWin->ShowTitleButton( TitleButton::Docking, mbDockBtn );
753  pWin->ShowTitleButton( TitleButton::Hide, mbHideBtn );
754  pWin->SetMinOutputSizePixel( maMinOutSize );
755 
756  pWin->SetMaxOutputSizePixel( mpImplData->maMaxOutSize );
757 
759 
760  if ( bVisible )
761  Show();
762  }
763  else
764  {
765  Show( false, ShowFlags::NoFocusChange );
766 
767  // store FloatingData in FloatingWindow
772  mpImplData->maMaxOutSize = mpFloatWin->GetMaxOutputSizePixel();
773 
774  vcl::Window* pRealParent = mpWindowImpl->mpRealParent;
775  mpWindowImpl->mpBorderWindow = nullptr;
776  if ( mpOldBorderWin )
777  {
779  static_cast<ImplBorderWindow*>(mpOldBorderWin.get())->GetBorder( mpWindowImpl->mnLeftBorder, mpWindowImpl->mnTopBorder, mpWindowImpl->mnRightBorder, mpWindowImpl->mnBottomBorder );
781  }
782  mpWindowImpl->mpBorderWindow = mpOldBorderWin;
783  SetParent( pRealParent );
784  mpWindowImpl->mpRealParent = pRealParent;
787 
789 
790  if ( bVisible )
791  Show();
792  }
793 }
794 
796 {
798  if( pWrapper )
799  {
800  pWrapper->SetFloatStyle( nStyle );
801  return;
802  }
803 
804  mnFloatBits = nStyle;
805 }
806 
808 {
810  if( pWrapper )
811  {
812  return pWrapper->GetFloatStyle();
813  }
814 
815  return mnFloatBits;
816 }
817 
819  tools::Long nWidth, tools::Long nHeight,
820  PosSizeFlags nFlags )
821 {
823  if (pWrapper)
824  {
825  if (!pWrapper->mpFloatWin)
826  Window::setPosSizePixel( nX, nY, nWidth, nHeight, nFlags );
827  }
828  else
829  {
830  if (!mpFloatWin)
831  Window::setPosSizePixel( nX, nY, nWidth, nHeight, nFlags );
832  else
833  {
834  mpFloatWin->SetOutputSizePixel(Size(nWidth, nHeight));
835  mpFloatWin->SetPosPixel(Point(nX, nY));
836  }
837  }
838 
839  if (::isLayoutEnabled(this))
841 }
842 
844 {
846  if( pWrapper )
847  {
848  if ( pWrapper->mpFloatWin )
849  return pWrapper->mpFloatWin->GetPosPixel();
850  else
851  return Window::GetPosPixel();
852  }
853 
854  if ( mpFloatWin )
855  return mpFloatWin->GetPosPixel();
856  else
857  return Window::GetPosPixel();
858 }
859 
861 {
863  if( pWrapper )
864  {
865  if ( pWrapper->mpFloatWin )
866  return pWrapper->mpFloatWin->GetSizePixel();
867  else
868  return Window::GetSizePixel();
869  }
870 
871  if ( mpFloatWin )
872  return mpFloatWin->GetSizePixel();
873  else
874  return Window::GetSizePixel();
875 }
876 
878 {
880  if( pWrapper )
881  {
882  if ( pWrapper->mpFloatWin )
883  pWrapper->mpFloatWin->SetOutputSizePixel( rNewSize );
884  else
885  Window::SetOutputSizePixel( rNewSize );
886  return;
887  }
888 
889  if ( mpFloatWin )
890  mpFloatWin->SetOutputSizePixel( rNewSize );
891  else
892  Window::SetOutputSizePixel( rNewSize );
893 }
894 
896 {
898  if( pWrapper )
899  {
900  if ( pWrapper->mpFloatWin )
901  return pWrapper->mpFloatWin->GetOutputSizePixel();
902  else
903  return Window::GetOutputSizePixel();
904  }
905 
906  if ( mpFloatWin )
907  return mpFloatWin->GetOutputSizePixel();
908  else
909  return Window::GetOutputSizePixel();
910 }
911 
913 {
915  if( pWrapper )
916  {
917  if ( pWrapper->mpFloatWin )
918  {
920  aData.SetMask( WindowStateMask::Pos );
921  pWrapper->mpFloatWin->GetWindowStateData( aData );
922  Point aPos( aData.GetX(), aData.GetY() );
923  aPos = pWrapper->mpFloatWin->GetParent()->ImplGetFrameWindow()->AbsoluteScreenToOutputPixel( aPos );
924  return aPos;
925  }
926  else
927  return maFloatPos;
928  }
929 
930  if ( mpFloatWin )
931  {
933  aData.SetMask( WindowStateMask::Pos );
934  mpFloatWin->GetWindowStateData( aData );
935  Point aPos( aData.GetX(), aData.GetY() );
937  return aPos;
938  }
939  else
940  return maFloatPos;
941 }
942 
944 {
946  if( pWrapper )
947  return pWrapper->IsFloatingMode();
948  else
949  return (mpFloatWin != nullptr);
950 }
951 
953 {
954  if ( mpFloatWin )
956  mpImplData->maMaxOutSize = rSize;
957 }
958 
959 void DockingWindow::SetText(const OUString& rStr)
960 {
962  Window::SetText(rStr);
963 }
964 
965 OUString DockingWindow::GetText() const
966 {
967  const_cast<DockingWindow*>(this)->setDeferredProperties();
968  return Window::GetText();
969 }
970 
972 {
973  //pre dtor called, and single child is a container => we're layout enabled
974  return mpImplData && ::isLayoutEnabled(this);
975 }
976 
978 {
979  maLayoutIdle.Stop();
980 
981  //resize DockingWindow to fit requisition on initial show
982  Size aSize = get_preferred_size();
983 
985 
986  aSize.setWidth( std::min(aMax.Width(), aSize.Width()) );
987  aSize.setHeight( std::min(aMax.Height(), aSize.Height()) );
988 
989  SetMinOutputSizePixel(aSize);
991 }
992 
994 {
995  Size aSize = GetOutputSizePixel();
996 
997  // Don't make the border width accessible via get_border_width(),
998  // otherwise the floating window will handle the border as well.
999  sal_Int32 nBorderWidth = mpWindowImpl->mnBorderWidth;
1000 
1001  aSize.AdjustWidth( -(2 * nBorderWidth) );
1002  aSize.AdjustHeight( -(2 * nBorderWidth) );
1003 
1005  assert(pBox);
1006  VclContainer::setLayoutAllocation(*pBox, Point(nBorderWidth, nBorderWidth), aSize);
1007 }
1008 
1010 {
1011  if (!isLayoutEnabled())
1012  return Window::GetOptimalSize();
1013 
1015 
1016  // Don't make the border width accessible via get_border_width(),
1017  // otherwise the floating window will handle the border as well.
1018  sal_Int32 nBorderWidth = mpWindowImpl->mnBorderWidth;
1019 
1020  aSize.AdjustHeight(2 * nBorderWidth );
1021  aSize.AdjustWidth(2 * nBorderWidth );
1022 
1023  return aSize;
1024 }
1025 
1027 {
1028  bool bTriggerLayout = true;
1030  {
1031  bTriggerLayout = false;
1032  }
1033  if (!isLayoutEnabled())
1034  {
1035  bTriggerLayout = false;
1036  }
1037  if (bTriggerLayout)
1038  {
1040  maLayoutIdle.Start();
1041  }
1042  vcl::Window::queue_resize(eReason);
1043 }
1044 
1045 IMPL_LINK_NOARG(DockingWindow, ImplHandleLayoutTimerHdl, Timer*, void)
1046 {
1047  if (!isLayoutEnabled())
1048  {
1049  SAL_WARN_IF(GetWindow(GetWindowType::FirstChild), "vcl.layout", "DockingWindow has become non-layout because extra children have been added directly to it.");
1050  return;
1051  }
1052  setPosSizeOnContainee();
1053 }
1054 
1056 {
1057  if ( mpFloatWin )
1059  maMinOutSize = rSize;
1060 }
1061 
1063 {
1064  if ( mpFloatWin )
1066  return maMinOutSize;
1067 }
1068 
1069 void DockingWindow::SetFloatingPos( const Point& rNewPos )
1070 {
1071  if ( mpFloatWin )
1072  mpFloatWin->SetPosPixel( rNewPos );
1073  else
1074  maFloatPos = rNewPos;
1075 }
1076 
1077 void DockingWindow::SetIdleDebugName( const char *pDebugName )
1078 {
1079  maLayoutIdle.SetDebugName( pDebugName );
1080 }
1081 
1083 {
1084  return mpFloatWin;
1085 }
1086 
1087 DropdownDockingWindow::DropdownDockingWindow(vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rFrame, bool bTearable)
1088  : DockingWindow(pParent,
1089  !bTearable ? OString("InterimDockParent") : OString("InterimTearableParent"),
1090  !bTearable ? OUString("vcl/ui/interimdockparent.ui") : OUString("vcl/ui/interimtearableparent.ui"),
1091  rFrame)
1092  , m_xBox(m_pUIBuilder->get("box"))
1093 {
1094 }
1095 
1097 {
1098  disposeOnce();
1099 }
1100 
1102 {
1103  m_xBox.clear();
1105 }
1106 
1107 ResizableDockingWindow::ResizableDockingWindow(vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rFrame)
1108  : DockingWindow(pParent, "DockingWindow", "vcl/ui/dockingwindow.ui", rFrame)
1109  , m_xBox(m_pUIBuilder->get("box"))
1110 {
1111 }
1112 
1114  : DockingWindow(pParent, nStyle)
1115 {
1116 }
1117 
1118 // needed to blow away the cached size of the boundary between vcl and hosted child widget
1120 {
1121  // find the bottom vcl::Window of the hierarchy and queue_resize on that
1122  // one will invalidate all the size caches upwards
1124  while (true)
1125  {
1126  vcl::Window* pSubChild = pChild->GetWindow(GetWindowType::FirstChild);
1127  if (!pSubChild)
1128  break;
1129  pChild = pSubChild;
1130  }
1131  pChild->queue_resize();
1132 }
1133 
1135 {
1136  disposeOnce();
1137 }
1138 
1140 {
1141  m_xBox.clear();
1143 }
1144 
1145 /* 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:2780
void setOptimalLayoutSize()
Definition: dockwin.cxx:977
void SetOutputSizePixel(const Size &rNewSize) override
Definition: dockwin.cxx:877
void SetPos(const Point &rPoint)
bool IsControlBackground() const
Definition: window2.cxx:1086
bool IsInputEnabled() const
Definition: window2.cxx:1126
virtual void Move()
Definition: window.cxx:1823
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:1136
static void setLayoutAllocation(vcl::Window &rWindow, const Point &rPos, const Size &rSize)
Definition: layout.cxx:70
VclPtr< vcl::Window > m_xBox
Definition: dockwin.hxx:247
virtual void SetText(const OUString &rStr) override
Definition: dockwin.cxx:959
bool mbDocking
Definition: dockwin.hxx:133
SAL_DLLPRIVATE void DoInitialLayout()
Definition: dockwin.cxx:643
bool bVisible
ResizableDockingWindow(vcl::Window *pParent, const css::uno::Reference< css::frame::XFrame > &rFrame=css::uno::Reference< css::frame::XFrame >())
Definition: dockwin.cxx:1107
WinBits const WB_SYSTEMWINDOW
SystemWindow * GetFloatingWindow() const
Definition: dockwin.cxx:1082
constexpr sal_uInt16 KEY_MOD1
Definition: keycodes.hxx:31
Idle maLayoutIdle
Definition: dockwin.hxx:132
virtual bool PrepareToggleFloatingMode()
Definition: dockwin.cxx:616
virtual void Tracking(const TrackingEvent &rTEvt) override
Definition: dockwin.cxx:406
const Size & GetMinOutputSizePixel() const
Definition: dockwin.cxx:1062
tools::Long AdjustRight(tools::Long nHorzMoveDelta)
void setWidth(tools::Long nWidth)
bool IsDockable() const
Definition: dockwin.hxx:204
bool IsBackground() const
Definition: window3.cxx:64
SAL_DLLPRIVATE void setPosSizeOnContainee()
Definition: dockwin.cxx:993
WinBits const WB_NODIALOGCONTROL
Resize runs before repaint, so we won't paint twice.
SAL_DLLPRIVATE Point ImplOutputToFrame(const Point &rPos)
Definition: window2.cxx:936
Point AbsoluteScreenToOutputPixel(const Point &rPos) const
Definition: window.cxx:2851
int GetY() const
Definition: windowstate.hxx:62
sal_Int32 mnDockRight
Definition: dockwin.hxx:129
static Size getLayoutRequisition(const vcl::Window &rWindow)
Definition: layout.cxx:145
long Long
void disposeAndClear()
Definition: vclptr.hxx:200
SAL_DLLPRIVATE void SetIdleDebugName(const char *pDebugName)
Definition: dockwin.cxx:1077
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:1306
void HideTracking()
Definition: window2.cxx:149
int GetX() const
Definition: windowstate.hxx:60
virtual Size GetSizePixel() const
Definition: window.cxx:2391
SAL_DLLPRIVATE vcl::Window * ImplGetFrameWindow() const
Definition: window2.cxx:900
void SetFloatingPos(const Point &rNewPos)
Definition: dockwin.cxx:1069
const Size & GetMaxOutputSizePixel() const
Definition: syswin.cxx:401
static ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
Post a user event to the default window.
Definition: svapp.cxx:1025
sal_uInt16 GetCode() const
Definition: keycod.hxx:51
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:2785
virtual void SetSettings(const AllSettings &rSettings)
Definition: outdev.cxx:217
virtual void Resizing(Size &rSize)
Definition: syswin.cxx:295
const Color & GetControlBackground() const
Definition: window2.cxx:1081
bool IsCreatedWithToolkit() const
Definition: window2.cxx:1236
SAL_DLLPRIVATE void ImplUpdateAll()
Definition: paint.cxx:989
bool IsDockingCanceled() const
Definition: dockwin.hxx:205
Point GetPosPixel() const override
Definition: dockwin.cxx:843
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:102
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:2422
tools::Long Left() const
virtual Size GetOptimalSize() const override
Definition: dockwin.cxx:1009
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:579
virtual void setPosSizePixel(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags=PosSizeFlags::All) override
Definition: dockwin.cxx:818
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:369
void SetFloatStyle(WinBits nWinStyle)
Definition: dockwin.cxx:795
constexpr tools::Long GetWidth() const
virtual void queue_resize(StateChangedType eReason=StateChangedType::Layout)
Definition: window2.cxx:1326
bool mbHideBtn
Definition: dockwin.hxx:133
virtual void SetOutputSizePixel(const Size &rNewSize)
Definition: window2.cxx:1273
sal_uInt16 GetModifier() const
Definition: keycod.hxx:54
virtual void queue_resize(StateChangedType eReason=StateChangedType::Layout) override
Definition: dockwin.cxx:1026
WinBits mnFloatBits
Definition: dockwin.hxx:131
tools::Long AdjustBottom(tools::Long nVertMoveDelta)
virtual bool Docking(const Point &rPos, tools::Rectangle &rRect)
Definition: dockwin.cxx:584
Size GetOutputSizePixel() const
Definition: dockwin.cxx:895
#define MOUSE_LEFT
Definition: event.hxx:102
const Size & GetMinOutputSizePixel() const
Definition: syswin.hxx:176
void InvalidateChildSizeCache()
Definition: dockwin.cxx:1119
constexpr OUStringLiteral aData
virtual void EndDocking(const tools::Rectangle &rRect, bool bFloatMode)
Definition: dockwin.cxx:589
void SetDebugName(const char *pDebugName)
Definition: task.hxx:82
bool isLayoutEnabled() const
Definition: dockwin.cxx:971
bool IsAlwaysOnTopEnabled() const
Definition: window2.cxx:1142
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:2482
void SetMinOutputSizePixel(const Size &rSize)
Definition: syswin.cxx:369
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:1087
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:391
tools::Long mnTrackX
Definition: dockwin.hxx:123
bool mbIsCalculatingInitialLayoutSize
Definition: dockwin.hxx:133
void SetActivateMode(ActivateModeFlags nMode)
Definition: window.cxx:2624
VclPtr< vcl::Window > mpParent
Definition: dockwin.cxx:45
Window(WindowType nType)
Definition: window.cxx:92
Point maFloatPos
Definition: dockwin.hxx:119
bool IsFloatingMode() const
Definition: dockwin.cxx:943
virtual ~DockingWindow() override
Definition: dockwin.cxx:386
void ToTop(ToTopFlags nFlags=ToTopFlags::NONE)
Definition: stacking.cxx:418
void SetMaxOutputSizePixel(const Size &rSize)
Definition: syswin.cxx:382
VclPtr< vcl::Window > m_xBox
Definition: dockwin.hxx:235
ImplDockingWindowWrapper.
void SetParent(vcl::Window *pNewParent)
Definition: stacking.cxx:831
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
Definition: paint.cxx:1144
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:496
void SetFloatingMode(bool bFloatMode)
Definition: dockwin.cxx:694
virtual void Resize()
Definition: window.cxx:1825
Size get_preferred_size() const
Definition: window2.cxx:1660
std::unique_ptr< VclBuilder > m_pUIBuilder
Definition: syswin.hxx:86
bool isLayoutEnabled(const vcl::Window *pWindow)
Definition: layout.cxx:2884
MouseNotifyEvent GetType() const
Definition: event.hxx:308
SAL_DLLPRIVATE void ImplInitDockingWindowData()
Definition: dockwin.cxx:280
tools::Long Top() const
Point ScreenToOutputPixel(const Point &rPos) const
Definition: window.cxx:2798
Size maMinOutSize
Definition: dockwin.hxx:122
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:1096
bool IsTrackingEnded() const
Definition: event.hxx:261
Point OutputToAbsoluteScreenPixel(const Point &rPos) const
Definition: window.cxx:2841
virtual void StateChanged(StateChangedType nType) override
Definition: dockwin.cxx:658
virtual void SetPosSizePixel(const Point &rNewPos, const Size &rNewSize)
Definition: window2.cxx:1267
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:521
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:1134
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:2413
void GetWindowStateData(WindowStateData &rData) const
Definition: syswin.cxx:757
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:1139
Size GetSizePixel() const override
Definition: dockwin.cxx:860
const vcl::KeyCode & GetKeyCode() const
Definition: event.hxx:57
constexpr Size GetSize() const
bool IsShift() const
Definition: keycod.hxx:56
tools::Long mnTrackY
Definition: dockwin.hxx:124
Point GetFloatingPos() const
Definition: dockwin.cxx:912
SAL_DLLPRIVATE void ImplInitSettings()
Definition: dockwin.cxx:328
void AlwaysEnableInput(bool bAlways, bool bChild=true)
Override EnableInput.
Definition: window.cxx:2597
void Stop()
Definition: scheduler.cxx:590
DockingManager * ImplGetDockingManager()
Definition: svdata.cxx:300
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:1096
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:1101
void SetMaxOutputSizePixel(const Size &rSize)
Definition: dockwin.cxx:952
bool IsVisible() const
Definition: window2.cxx:1101
tools::Long mnTrackHeight
Definition: dockwin.hxx:126
::OutputDevice const * GetOutDev() const
Definition: window.cxx:565
virtual void doDeferredInit(WinBits nBits)
Definition: dockwin.cxx:361
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:58
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:941
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:1131
virtual OUString GetText() const override
Definition: dockwin.cxx:965
reference_type * get() const
Get the body.
Definition: vclptr.hxx:143
bool IsEnabled() const
Definition: window2.cxx:1121
tools::Long AdjustLeft(tools::Long nHorzMoveDelta)
virtual bool Close()
Definition: dockwin.cxx:621
sal_Int32 mnDockLeft
Definition: dockwin.hxx:127
bool IsTrackingCanceled() const
Definition: event.hxx:263
WinBits GetStyle() const
Definition: window2.cxx:952
Definition: timer.hxx:26
void SetPriority(TaskPriority ePriority)
Definition: scheduler.cxx:597
Point OutputToScreenPixel(const Point &rPos) const
Definition: window.cxx:2792
#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:682
const MouseEvent & GetMouseEvent() const
Definition: event.hxx:257
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle)
Definition: dockwin.cxx:313
virtual void Resizing(Size &rSize)
Definition: dockwin.cxx:639
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:807
void SetMinOutputSizePixel(const Size &rSize)
Definition: dockwin.cxx:1055
#define MOUSE_RIGHT
Definition: event.hxx:104
virtual void SetPosPixel(const Point &rNewPos)
Definition: window2.cxx:1256
bool isDisposed() const
virtual void Resize() override
Definition: syswin.cxx:1005
virtual void ToggleFloatingMode()
Definition: dockwin.cxx:635
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
static DockingManager * GetDockingManager()
Definition: window2.cxx:797
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:2177