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>
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
38
39#define DOCKWIN_FLOATSTYLES (WB_SIZEABLE | WB_MOVEABLE | WB_CLOSEABLE | WB_STANDALONE)
40
42{
43public:
44 ImplData();
45
48};
49
51{
52 mpParent = nullptr;
53 maMaxOutSize = Size( SHRT_MAX, SHRT_MAX );
54}
55
56namespace {
57
58class ImplDockFloatWin : public FloatingWindow
59{
60private:
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);
71public:
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
85ImplDockFloatWin::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
106
107 maDockIdle.SetInvokeHandler( LINK( this, ImplDockFloatWin, DockTimerHdl ) );
108 maDockIdle.SetPriority( TaskPriority::HIGH_IDLE );
109}
110
111ImplDockFloatWin::~ImplDockFloatWin()
112{
113 disposeOnce();
114}
115
116void ImplDockFloatWin::dispose()
117{
118 if( mnLastUserEvent )
119 Application::RemoveUserEvent( mnLastUserEvent );
120
121 disposeBuilder();
122
123 mpDockWin.clear();
125}
126
127IMPL_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
154IMPL_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
190void 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
212void ImplDockFloatWin::Resize()
213{
215 Size aSize( GetSizePixel() );
216 mpDockWin->ImplPosSizeWindow( 0, 0, aSize.Width(), aSize.Height(), PosSizeFlags::PosSize );
217}
218
219void ImplDockFloatWin::Resizing( Size& rSize )
220{
222 mpDockWin->Resizing( rSize );
223}
224
226{
227 return mpDockWin->Close();
228}
229
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 = OutputToScreenPixel( 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 {
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;
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
347DockingWindow::DockingWindow( WindowType nType, const char* pIdleDebugName ) :
348 Window(nType),
349 maLayoutIdle( pIdleDebugName )
350{
352}
353
354DockingWindow::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
371void DockingWindow::loadUI(vcl::Window* pParent, const OUString& 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
379DockingWindow::DockingWindow(vcl::Window* pParent, const OUString& 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 {
400 SetFloatingMode(false);
401 }
402 mpImplData.reset();
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 = OutputToScreenPixel( 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 = ScreenToOutputPixel( aFrameMousePos );
459 aMousePos.AdjustX( -(maMouseOff.X()) );
460 aMousePos.AdjustY( -(maMouseOff.Y()) );
461 Point aFramePos = OutputToScreenPixel( 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 {
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( ScreenToOutputPixel( 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() == NotifyEventType::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
593void 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
636 return true;
637}
638
640{
641}
642
644{
645}
646
648{
649 if (GetSettings().GetStyleSettings().GetAutoMnemonic())
651
652 if (isLayoutEnabled())
653 {
655 setDeferredProperties();
656 if (IsFloatingMode())
659 }
660}
661
663{
664 switch(nType)
665 {
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
698void 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.)
719 setDeferredProperties();
720
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 {
770
771 // store FloatingData in FloatingWindow
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 );
837 {
838 if ((nFlags & PosSizeFlags::Size) == PosSizeFlags::Size)
839 mpFloatWin->SetOutputSizePixel({ nWidth, nHeight });
840 if ((nFlags & PosSizeFlags::Pos) == PosSizeFlags::Pos)
841 mpFloatWin->SetPosPixel({ nX, nY });
842 }
843 }
844
845 if (::isLayoutEnabled(this))
847}
848
850{
852 if( pWrapper )
853 {
854 if ( pWrapper->mpFloatWin )
855 return pWrapper->mpFloatWin->GetPosPixel();
856 else
857 return Window::GetPosPixel();
858 }
859
860 if ( mpFloatWin )
861 return mpFloatWin->GetPosPixel();
862 else
863 return Window::GetPosPixel();
864}
865
867{
869 if( pWrapper )
870 {
871 if ( pWrapper->mpFloatWin )
872 return pWrapper->mpFloatWin->GetSizePixel();
873 else
874 return Window::GetSizePixel();
875 }
876
877 if ( mpFloatWin )
878 return mpFloatWin->GetSizePixel();
879 else
880 return Window::GetSizePixel();
881}
882
884{
886 if( pWrapper )
887 {
888 if ( pWrapper->mpFloatWin )
889 pWrapper->mpFloatWin->SetOutputSizePixel( rNewSize );
890 else
891 Window::SetOutputSizePixel( rNewSize );
892 return;
893 }
894
895 if ( mpFloatWin )
896 mpFloatWin->SetOutputSizePixel( rNewSize );
897 else
898 Window::SetOutputSizePixel( rNewSize );
899}
900
902{
904 if( pWrapper )
905 {
906 if ( pWrapper->mpFloatWin )
907 return pWrapper->mpFloatWin->GetOutputSizePixel();
908 else
909 return Window::GetOutputSizePixel();
910 }
911
912 if ( mpFloatWin )
914 else
915 return Window::GetOutputSizePixel();
916}
917
919{
921 if( pWrapper )
922 {
923 if ( pWrapper->mpFloatWin )
924 {
927 pWrapper->mpFloatWin->GetWindowState( aData );
928 Point aPos(aData.x(), aData.y());
929 // LOK needs logic coordinates not absolute screen position for autofilter menu
930 if (!comphelper::LibreOfficeKit::isActive() || get_id() != "check_list_menu")
932 return aPos;
933 }
934 else
935 return maFloatPos;
936 }
937
938 if ( mpFloatWin )
939 {
943 Point aPos(aData.x(), aData.y());
945 return aPos;
946 }
947 else
948 return maFloatPos;
949}
950
952{
954 if( pWrapper )
955 return pWrapper->IsFloatingMode();
956 else
957 return (mpFloatWin != nullptr);
958}
959
961{
962 if ( mpFloatWin )
964 mpImplData->maMaxOutSize = rSize;
965}
966
967void DockingWindow::SetText(const OUString& rStr)
968{
969 setDeferredProperties();
970 Window::SetText(rStr);
971}
972
974{
975 const_cast<DockingWindow*>(this)->setDeferredProperties();
976 return Window::GetText();
977}
978
980{
981 //pre dtor called, and single child is a container => we're layout enabled
982 return mpImplData && ::isLayoutEnabled(this);
983}
984
986{
988
989 //resize DockingWindow to fit requisition on initial show
990 Size aSize = get_preferred_size();
991
993
994 aSize.setWidth( std::min(aMax.Width(), aSize.Width()) );
995 aSize.setHeight( std::min(aMax.Height(), aSize.Height()) );
996
999}
1000
1002{
1003 Size aSize = GetOutputSizePixel();
1004
1005 // Don't make the border width accessible via get_border_width(),
1006 // otherwise the floating window will handle the border as well.
1007 sal_Int32 nBorderWidth = mpWindowImpl->mnBorderWidth;
1008
1009 aSize.AdjustWidth( -(2 * nBorderWidth) );
1010 aSize.AdjustHeight( -(2 * nBorderWidth) );
1011
1013 assert(pBox);
1015}
1016
1018{
1019 if (!isLayoutEnabled())
1020 return Window::GetOptimalSize();
1021
1023
1024 // Don't make the border width accessible via get_border_width(),
1025 // otherwise the floating window will handle the border as well.
1026 sal_Int32 nBorderWidth = mpWindowImpl->mnBorderWidth;
1027
1028 aSize.AdjustHeight(2 * nBorderWidth );
1029 aSize.AdjustWidth(2 * nBorderWidth );
1030
1031 return aSize;
1032}
1033
1035{
1036 bool bTriggerLayout = true;
1038 {
1039 bTriggerLayout = false;
1040 }
1041 if (!isLayoutEnabled())
1042 {
1043 bTriggerLayout = false;
1044 }
1045 if (bTriggerLayout)
1046 {
1049 }
1051}
1052
1053IMPL_LINK_NOARG(DockingWindow, ImplHandleLayoutTimerHdl, Timer*, void)
1054{
1055 if (!isLayoutEnabled())
1056 {
1057 SAL_WARN_IF(GetWindow(GetWindowType::FirstChild), "vcl.layout", "DockingWindow has become non-layout because extra children have been added directly to it.");
1058 return;
1059 }
1060 setPosSizeOnContainee();
1061}
1062
1064{
1065 if ( mpFloatWin )
1067 maMinOutSize = rSize;
1068}
1069
1071{
1072 if ( mpFloatWin )
1074 return maMinOutSize;
1075}
1076
1078{
1079 if ( mpFloatWin )
1080 mpFloatWin->SetPosPixel( rNewPos );
1081 else
1082 maFloatPos = rNewPos;
1083}
1084
1086{
1087 return mpFloatWin;
1088}
1089
1090DropdownDockingWindow::DropdownDockingWindow(vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rFrame, bool bTearable)
1091 : DockingWindow(pParent,
1092 !bTearable ? OUString("InterimDockParent") : OUString("InterimTearableParent"),
1093 !bTearable ? OUString("vcl/ui/interimdockparent.ui") : OUString("vcl/ui/interimtearableparent.ui"),
1094 "vcl::DropdownDockingWindow maLayoutIdle",
1095 rFrame)
1096 , m_xBox(m_pUIBuilder->get("box"))
1097{
1098}
1099
1101{
1102 disposeOnce();
1103}
1104
1106{
1107 m_xBox.clear();
1109}
1110
1111ResizableDockingWindow::ResizableDockingWindow(vcl::Window* pParent, const css::uno::Reference<css::frame::XFrame>& rFrame)
1112 : DockingWindow(pParent, "DockingWindow", "vcl/ui/dockingwindow.ui", "vcl::ResizableDockingWindow maLayoutIdle", rFrame)
1113 , m_xBox(m_pUIBuilder->get("box"))
1114{
1115}
1116
1118 : DockingWindow(pParent, nStyle, "vcl::ResizableDockingWindow maLayoutIdle")
1119{
1120}
1121
1122// needed to blow away the cached size of the boundary between vcl and hosted child widget
1124{
1125 // find the bottom vcl::Window of the hierarchy and queue_resize on that
1126 // one will invalidate all the size caches upwards
1128 while (true)
1129 {
1130 vcl::Window* pSubChild = pChild->GetWindow(GetWindowType::FirstChild);
1131 if (!pSubChild)
1132 break;
1133 pChild = pSubChild;
1134 }
1135 pChild->queue_resize();
1136}
1137
1139{
1140 disposeOnce();
1141}
1142
1144{
1145 m_xBox.clear();
1147}
1148
1149/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
constexpr int nBorderWidth
const StyleSettings & GetStyleSettings() const
static OUString GetUIRootDir()
Definition: dialog.cxx:557
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:999
static void RemoveUserEvent(ImplSVEvent *nUserEvent)
Remove user event based on event ID.
Definition: svapp.cxx:1023
DataChangedEventType GetType() const
Definition: event.hxx:362
AllSettingsFlags GetFlags() const
Definition: event.hxx:363
ImplDockingWindowWrapper * GetDockingWindowWrapper(const vcl::Window *pWin)
Definition: dockmgr.cxx:280
VclPtr< vcl::Window > mpParent
Definition: dockwin.cxx:46
Point GetFloatingPos() const
Definition: dockwin.cxx:918
virtual bool PrepareToggleFloatingMode()
Definition: dockwin.cxx:620
sal_Int32 mnDockLeft
Definition: dockwin.hxx:127
void SetMinOutputSizePixel(const Size &rSize)
Definition: dockwin.cxx:1063
bool mbIsDeferredInit
Definition: dockwin.hxx:144
SAL_DLLPRIVATE void ImplInitDockingWindowData()
Definition: dockwin.cxx:281
void SetOutputSizePixel(const Size &rNewSize) override
Definition: dockwin.cxx:883
bool mbStartFloat
Definition: dockwin.hxx:138
sal_Int32 mnDockBottom
Definition: dockwin.hxx:130
Point GetPosPixel() const override
Definition: dockwin.cxx:849
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
Definition: dockwin.cxx:686
SAL_DLLPRIVATE void setPosSizeOnContainee()
Definition: dockwin.cxx:1001
Point maMouseOff
Definition: dockwin.hxx:121
bool IsFloatingMode() const
Definition: dockwin.cxx:951
virtual void Resizing(Size &rSize)
Definition: dockwin.cxx:643
std::unique_ptr< ImplData > mpImplData
Definition: dockwin.hxx:118
virtual OUString GetText() const override
Definition: dockwin.cxx:973
void SetFloatingMode(bool bFloatMode)
Definition: dockwin.cxx:698
tools::Long mnTrackHeight
Definition: dockwin.hxx:126
virtual void SetText(const OUString &rStr) override
Definition: dockwin.cxx:967
virtual void StateChanged(StateChangedType nType) override
Definition: dockwin.cxx:662
SAL_DLLPRIVATE void ImplInit(vcl::Window *pParent, WinBits nStyle)
Definition: dockwin.cxx:313
virtual Size GetOptimalSize() const override
Definition: dockwin.cxx:1017
Size GetSizePixel() const override
Definition: dockwin.cxx:866
sal_Int32 mnDockRight
Definition: dockwin.hxx:129
void SetFloatStyle(WinBits nWinStyle)
Definition: dockwin.cxx:799
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
Point maDockPos
Definition: dockwin.hxx:120
virtual bool EventNotify(NotifyEvent &rNEvt) override
Definition: dockwin.cxx:525
virtual ~DockingWindow() override
Definition: dockwin.cxx:390
const Size & GetMinOutputSizePixel() const
Definition: dockwin.cxx:1070
Size GetOutputSizePixel() const
Definition: dockwin.cxx:901
tools::Long mnTrackWidth
Definition: dockwin.hxx:125
bool mbDragFull
Definition: dockwin.hxx:136
Point maFloatPos
Definition: dockwin.hxx:119
virtual void EndDocking(const tools::Rectangle &rRect, bool bFloatMode)
Definition: dockwin.cxx:593
SystemWindow * GetFloatingWindow() const
Definition: dockwin.cxx:1085
virtual bool Docking(const Point &rPos, tools::Rectangle &rRect)
Definition: dockwin.cxx:588
VclPtr< FloatingWindow > mpFloatWin
Definition: dockwin.hxx:116
void SetMaxOutputSizePixel(const Size &rSize)
Definition: dockwin.cxx:960
SAL_DLLPRIVATE void DoInitialLayout()
Definition: dockwin.cxx:647
void SetFloatingPos(const Point &rNewPos)
Definition: dockwin.cxx:1077
bool mbHideBtn
Definition: dockwin.hxx:140
bool mbLastFloatMode
Definition: dockwin.hxx:137
Size maMinOutSize
Definition: dockwin.hxx:122
WinBits GetFloatStyle() const
Definition: dockwin.cxx:811
void loadUI(vcl::Window *pParent, const OUString &rID, const OUString &rUIXMLDescription, const css::uno::Reference< css::frame::XFrame > &rFrame)
Definition: dockwin.cxx:371
virtual void Tracking(const TrackingEvent &rTEvt) override
Definition: dockwin.cxx:410
bool IsDockingCanceled() const
Definition: dockwin.hxx:203
bool mbDockBtn
Definition: dockwin.hxx:139
tools::Long mnTrackX
Definition: dockwin.hxx:123
DockingWindow(const DockingWindow &)=delete
virtual bool Close()
Definition: dockwin.cxx:625
SAL_DLLPRIVATE void ImplInitSettings()
Definition: dockwin.cxx:328
VclPtr< vcl::Window > mpOldBorderWin
Definition: dockwin.hxx:117
Idle maLayoutIdle
Definition: dockwin.hxx:132
bool mbDockCanceled
Definition: dockwin.hxx:133
VclPtr< vcl::Window > mpDialogParent
Definition: dockwin.hxx:145
bool mbIsCalculatingInitialLayoutSize
Definition: dockwin.hxx:141
bool mbDocking
Definition: dockwin.hxx:135
bool isLayoutEnabled() const
Definition: dockwin.cxx:979
void ImplStartDocking(const Point &rPos)
Definition: dockwin.cxx:230
void setOptimalLayoutSize()
Definition: dockwin.cxx:985
virtual void ToggleFloatingMode()
Definition: dockwin.cxx:639
bool mbDockable
Definition: dockwin.hxx:134
virtual void queue_resize(StateChangedType eReason=StateChangedType::Layout) override
Definition: dockwin.cxx:1034
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 mnTrackY
Definition: dockwin.hxx:124
bool IsDockable() const
Definition: dockwin.hxx:202
virtual void doDeferredInit(WinBits nBits)
Definition: dockwin.cxx:363
sal_Int32 mnDockTop
Definition: dockwin.hxx:128
WinBits mnFloatBits
Definition: dockwin.hxx:131
DropdownDockingWindow(vcl::Window *pParent, const css::uno::Reference< css::frame::XFrame > &rFrame=css::uno::Reference< css::frame::XFrame >(), bool bTearable=false)
Definition: dockwin.cxx:1090
VclPtr< vcl::Window > m_xBox
Definition: dockwin.hxx:233
virtual ~DropdownDockingWindow() override
Definition: dockwin.cxx:1100
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects.
Definition: dockwin.cxx:1105
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
An idle is a timer to be scheduled immediately.
Definition: idle.hxx:35
virtual void Start(bool bStartTimer=true) override
Schedules the task for execution.
Definition: idle.cxx:34
ImplDockingWindowWrapper.
void SetFloatStyle(WinBits nWinStyle)
Definition: dockmgr.cxx:991
bool IsFloatingMode() const
Definition: dockmgr.cxx:1039
VclPtr< FloatingWindow > mpFloatWin
void SetFloatingMode(bool bFloatMode)
Definition: dockmgr.cxx:884
const vcl::KeyCode & GetKeyCode() const
Definition: event.hxx:57
bool IsMod1() const
Definition: event.hxx:160
bool IsSynthetic() const
Definition: event.hxx:142
sal_uInt16 GetClicks() const
Definition: event.hxx:126
const Point & GetPosPixel() const
Definition: event.hxx:123
bool IsModifierChanged() const
Definition: event.hxx:144
bool IsLeft() const
Definition: event.hxx:149
const KeyEvent * GetKeyEvent() const
Definition: event.hxx:316
vcl::Window * GetWindow() const
Definition: event.hxx:309
const MouseEvent * GetMouseEvent() const
Definition: event.hxx:324
NotifyEventType GetType() const
Definition: event.hxx:308
virtual void SetSettings(const AllSettings &rSettings)
Definition: outdev.cxx:215
constexpr tools::Long Y() const
void setX(tools::Long nX)
void setY(tools::Long nY)
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long X() const
VclPtr< vcl::Window > m_xBox
Definition: dockwin.hxx:245
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects.
Definition: dockwin.cxx:1143
virtual ~ResizableDockingWindow() override
Definition: dockwin.cxx:1138
void InvalidateChildSizeCache()
Definition: dockwin.cxx:1123
ResizableDockingWindow(vcl::Window *pParent, const css::uno::Reference< css::frame::XFrame > &rFrame=css::uno::Reference< css::frame::XFrame >())
Definition: dockwin.cxx:1111
constexpr tools::Long Height() const
tools::Long AdjustHeight(tools::Long n)
void setWidth(tools::Long nWidth)
tools::Long AdjustWidth(tools::Long n)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
const Color & GetWindowColor() const
static bool GetDockingFloatsSupported()
const Color & GetFaceColor() const
const Size & GetMinOutputSizePixel() const
Definition: syswin.hxx:175
void SetMinOutputSizePixel(const Size &rSize)
Definition: syswin.cxx:365
virtual void Resizing(Size &rSize)
Definition: syswin.cxx:291
bool IsTitleButtonVisible(TitleButton nButton) const
Definition: syswin.cxx:357
const Size & GetMaxOutputSizePixel() const
Definition: syswin.cxx:397
void SetMaxOutputSizePixel(const Size &rSize)
Definition: syswin.cxx:378
OUString GetWindowState(vcl::WindowDataMask nMask=vcl::WindowDataMask::All) const
Definition: syswin.cxx:835
virtual void Resize() override
Definition: syswin.cxx:993
bool IsActive() const
Definition: task.hxx:101
void SetPriority(TaskPriority ePriority)
Definition: scheduler.cxx:606
void Stop()
Definition: scheduler.cxx:599
Definition: timer.hxx:27
void SetInvokeHandler(const Link< Timer *, void > &rLink)
Definition: timer.hxx:56
bool IsTrackingEnded() const
Definition: event.hxx:261
bool IsTrackingCanceled() const
Definition: event.hxx:263
const MouseEvent & GetMouseEvent() const
Definition: event.hxx:257
Creates a hierarchy of vcl::Windows (widgets) from a .ui file for dialogs, sidebar,...
Definition: builder.hxx:69
static void setLayoutAllocation(vcl::Window &rWindow, const Point &rPos, const Size &rSize)
Definition: layout.cxx:95
static Size getLayoutRequisition(const vcl::Window &rWindow)
Definition: layout.cxx:170
A construction helper for a temporary VclPtr.
Definition: vclptr.hxx:277
void disposeAndClear()
Definition: vclptr.hxx:200
void clear()
Definition: vclptr.hxx:190
reference_type * get() const
Get the body.
Definition: vclptr.hxx:143
static VclPtr< reference_type > Create(Arg &&... arg)
A construction helper for VclPtr.
Definition: vclptr.hxx:127
bool isDisposed() const
constexpr tools::Long GetWidth() const
constexpr tools::Long Top() const
constexpr Point TopLeft() const
void SetPos(const Point &rPoint)
constexpr Size GetSize() const
tools::Long AdjustTop(tools::Long nVertMoveDelta)
tools::Long AdjustRight(tools::Long nHorzMoveDelta)
constexpr tools::Long GetHeight() const
tools::Long AdjustBottom(tools::Long nVertMoveDelta)
tools::Long AdjustLeft(tools::Long nHorzMoveDelta)
constexpr tools::Long Left() const
static sal_uInt64 GetSystemTicks()
bool IsMod1() const
Definition: keycod.hxx:56
sal_uInt16 GetCode() const
Definition: keycod.hxx:49
sal_uInt16 GetModifier() const
Definition: keycod.hxx:52
bool IsShift() const
Definition: keycod.hxx:54
Point AbsoluteScreenToOutputPixel(const Point &rPos) const
Definition: window.cxx:2865
Point OutputToScreenPixel(const Point &rPos) const
Definition: window.cxx:2806
SAL_DLLPRIVATE void ImplUpdateAll()
Definition: paint.cxx:988
void SetActivateMode(ActivateModeFlags nMode)
Definition: window.cxx:2635
void StartTracking(StartTrackingFlags nFlags=StartTrackingFlags::NONE)
Definition: window2.cxx:252
vcl::Window * GetParent() const
Definition: window2.cxx:1123
void EnableAlwaysOnTop(bool bEnable=true)
Definition: stacking.cxx:595
ActivateModeFlags GetActivateMode() const
Definition: window2.cxx:1163
bool IsInputEnabled() const
Definition: window2.cxx:1153
tools::Rectangle GetDesktopRectPixel() const
Definition: window.cxx:2799
bool IsBackground() const
Definition: window3.cxx:64
const OUString & get_id() const
Get the ID of the window.
Definition: window.cxx:3935
void HideTracking()
Definition: window2.cxx:151
virtual void Resize()
Definition: window.cxx:1835
static DockingManager * GetDockingManager()
Definition: window2.cxx:834
void GetBorder(sal_Int32 &rLeftBorder, sal_Int32 &rTopBorder, sal_Int32 &rRightBorder, sal_Int32 &rBottomBorder) const
Definition: window.cxx:2424
Size get_preferred_size() const
Definition: window2.cxx:1694
vcl::Window * GetWindow(GetWindowType nType) const
Definition: stacking.cxx:1036
virtual void queue_resize(StateChangedType eReason=StateChangedType::Layout)
Definition: window2.cxx:1353
PointerState GetPointerState()
Definition: mouse.cxx:577
virtual Point GetPosPixel() const
Definition: window.cxx:2794
void SetParent(vcl::Window *pNewParent)
Definition: stacking.cxx:832
void Enable(bool bEnable=true, bool bChild=true)
Definition: window.cxx:2433
bool IsCreatedWithToolkit() const
Definition: window2.cxx:1263
virtual void SetOutputSizePixel(const Size &rNewSize)
Definition: window2.cxx:1300
WinBits GetStyle() const
Definition: window2.cxx:979
const AllSettings & GetSettings() const
Definition: window3.cxx:129
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)
Definition: window.cxx:2187
void ShowTracking(const tools::Rectangle &rRect, ShowTrackFlags nFlags=ShowTrackFlags::Small)
Definition: window2.cxx:128
virtual void Move()
Definition: window.cxx:1833
void ToTop(ToTopFlags nFlags=ToTopFlags::NONE)
Definition: stacking.cxx:419
Window(WindowType nType)
Definition: window.cxx:95
::OutputDevice const * GetOutDev() const
Definition: window.cxx:567
bool IsAlwaysOnTopEnabled() const
Definition: window2.cxx:1169
std::unique_ptr< WindowImpl > mpWindowImpl
Definition: window.hxx:484
virtual Size GetSizePixel() const
Definition: window.cxx:2402
Size GetOutputSizePixel() const
Definition: window3.cxx:89
bool IsControlBackground() const
Definition: window2.cxx:1113
const Color & GetControlBackground() const
Definition: window2.cxx:1108
void AlwaysEnableInput(bool bAlways, bool bChild=true)
Override EnableInput.
Definition: window.cxx:2608
bool IsVisible() const
Definition: window2.cxx:1128
void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
Definition: paint.cxx:1143
virtual void SetPosPixel(const Point &rNewPos)
Definition: window2.cxx:1283
Point OutputToAbsoluteScreenPixel(const Point &rPos) const
Definition: window.cxx:2855
void CallEventListeners(VclEventId nEvent, void *pData=nullptr)
Definition: event.cxx:219
Point ScreenToOutputPixel(const Point &rPos) const
Definition: window.cxx:2812
virtual void SetPosSizePixel(const Point &rNewPos, const Size &rNewSize)
Definition: window2.cxx:1294
SAL_DLLPRIVATE vcl::Window * ImplGetFrameWindow() const
Definition: window2.cxx:937
bool IsEnabled() const
Definition: window2.cxx:1148
bool IsAlwaysEnableInput() const
returns the current AlwaysEnableInput state
Definition: window2.cxx:1158
void EnableInput(bool bEnable=true, bool bChild=true)
Definition: window.cxx:2493
void InvalidateSizeCache()
clear OptimalSize cache
Definition: window2.cxx:1333
void SetBackground()
Definition: window3.cxx:100
Size bestmaxFrameSizeForScreenSize(const Size &rScreenSize)
Definition: dialog.cxx:706
void GenerateAutoMnemonicsOnHierarchy(const vcl::Window *pWindow)
Definition: dialog.cxx:205
DECL_LINK(CheckNameHdl, SvxNameDialog &, bool)
#define DOCKWIN_FLOATSTYLES
Definition: dockwin.cxx:39
IMPL_LINK_NOARG(ImplDockFloatWin, DockTimerHdl, Timer *, void)
Definition: dockwin.cxx:127
#define MOUSE_LEFT
Definition: event.hxx:102
#define MOUSE_MIDDLE
Definition: event.hxx:103
#define MOUSE_RIGHT
Definition: event.hxx:104
constexpr sal_uInt16 KEY_MOD1
Definition: keycodes.hxx:31
constexpr sal_uInt16 KEY_F10
Definition: keycodes.hxx:92
bool isLayoutEnabled(const vcl::Window *pWindow)
Definition: layout.cxx:3005
#define SAL_WARN_IF(condition, area, stream)
constexpr OUStringLiteral aData
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
long Long
QPRO_FUNC_TYPE nType
DockingManager * ImplGetDockingManager()
Definition: svdata.cxx:316
@ RESIZE
Resize runs before repaint, so we won't paint twice.
@ HIGH_IDLE
Important idle events to be run before processing drawing events.
bool bVisible
ShowTrackFlags
Definition: window.hxx:248
PosSizeFlags
Definition: window.hxx:127
StateChangedType
Definition: window.hxx:291
sal_Int64 WinBits
Definition: wintypes.hxx:109
WinBits const WB_CLOSEABLE
Definition: wintypes.hxx:123
WinBits const WB_MOVEABLE
Definition: wintypes.hxx:122
WinBits const WB_DIALOGCONTROL
Definition: wintypes.hxx:113
WinBits const WB_DOCKABLE
Definition: wintypes.hxx:162
WindowType
Definition: wintypes.hxx:27
WinBits const WB_SIZEABLE
Definition: wintypes.hxx:117
WinBits const WB_SYSTEMWINDOW
Definition: wintypes.hxx:126
WinBits const WB_3DLOOK
Definition: wintypes.hxx:118
WinBits const WB_BORDER
Definition: wintypes.hxx:115
WinBits const WB_NODIALOGCONTROL
Definition: wintypes.hxx:114