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