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/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 #define DOCKWIN_FLOATSTYLES (WB_SIZEABLE | WB_MOVEABLE | WB_CLOSEABLE | WB_STANDALONE)
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 
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  mbDockBtn = false;
300  mbHideBtn = false;
301  mbIsDeferredInit = false;
303  mpDialogParent = nullptr;
304 
305  //To-Do, reuse maResizeTimer
307  maLayoutIdle.SetInvokeHandler( LINK( this, DockingWindow, ImplHandleLayoutTimerHdl ) );
308  maLayoutIdle.SetDebugName( "vcl::DockingWindow maLayoutIdle" );
309 }
310 
312 {
313  if ( !(nStyle & WB_NODIALOGCONTROL) )
314  nStyle |= WB_DIALOGCONTROL;
315 
316  mpImplData->mpParent = pParent;
317  mbDockable = (nStyle & WB_DOCKABLE) != 0;
319  nStyle &= ~(DOCKWIN_FLOATSTYLES | WB_BORDER);
320 
321  Window::ImplInit( pParent, nStyle, nullptr );
322 
324 }
325 
327 {
328  // Hack: to be able to build DockingWindows w/o background before switching
329  // TODO: Hack
330  if ( !IsBackground() )
331  return;
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 
346  Window(nType)
347 {
349 }
350 
353 {
355  ImplInit( pParent, nStyle );
356 }
357 
358 //Find the real parent stashed in mpDialogParent.
360 {
361  vcl::Window *pParent = mpDialogParent;
362  mpDialogParent = nullptr;
363  ImplInit(pParent, nBits);
364  mbIsDeferredInit = false;
365 }
366 
367 void DockingWindow::loadUI(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription,
368  const css::uno::Reference<css::frame::XFrame> &rFrame)
369 {
370  mbIsDeferredInit = true;
371  mpDialogParent = pParent; //should be unset in doDeferredInit
372  m_pUIBuilder.reset( new VclBuilder(this, AllSettings::GetUIRootDir(), rUIXMLDescription, rID, rFrame) );
373 }
374 
375 DockingWindow::DockingWindow(vcl::Window* pParent, const OString& rID,
376  const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame> &rFrame)
378 {
380 
381  loadUI(pParent, rID, rUIXMLDescription, rFrame);
382 }
383 
385 {
386  disposeOnce();
387 }
388 
390 {
391  if ( IsFloatingMode() )
392  {
393  Show( false, ShowFlags::NoFocusChange );
394  SetFloatingMode(false);
395  }
396  mpImplData.reset();
397  mpFloatWin.clear();
400  disposeBuilder();
401  Window::dispose();
402 }
403 
405 {
406  if( GetDockingManager()->IsDockable( this ) ) // new docking interface
407  return Window::Tracking( rTEvt );
408 
409  if ( !mbDocking )
410  return;
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 
520 {
521  if( GetDockingManager()->IsDockable( this ) ) // new docking interface
522  return Window::EventNotify( rNEvt );
523 
524  if ( mbDockable )
525  {
526  const bool bDockingSupportCrippled = !StyleSettings::GetDockingFloatsSupported();
527 
529  {
530  const MouseEvent* pMEvt = rNEvt.GetMouseEvent();
531  if ( pMEvt->IsLeft() )
532  {
533  if (!bDockingSupportCrippled && pMEvt->IsMod1() && (pMEvt->GetClicks() == 2) )
534  {
536  if ( IsFloatingMode() )
538  return true;
539  }
540  else if ( pMEvt->GetClicks() == 1 )
541  {
542  // check if window is floating standalone (IsFloating())
543  // or only partially floating and still docked with one border
544  // ( !mpWindowImpl->mbFrame)
545  if( ! IsFloatingMode() || ! mpFloatWin->mpWindowImpl->mbFrame )
546  {
547  Point aPos = pMEvt->GetPosPixel();
548  vcl::Window* pWindow = rNEvt.GetWindow();
549  if ( pWindow != this )
550  {
551  aPos = pWindow->OutputToScreenPixel( aPos );
552  aPos = ScreenToOutputPixel( aPos );
553  }
554  ImplStartDocking( aPos );
555  }
556  return true;
557  }
558  }
559  }
560  else if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
561  {
562  const vcl::KeyCode& rKey = rNEvt.GetKeyEvent()->GetKeyCode();
563  if( rKey.GetCode() == KEY_F10 && rKey.GetModifier() &&
564  rKey.IsShift() && rKey.IsMod1() && !bDockingSupportCrippled )
565  {
567  if ( IsFloatingMode() )
569  return true;
570  }
571  }
572  }
573 
574  return Window::EventNotify( rNEvt );
575 }
576 
578 {
579  mbDocking = true;
580 }
581 
583 {
584  return IsFloatingMode();
585 }
586 
587 void DockingWindow::EndDocking( const tools::Rectangle& rRect, bool bFloatMode )
588 {
589  bool bOrigDockCanceled = mbDockCanceled;
590  if (bFloatMode && !StyleSettings::GetDockingFloatsSupported())
591  mbDockCanceled = true;
592 
593  if ( !IsDockingCanceled() )
594  {
595  if ( bFloatMode != IsFloatingMode() )
596  {
597  SetFloatingMode( bFloatMode );
598  if ( IsFloatingMode() )
600  if ( bFloatMode && mpFloatWin )
601  mpFloatWin->SetPosSizePixel( rRect.TopLeft(), rRect.GetSize() );
602  }
603  if ( !bFloatMode )
604  {
605  Point aPos = rRect.TopLeft();
606  aPos = GetParent()->ScreenToOutputPixel( aPos );
607  Window::SetPosSizePixel( aPos, rRect.GetSize() );
608  }
609  }
610  mbDocking = false;
611  mbDockCanceled = bOrigDockCanceled;
612 }
613 
615 {
616  return true;
617 }
618 
620 {
621  VclPtr<vcl::Window> xWindow = this;
623  if ( xWindow->IsDisposed() )
624  return false;
625 
626  if ( mpWindowImpl->mxWindowPeer.is() && IsCreatedWithToolkit() )
627  return false;
628 
629  Show( false, ShowFlags::NoFocusChange );
630  return true;
631 }
632 
634 {
635 }
636 
638 {
639 }
640 
642 {
643  if (GetSettings().GetStyleSettings().GetAutoMnemonic())
644  Accelerator::GenerateAutoMnemonicsOnHierarchy(this);
645 
646  if (isLayoutEnabled())
647  {
650  if (IsFloatingMode())
653  }
654 }
655 
657 {
658  switch(nType)
659  {
661  DoInitialLayout();
662  break;
663 
666  Invalidate();
667  break;
668 
670  mbDockable = (GetStyle() & WB_DOCKABLE) != 0;
671  break;
672 
673  default:
674  break;
675  }
676 
677  Window::StateChanged( nType );
678 }
679 
681 {
682  if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) &&
683  (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) )
684  {
686  Invalidate();
687  }
688  else
689  Window::DataChanged( rDCEvt );
690 }
691 
692 void DockingWindow::SetFloatingMode( bool bFloatMode )
693 {
695  if( pWrapper )
696  {
697  pWrapper->SetFloatingMode( bFloatMode );
698  return;
699  }
700  if ( IsFloatingMode() == bFloatMode )
701  return;
702 
703  if ( !PrepareToggleFloatingMode() ) // changes to floating mode can be vetoed
704  return;
705 
706  bool bVisible = IsVisible();
707 
708  if ( bFloatMode )
709  {
710  // set deferred properties early, so border width will end up
711  // in our mpWindowImpl->mnBorderWidth, not in mpBorderWindow.
712  // (see its usage in setPosSizeOnContainee and GetOptimalSize.)
714 
715  Show( false, ShowFlags::NoFocusChange );
716 
717  maDockPos = Window::GetPosPixel();
718 
719  vcl::Window* pRealParent = mpWindowImpl->mpRealParent;
720  mpOldBorderWin = mpWindowImpl->mpBorderWindow;
721 
723  mpImplData->mpParent,
725  this );
726  mpFloatWin = pWin;
727  mpWindowImpl->mpBorderWindow = nullptr;
728  mpWindowImpl->mnLeftBorder = 0;
729  mpWindowImpl->mnTopBorder = 0;
730  mpWindowImpl->mnRightBorder = 0;
731  mpWindowImpl->mnBottomBorder = 0;
732  // if the parent gets destroyed, we also have to reset the parent of the BorderWindow
733  if ( mpOldBorderWin )
734  mpOldBorderWin->SetParent( pWin );
735 
736  // #i123765# reset the buffered DropTargets when undocking, else it may not
737  // be correctly initialized
738  mpWindowImpl->mxDNDListenerContainer.clear();
739 
740  SetParent( pWin );
741  SetPosPixel( Point() );
742  mpWindowImpl->mpBorderWindow = pWin;
743  pWin->mpWindowImpl->mpClientWindow = this;
744  mpWindowImpl->mpRealParent = pRealParent;
745  pWin->SetText( Window::GetText() );
746  Size aSize(Window::GetSizePixel());
747  pWin->SetOutputSizePixel(aSize);
748  pWin->SetPosPixel( maFloatPos );
749  // pass on DockingData to FloatingWindow
750  pWin->ShowTitleButton( TitleButton::Docking, mbDockBtn );
751  pWin->ShowTitleButton( TitleButton::Hide, mbHideBtn );
752  pWin->SetMinOutputSizePixel( maMinOutSize );
753 
754  pWin->SetMaxOutputSizePixel( mpImplData->maMaxOutSize );
755 
757 
758  if ( bVisible )
759  Show();
760  }
761  else
762  {
763  Show( false, ShowFlags::NoFocusChange );
764 
765  // store FloatingData in FloatingWindow
770  mpImplData->maMaxOutSize = mpFloatWin->GetMaxOutputSizePixel();
771 
772  vcl::Window* pRealParent = mpWindowImpl->mpRealParent;
773  mpWindowImpl->mpBorderWindow = nullptr;
774  if ( mpOldBorderWin )
775  {
777  static_cast<ImplBorderWindow*>(mpOldBorderWin.get())->GetBorder( mpWindowImpl->mnLeftBorder, mpWindowImpl->mnTopBorder, mpWindowImpl->mnRightBorder, mpWindowImpl->mnBottomBorder );
779  }
780  mpWindowImpl->mpBorderWindow = mpOldBorderWin;
781  SetParent( pRealParent );
782  mpWindowImpl->mpRealParent = pRealParent;
785 
787 
788  if ( bVisible )
789  Show();
790  }
791 }
792 
794 {
796  if( pWrapper )
797  {
798  pWrapper->SetFloatStyle( nStyle );
799  return;
800  }
801 
802  mnFloatBits = nStyle;
803 }
804 
806 {
808  if( pWrapper )
809  {
810  return pWrapper->GetFloatStyle();
811  }
812 
813  return mnFloatBits;
814 }
815 
817  tools::Long nWidth, tools::Long nHeight,
818  PosSizeFlags nFlags )
819 {
821  if (pWrapper)
822  {
823  if (!pWrapper->mpFloatWin)
824  Window::setPosSizePixel( nX, nY, nWidth, nHeight, nFlags );
825  }
826  else
827  {
828  if (!mpFloatWin)
829  Window::setPosSizePixel( nX, nY, nWidth, nHeight, nFlags );
830  else
831  {
832  mpFloatWin->SetOutputSizePixel(Size(nWidth, nHeight));
833  mpFloatWin->SetPosPixel(Point(nX, nY));
834  }
835  }
836 
837  if (::isLayoutEnabled(this))
839 }
840 
842 {
844  if( pWrapper )
845  {
846  if ( pWrapper->mpFloatWin )
847  return pWrapper->mpFloatWin->GetPosPixel();
848  else
849  return Window::GetPosPixel();
850  }
851 
852  if ( mpFloatWin )
853  return mpFloatWin->GetPosPixel();
854  else
855  return Window::GetPosPixel();
856 }
857 
859 {
861  if( pWrapper )
862  {
863  if ( pWrapper->mpFloatWin )
864  return pWrapper->mpFloatWin->GetSizePixel();
865  else
866  return Window::GetSizePixel();
867  }
868 
869  if ( mpFloatWin )
870  return mpFloatWin->GetSizePixel();
871  else
872  return Window::GetSizePixel();
873 }
874 
876 {
878  if( pWrapper )
879  {
880  if ( pWrapper->mpFloatWin )
881  pWrapper->mpFloatWin->SetOutputSizePixel( rNewSize );
882  else
883  Window::SetOutputSizePixel( rNewSize );
884  return;
885  }
886 
887  if ( mpFloatWin )
888  mpFloatWin->SetOutputSizePixel( rNewSize );
889  else
890  Window::SetOutputSizePixel( rNewSize );
891 }
892 
894 {
896  if( pWrapper )
897  {
898  if ( pWrapper->mpFloatWin )
899  return pWrapper->mpFloatWin->GetOutputSizePixel();
900  else
901  return Window::GetOutputSizePixel();
902  }
903 
904  if ( mpFloatWin )
905  return mpFloatWin->GetOutputSizePixel();
906  else
907  return Window::GetOutputSizePixel();
908 }
909 
911 {
913  if( pWrapper )
914  {
915  if ( pWrapper->mpFloatWin )
916  {
918  aData.SetMask( WindowStateMask::Pos );
919  pWrapper->mpFloatWin->GetWindowStateData( aData );
920  Point aPos( aData.GetX(), aData.GetY() );
921  aPos = pWrapper->mpFloatWin->GetParent()->ImplGetFrameWindow()->AbsoluteScreenToOutputPixel( aPos );
922  return aPos;
923  }
924  else
925  return maFloatPos;
926  }
927 
928  if ( mpFloatWin )
929  {
931  aData.SetMask( WindowStateMask::Pos );
932  mpFloatWin->GetWindowStateData( aData );
933  Point aPos( aData.GetX(), aData.GetY() );
935  return aPos;
936  }
937  else
938  return maFloatPos;
939 }
940 
942 {
944  if( pWrapper )
945  return pWrapper->IsFloatingMode();
946  else
947  return (mpFloatWin != nullptr);
948 }
949 
951 {
952  if ( mpFloatWin )
954  mpImplData->maMaxOutSize = rSize;
955 }
956 
957 void DockingWindow::SetText(const OUString& rStr)
958 {
960  Window::SetText(rStr);
961 }
962 
963 OUString DockingWindow::GetText() const
964 {
965  const_cast<DockingWindow*>(this)->setDeferredProperties();
966  return Window::GetText();
967 }
968 
970 {
971  //pre dtor called, and single child is a container => we're layout enabled
972  return mpImplData && ::isLayoutEnabled(this);
973 }
974 
976 {
977  maLayoutIdle.Stop();
978 
979  //resize DockingWindow to fit requisition on initial show
980  Size aSize = get_preferred_size();
981 
983 
984  aSize.setWidth( std::min(aMax.Width(), aSize.Width()) );
985  aSize.setHeight( std::min(aMax.Height(), aSize.Height()) );
986 
987  SetMinOutputSizePixel(aSize);
989 }
990 
992 {
993  Size aSize = GetOutputSizePixel();
994 
995  // Don't make the border width accessible via get_border_width(),
996  // otherwise the floating window will handle the border as well.
997  sal_Int32 nBorderWidth = mpWindowImpl->mnBorderWidth;
998 
999  aSize.AdjustWidth( -(2 * nBorderWidth) );
1000  aSize.AdjustHeight( -(2 * nBorderWidth) );
1001 
1003  assert(pBox);
1004  VclContainer::setLayoutAllocation(*pBox, Point(nBorderWidth, nBorderWidth), aSize);
1005 }
1006 
1008 {
1009  if (!isLayoutEnabled())
1010  return Window::GetOptimalSize();
1011 
1013 
1014  // Don't make the border width accessible via get_border_width(),
1015  // otherwise the floating window will handle the border as well.
1016  sal_Int32 nBorderWidth = mpWindowImpl->mnBorderWidth;
1017 
1018  aSize.AdjustHeight(2 * nBorderWidth );
1019  aSize.AdjustWidth(2 * nBorderWidth );
1020 
1021  return aSize;
1022 }
1023 
1025 {
1026  bool bTriggerLayout = true;
1028  {
1029  bTriggerLayout = false;
1030  }
1031  if (!isLayoutEnabled())
1032  {
1033  bTriggerLayout = false;
1034  }
1035  if (bTriggerLayout)
1036  {
1038  maLayoutIdle.Start();
1039  }
1040  vcl::Window::queue_resize(eReason);
1041 }
1042 
1043 IMPL_LINK_NOARG(DockingWindow, ImplHandleLayoutTimerHdl, Timer*, void)
1044 {
1045  if (!isLayoutEnabled())
1046  {
1047  SAL_WARN_IF(GetWindow(GetWindowType::FirstChild), "vcl.layout", "DockingWindow has become non-layout because extra children have been added directly to it.");
1048  return;
1049  }
1050  setPosSizeOnContainee();
1051 }
1052 
1054 {
1055  if ( mpFloatWin )
1057  maMinOutSize = rSize;
1058 }
1059 
1061 {
1062  if ( mpFloatWin )
1064  return maMinOutSize;
1065 }
1066 
1067 void DockingWindow::SetFloatingPos( const Point& rNewPos )
1068 {
1069  if ( mpFloatWin )
1070  mpFloatWin->SetPosPixel( rNewPos );
1071  else
1072  maFloatPos = rNewPos;
1073 }
1074 
1075 void DockingWindow::SetIdleDebugName( const char *pDebugName )
1076 {
1077  maLayoutIdle.SetDebugName( pDebugName );
1078 }
1079 
1080 DropdownDockingWindow::DropdownDockingWindow(vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rFrame, bool bTearable)
1081  : DockingWindow(pParent,
1082  !bTearable ? OString("InterimDockParent") : OString("InterimTearableParent"),
1083  !bTearable ? OUString("vcl/ui/interimdockparent.ui") : OUString("vcl/ui/interimtearableparent.ui"),
1084  rFrame)
1085  , m_xBox(m_pUIBuilder->get("box"))
1086 {
1087 }
1088 
1090 {
1091  disposeOnce();
1092 }
1093 
1095 {
1096  m_xBox.clear();
1098 }
1099 
1100 ResizableDockingWindow::ResizableDockingWindow(vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rFrame)
1101  : DockingWindow(pParent, "DockingWindow", "vcl/ui/dockingwindow.ui", rFrame)
1102  , m_xBox(m_pUIBuilder->get("box"))
1103 {
1104 }
1105 
1107  : DockingWindow(pParent, nStyle)
1108 {
1109 }
1110 
1112 {
1113  disposeOnce();
1114 }
1115 
1117 {
1118  m_xBox.clear();
1120 }
1121 
1122 /* 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:2782
Point TopLeft() const
void setOptimalLayoutSize()
Definition: dockwin.cxx:975
void SetOutputSizePixel(const Size &rNewSize) override
Definition: dockwin.cxx:875
void SetPos(const Point &rPoint)
bool IsControlBackground() const
Definition: window2.cxx:1085
bool IsInputEnabled() const
Definition: window2.cxx:1125
virtual void Move()
Definition: window.cxx:1825
WinBits const WB_DOCKABLE
bool mbLastFloatMode
Definition: dockwin.hxx:235
void setDeferredProperties()
Definition: dialog.cxx:1574
ActivateModeFlags GetActivateMode() const
Definition: window2.cxx:1135
static void setLayoutAllocation(vcl::Window &rWindow, const Point &rPos, const Size &rSize)
Definition: layout.cxx:68
VclPtr< vcl::Window > m_xBox
Definition: dockwin.hxx:349
virtual void SetText(const OUString &rStr) override
Definition: dockwin.cxx:957
bool mbDocking
Definition: dockwin.hxx:235
SAL_DLLPRIVATE void DoInitialLayout()
Definition: dockwin.cxx:641
bool bVisible
ResizableDockingWindow(vcl::Window *pParent, const css::uno::Reference< css::frame::XFrame > &rFrame=css::uno::Reference< css::frame::XFrame >())
Definition: dockwin.cxx:1100
WinBits const WB_SYSTEMWINDOW
constexpr sal_uInt16 KEY_MOD1
Definition: keycodes.hxx:31
Idle maLayoutIdle
Definition: dockwin.hxx:234
virtual bool PrepareToggleFloatingMode()
Definition: dockwin.cxx:614
virtual void Tracking(const TrackingEvent &rTEvt) override
Definition: dockwin.cxx:404
const Size & GetMinOutputSizePixel() const
Definition: dockwin.cxx:1060
tools::Long AdjustRight(tools::Long nHorzMoveDelta)
void setWidth(tools::Long nWidth)
bool IsDockable() const
Definition: dockwin.hxx:306
SAL_DLLPRIVATE void setPosSizeOnContainee()
Definition: dockwin.cxx:991
WinBits const WB_NODIALOGCONTROL
bool IsBackground() const
Definition: outdev.hxx:650
Resize runs before repaint, so we won't paint twice.
SAL_DLLPRIVATE Point ImplOutputToFrame(const Point &rPos)
Definition: window2.cxx:935
Point AbsoluteScreenToOutputPixel(const Point &rPos) const
Definition: window.cxx:2853
int GetY() const
Definition: windowstate.hxx:62
sal_Int32 mnDockRight
Definition: dockwin.hxx:231
static Size getLayoutRequisition(const vcl::Window &rWindow)
Definition: layout.cxx:143
long Long
void disposeAndClear()
Definition: vclptr.hxx:200
SAL_DLLPRIVATE void SetIdleDebugName(const char *pDebugName)
Definition: dockwin.cxx:1075
const StyleSettings & GetStyleSettings() const
bool mbIsDeferredInit
Definition: dockwin.hxx:246
Point maDockPos
Definition: dockwin.hxx:222
const Color & GetFaceColor() const
bool mbDockBtn
Definition: dockwin.hxx:235
Important idle events to be run before processing drawing events.
void InvalidateSizeCache()
clear OptimalSize cache
Definition: window2.cxx:1305
void HideTracking()
Definition: window2.cxx:147
int GetX() const
Definition: windowstate.hxx:60
virtual Size GetSizePixel() const
Definition: window.cxx:2393
SAL_DLLPRIVATE vcl::Window * ImplGetFrameWindow() const
Definition: window2.cxx:899
void SetFloatingPos(const Point &rNewPos)
Definition: dockwin.cxx:1067
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:1020
sal_uInt16 GetCode() const
Definition: keycod.hxx:51
tools::Long GetWidth() const
PosSizeFlags
Definition: window.hxx:140
DataChangedEventType GetType() const
Definition: event.hxx:356
const KeyEvent * GetKeyEvent() const
Definition: event.hxx:310
#define DOCKWIN_FLOATSTYLES
Definition: dockwin.cxx:36
Point maMouseOff
Definition: dockwin.hxx:223
tools::Rectangle GetDesktopRectPixel() const
Definition: window.cxx:2787
virtual void Resizing(Size &rSize)
Definition: syswin.cxx:295
virtual void SetSettings(const AllSettings &rSettings) override
const Color & GetControlBackground() const
Definition: window2.cxx:1080
bool IsCreatedWithToolkit() const
Definition: window2.cxx:1235
SAL_DLLPRIVATE void ImplUpdateAll()
Definition: paint.cxx:985
bool IsDockingCanceled() const
Definition: dockwin.hxx:307
Point GetPosPixel() const override
Definition: dockwin.cxx:841
void StartTracking(StartTrackingFlags nFlags=StartTrackingFlags::NONE)
Definition: window2.cxx:242
bool IsFloatingMode() const
Definition: dockmgr.cxx:1039
DockingWindow(const DockingWindow &)=delete
void ImplStartDocking(const Point &rPos)
Definition: dockwin.cxx:227
bool IsActive() const
Definition: task.hxx:91
StateChangedType
Definition: window.hxx:317
sal_uInt16 GetClicks() const
Definition: event.hxx:123
sal_Int64 WinBits
vcl::Window * GetWindow() const
Definition: event.hxx:303
void SetBackground()
IMPL_LINK_NOARG(ImplDockFloatWin, DockTimerHdl, Timer *, void)
Definition: dockwin.cxx:124
void Enable(bool bEnable=true, bool bChild=true)
Definition: window.cxx:2424
tools::Long Left() const
virtual Size GetOptimalSize() const override
Definition: dockwin.cxx:1007
Creates a hierarchy of vcl::Windows (widgets) from a .ui file for dialogs, sidebar, etc.
Definition: builder.hxx:65
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
void EnableAlwaysOnTop(bool bEnable=true)
Definition: stacking.cxx:594
void ShowTracking(const tools::Rectangle &rRect, ShowTrackFlags nFlags=ShowTrackFlags::Small)
Definition: window2.cxx:124
virtual void StartDocking()
Definition: dockwin.cxx:577
virtual void setPosSizePixel(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags=PosSizeFlags::All) override
Definition: dockwin.cxx:816
AllSettingsFlags GetFlags() const
Definition: event.hxx:357
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:367
void SetFloatStyle(WinBits nWinStyle)
Definition: dockwin.cxx:793
virtual void queue_resize(StateChangedType eReason=StateChangedType::Layout)
Definition: window2.cxx:1325
bool mbHideBtn
Definition: dockwin.hxx:235
virtual void SetOutputSizePixel(const Size &rNewSize)
Definition: window2.cxx:1272
sal_uInt16 GetModifier() const
Definition: keycod.hxx:54
virtual void queue_resize(StateChangedType eReason=StateChangedType::Layout) override
Definition: dockwin.cxx:1024
WinBits mnFloatBits
Definition: dockwin.hxx:233
tools::Long AdjustBottom(tools::Long nVertMoveDelta)
virtual bool Docking(const Point &rPos, tools::Rectangle &rRect)
Definition: dockwin.cxx:582
Size GetOutputSizePixel() const
Definition: dockwin.cxx:893
#define MOUSE_LEFT
Definition: event.hxx:99
const Size & GetMinOutputSizePixel() const
Definition: syswin.hxx:178
constexpr OUStringLiteral aData
virtual void EndDocking(const tools::Rectangle &rRect, bool bFloatMode)
Definition: dockwin.cxx:587
void SetDebugName(const char *pDebugName)
Definition: task.hxx:82
bool isLayoutEnabled() const
Definition: dockwin.cxx:969
bool IsAlwaysOnTopEnabled() const
Definition: window2.cxx:1141
sal_Int32 mnDockBottom
Definition: dockwin.hxx:232
static void RemoveUserEvent(ImplSVEvent *nUserEvent)
Remove user event based on event ID.
Definition: svapp.cxx:1048
void EnableInput(bool bEnable=true, bool bChild=true)
Definition: window.cxx:2484
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:1080
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:389
tools::Long mnTrackX
Definition: dockwin.hxx:225
bool mbIsCalculatingInitialLayoutSize
Definition: dockwin.hxx:235
void SetActivateMode(ActivateModeFlags nMode)
Definition: window.cxx:2626
VclPtr< vcl::Window > mpParent
Definition: dockwin.cxx:43
Window(WindowType nType)
Definition: window.cxx:91
Point maFloatPos
Definition: dockwin.hxx:221
bool IsFloatingMode() const
Definition: dockwin.cxx:941
virtual ~DockingWindow() override
Definition: dockwin.cxx:384
void ToTop(ToTopFlags nFlags=ToTopFlags::NONE)
Definition: stacking.cxx:418
void SetMaxOutputSizePixel(const Size &rSize)
Definition: syswin.cxx:382
WinBits GetFloatStyle() const
Definition: dockwin.hxx:161
VclPtr< vcl::Window > m_xBox
Definition: dockwin.hxx:337
ImplDockingWindowWrapper.
Definition: dockwin.hxx:72
void SetParent(vcl::Window *pNewParent)
Definition: stacking.cxx:831
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
Definition: paint.cxx:1158
ShowTrackFlags
Definition: window.hxx:275
VclPtr< FloatingWindow > mpFloatWin
Definition: dockwin.hxx:84
tools::Long Width() const
bool mbDockable
Definition: dockwin.hxx:235
std::unique_ptr< WindowImpl > mpWindowImpl
Definition: window.hxx:521
void SetFloatingMode(bool bFloatMode)
Definition: dockwin.cxx:692
virtual void Resize()
Definition: window.cxx:1827
Size get_preferred_size() const
Definition: window2.cxx:1659
std::unique_ptr< VclBuilder > m_pUIBuilder
Definition: syswin.hxx:87
bool isLayoutEnabled(const vcl::Window *pWindow)
Definition: layout.cxx:2866
MouseNotifyEvent GetType() const
Definition: event.hxx:302
const AllSettings & GetSettings() const
Definition: outdev.hxx:418
Size GetOutputSizePixel() const
Definition: outdev.hxx:441
SAL_DLLPRIVATE void ImplInitDockingWindowData()
Definition: dockwin.cxx:278
tools::Long Top() const
Point ScreenToOutputPixel(const Point &rPos) const
Definition: window.cxx:2800
Size maMinOutSize
Definition: dockwin.hxx:224
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:1095
bool IsTrackingEnded() const
Definition: event.hxx:263
Point OutputToAbsoluteScreenPixel(const Point &rPos) const
Definition: window.cxx:2843
virtual void StateChanged(StateChangedType nType) override
Definition: dockwin.cxx:656
Size GetSize() const
virtual void SetPosSizePixel(const Point &rNewPos, const Size &rNewSize)
Definition: window2.cxx:1266
void SetFloatingMode(bool bFloatMode)
Definition: dockmgr.cxx:884
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:519
void SetMask(WindowStateMask nValidMask)
Definition: windowstate.hxx:56
tools::Long mnTrackWidth
Definition: dockwin.hxx:227
VclPtr< vcl::Window > mpOldBorderWin
Definition: dockwin.hxx:219
WinBits const WB_3DLOOK
virtual ~ResizableDockingWindow() override
Definition: dockwin.cxx:1111
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:2415
void GetWindowStateData(WindowStateData &rData) const
Definition: syswin.cxx:758
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:1116
Size GetSizePixel() const override
Definition: dockwin.cxx:858
const vcl::KeyCode & GetKeyCode() const
Definition: event.hxx:54
bool IsShift() const
Definition: keycod.hxx:56
tools::Long mnTrackY
Definition: dockwin.hxx:226
Point GetFloatingPos() const
Definition: dockwin.cxx:910
SAL_DLLPRIVATE void ImplInitSettings()
Definition: dockwin.cxx:326
void AlwaysEnableInput(bool bAlways, bool bChild=true)
Override EnableInput.
Definition: window.cxx:2599
void Stop()
Definition: scheduler.cxx:593
DockingManager * ImplGetDockingManager()
Definition: svdata.cxx:299
WindowType
static bool GetDockingFloatsSupported()
bool IsSynthetic() const
Definition: event.hxx:139
#define SAL_WARN_IF(condition, area, stream)
WinBits const WB_BORDER
virtual ~DropdownDockingWindow() override
Definition: dockwin.cxx:1089
const MouseEvent * GetMouseEvent() const
Definition: event.hxx:318
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
Definition: dockwin.cxx:1094
void SetMaxOutputSizePixel(const Size &rSize)
Definition: dockwin.cxx:950
bool IsVisible() const
Definition: window2.cxx:1100
tools::Long mnTrackHeight
Definition: dockwin.hxx:228
virtual void doDeferredInit(WinBits nBits)
Definition: dockwin.cxx:359
ImplDockingWindowWrapper * GetDockingWindowWrapper(const vcl::Window *pWin)
Definition: dockmgr.cxx:278
bool IsLeft() const
Definition: event.hxx:146
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:230
SAL_DLLPRIVATE Point ImplFrameToOutput(const Point &rPos)
Definition: window2.cxx:940
tools::Long Height() const
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()
tools::Long AdjustHeight(tools::Long n)
std::unique_ptr< ImplData > mpImplData
Definition: dockwin.hxx:220
bool IsDisposed() const
Definition: window.cxx:142
void setHeight(tools::Long nHeight)
tools::Long GetHeight() const
bool mbStartFloat
Definition: dockwin.hxx:235
bool IsAlwaysEnableInput() const
returns the current AlwaysEnableInput state
Definition: window2.cxx:1130
virtual OUString GetText() const override
Definition: dockwin.cxx:963
reference_type * get() const
Get the body.
Definition: vclptr.hxx:143
bool IsEnabled() const
Definition: window2.cxx:1120
tools::Long AdjustLeft(tools::Long nHorzMoveDelta)
virtual bool Close()
Definition: dockwin.cxx:619
sal_Int32 mnDockLeft
Definition: dockwin.hxx:229
bool IsTrackingCanceled() const
Definition: event.hxx:265
WinBits GetStyle() const
Definition: window2.cxx:951
Definition: timer.hxx:26
void SetPriority(TaskPriority ePriority)
Definition: scheduler.cxx:600
Point OutputToScreenPixel(const Point &rPos) const
Definition: window.cxx:2794
#define MOUSE_MIDDLE
Definition: event.hxx:100
WinBits const WB_CLOSEABLE
WinBits const WB_MOVEABLE
VclPtr< FloatingWindow > mpFloatWin
Definition: dockwin.hxx:218
void CallEventListeners(VclEventId nEvent, void *pData=nullptr)
Definition: event.cxx:216
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
Definition: dockwin.cxx:680
const MouseEvent & GetMouseEvent() const
Definition: event.hxx:259
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle)
Definition: dockwin.cxx:311
virtual void Resizing(Size &rSize)
Definition: dockwin.cxx:637
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:586
WinBits GetFloatStyle() const
Definition: dockwin.cxx:805
void SetMinOutputSizePixel(const Size &rSize)
Definition: dockwin.cxx:1053
#define MOUSE_RIGHT
Definition: event.hxx:101
virtual void SetPosPixel(const Point &rNewPos)
Definition: window2.cxx:1255
virtual void Resize() override
Definition: syswin.cxx:1006
virtual void ToggleFloatingMode()
Definition: dockwin.cxx:633
bool mbDockCanceled
Definition: dockwin.hxx:235
VclPtr< vcl::Window > mpDialogParent
Definition: dockwin.hxx:247
bool mbDragFull
Definition: dockwin.hxx:235
An idle is a timer to be scheduled immediately.
Definition: idle.hxx:34
static DockingManager * GetDockingManager()
Definition: window2.cxx:801
void SetFloatStyle(WinBits nWinStyle)
Definition: dockmgr.cxx:991
Size bestmaxFrameSizeForScreenSize(const Size &rScreenSize)
Definition: dialog.cxx:705
bool IsMod1() const
Definition: event.hxx:157
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)
Definition: window.cxx:2179