LibreOffice Module vcl (master) 1
stacking.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 <vcl/syswin.hxx>
21#include <vcl/window.hxx>
22#include <vcl/taskpanelist.hxx>
23#include <sal/log.hxx>
24
25#include <salframe.hxx>
26#include <salobj.hxx>
27#include <svdata.hxx>
28#include <window.h>
29#include <brdwin.hxx>
30
31#include <com/sun/star/awt/XTopWindow.hpp>
32
33using namespace ::com::sun::star::uno;
34using namespace ::com::sun::star::lang;
36using namespace ::com::sun::star::datatransfer::dnd;
37using namespace ::com::sun::star;
38
39using ::com::sun::star::awt::XTopWindow;
40
42{
43 std::unique_ptr<ImplCalcToTopData> mpNext;
45 std::unique_ptr<vcl::Region> mpInvalidateRegion;
46};
47
48namespace vcl {
49
51{
52 vcl::Window *pTopmostParent = this;
53 while( pTopmostParent->ImplGetParent() )
54 pTopmostParent = pTopmostParent->ImplGetParent();
55 return pTopmostParent->mpWindowImpl->mpFrameWindow;
56}
57
59{
60 mpWindowImpl->mpParent = pParent;
61 mpWindowImpl->mpRealParent = pParent;
62
63 if ( !pParent || mpWindowImpl->mbFrame )
64 return;
65
66 // search frame window and set window frame data
67 vcl::Window* pFrameParent = pParent->mpWindowImpl->mpFrameWindow;
68 mpWindowImpl->mpFrameData = pFrameParent->mpWindowImpl->mpFrameData;
69 if (mpWindowImpl->mpFrame != pFrameParent->mpWindowImpl->mpFrame)
70 {
71 mpWindowImpl->mpFrame = pFrameParent->mpWindowImpl->mpFrame;
72 if (mpWindowImpl->mpSysObj)
73 mpWindowImpl->mpSysObj->Reparent(mpWindowImpl->mpFrame);
74 }
75 mpWindowImpl->mpFrameWindow = pFrameParent;
76 mpWindowImpl->mbFrame = false;
77
78 // search overlap window and insert window in list
79 if ( ImplIsOverlapWindow() )
80 {
81 vcl::Window* pFirstOverlapParent = pParent;
82 while ( !pFirstOverlapParent->ImplIsOverlapWindow() )
83 pFirstOverlapParent = pFirstOverlapParent->ImplGetParent();
84 mpWindowImpl->mpOverlapWindow = pFirstOverlapParent;
85
86 mpWindowImpl->mpNextOverlap = mpWindowImpl->mpFrameData->mpFirstOverlap;
87 mpWindowImpl->mpFrameData->mpFirstOverlap = this;
88
89 // Overlap-Windows are by default the uppermost
90 mpWindowImpl->mpNext = pFirstOverlapParent->mpWindowImpl->mpFirstOverlap;
91 pFirstOverlapParent->mpWindowImpl->mpFirstOverlap = this;
92 if ( !pFirstOverlapParent->mpWindowImpl->mpLastOverlap )
93 pFirstOverlapParent->mpWindowImpl->mpLastOverlap = this;
94 else
95 mpWindowImpl->mpNext->mpWindowImpl->mpPrev = this;
96 }
97 else
98 {
99 if ( pParent->ImplIsOverlapWindow() )
100 mpWindowImpl->mpOverlapWindow = pParent;
101 else
102 mpWindowImpl->mpOverlapWindow = pParent->mpWindowImpl->mpOverlapWindow;
103 mpWindowImpl->mpPrev = pParent->mpWindowImpl->mpLastChild;
104 pParent->mpWindowImpl->mpLastChild = this;
105 if ( !pParent->mpWindowImpl->mpFirstChild )
106 pParent->mpWindowImpl->mpFirstChild = this;
107 else
108 mpWindowImpl->mpPrev->mpWindowImpl->mpNext = this;
109 }
110}
111
112void Window::ImplRemoveWindow( bool bRemoveFrameData )
113{
114 // remove window from the lists
115 if ( !mpWindowImpl->mbFrame )
116 {
117 if ( ImplIsOverlapWindow() )
118 {
119 if ( mpWindowImpl->mpFrameData->mpFirstOverlap.get() == this )
120 mpWindowImpl->mpFrameData->mpFirstOverlap = mpWindowImpl->mpNextOverlap;
121 else
122 {
123 vcl::Window* pTempWin = mpWindowImpl->mpFrameData->mpFirstOverlap;
124 while ( pTempWin->mpWindowImpl->mpNextOverlap.get() != this )
125 pTempWin = pTempWin->mpWindowImpl->mpNextOverlap;
126 pTempWin->mpWindowImpl->mpNextOverlap = mpWindowImpl->mpNextOverlap;
127 }
128
129 if ( mpWindowImpl->mpPrev )
130 mpWindowImpl->mpPrev->mpWindowImpl->mpNext = mpWindowImpl->mpNext;
131 else
132 mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap = mpWindowImpl->mpNext;
133 if ( mpWindowImpl->mpNext )
134 mpWindowImpl->mpNext->mpWindowImpl->mpPrev = mpWindowImpl->mpPrev;
135 else
136 mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpLastOverlap = mpWindowImpl->mpPrev;
137 }
138 else
139 {
140 if ( mpWindowImpl->mpPrev )
141 mpWindowImpl->mpPrev->mpWindowImpl->mpNext = mpWindowImpl->mpNext;
142 else if ( mpWindowImpl->mpParent )
143 mpWindowImpl->mpParent->mpWindowImpl->mpFirstChild = mpWindowImpl->mpNext;
144 if ( mpWindowImpl->mpNext )
145 mpWindowImpl->mpNext->mpWindowImpl->mpPrev = mpWindowImpl->mpPrev;
146 else if ( mpWindowImpl->mpParent )
147 mpWindowImpl->mpParent->mpWindowImpl->mpLastChild = mpWindowImpl->mpPrev;
148 }
149
150 mpWindowImpl->mpPrev = nullptr;
151 mpWindowImpl->mpNext = nullptr;
152 }
153
154 if ( bRemoveFrameData )
155 {
156 // release the graphic
157 OutputDevice *pOutDev = GetOutDev();
158 pOutDev->ReleaseGraphics();
159 }
160}
161
162void Window::reorderWithinParent(sal_uInt16 nNewPosition)
163{
164 sal_uInt16 nChildCount = 0;
165 vcl::Window *pSource = mpWindowImpl->mpParent->mpWindowImpl->mpFirstChild;
166 while (pSource)
167 {
168 if (nChildCount == nNewPosition)
169 break;
170 pSource = pSource->mpWindowImpl->mpNext;
171 nChildCount++;
172 }
173
174 if (pSource == this) //already at the right place
175 return;
176
177 ImplRemoveWindow(false);
178
179 if (pSource)
180 {
181 mpWindowImpl->mpNext = pSource;
182 mpWindowImpl->mpPrev = pSource->mpWindowImpl->mpPrev;
183 pSource->mpWindowImpl->mpPrev = this;
184 }
185 else
186 mpWindowImpl->mpParent->mpWindowImpl->mpLastChild = this;
187
188 if (mpWindowImpl->mpPrev)
189 mpWindowImpl->mpPrev->mpWindowImpl->mpNext = this;
190 else
191 mpWindowImpl->mpParent->mpWindowImpl->mpFirstChild = this;
192}
193
195{
196 if ( ImplIsOverlapWindow() || mpWindowImpl->mbReallyVisible || (mpWindowImpl->mpParent->mpWindowImpl->mpLastChild.get() == this) )
197 return;
198
199 // put the window to the end of the list
200 if ( mpWindowImpl->mpPrev )
201 mpWindowImpl->mpPrev->mpWindowImpl->mpNext = mpWindowImpl->mpNext;
202 else
203 mpWindowImpl->mpParent->mpWindowImpl->mpFirstChild = mpWindowImpl->mpNext;
204 mpWindowImpl->mpNext->mpWindowImpl->mpPrev = mpWindowImpl->mpPrev;
205 mpWindowImpl->mpPrev = mpWindowImpl->mpParent->mpWindowImpl->mpLastChild;
206 mpWindowImpl->mpParent->mpWindowImpl->mpLastChild = this;
207 mpWindowImpl->mpPrev->mpWindowImpl->mpNext = this;
208 mpWindowImpl->mpNext = nullptr;
209}
210
212{
213 SAL_WARN_IF( !ImplIsOverlapWindow(), "vcl", "Window::ImplCalcToTop(): Is not an OverlapWindow" );
214
215 if ( mpWindowImpl->mbFrame )
216 return;
217
218 if ( !IsReallyVisible() )
219 return;
220
221 // calculate region, where the window overlaps with other windows
222 vcl::Region aRegion( GetOutputRectPixel() );
223 vcl::Region aInvalidateRegion;
224 ImplCalcOverlapRegionOverlaps( aRegion, aInvalidateRegion );
225
226 if ( !aInvalidateRegion.IsEmpty() )
227 {
229 pPrevData->mpNext.reset(pData);
230 pData->mpWindow = this;
231 pData->mpInvalidateRegion.reset(new vcl::Region( aInvalidateRegion ));
232 }
233}
234
236{
237 SAL_WARN_IF( !ImplIsOverlapWindow(), "vcl", "Window::ImplToTop(): Is not an OverlapWindow" );
238
239 if ( mpWindowImpl->mbFrame )
240 {
241 // on a mouse click in the external window, it is the latter's
242 // responsibility to assure our frame is put in front
243 if ( !mpWindowImpl->mpFrameData->mbHasFocus &&
244 !mpWindowImpl->mpFrameData->mbSysObjFocus &&
245 !mpWindowImpl->mpFrameData->mbInSysObjFocusHdl &&
246 !mpWindowImpl->mpFrameData->mbInSysObjToTopHdl )
247 {
248 // do not bring floating windows on the client to top
250 {
252 if ( nFlags & ToTopFlags::RestoreWhenMin )
254 if ( nFlags & ToTopFlags::ForegroundTask )
256 if ( nFlags & ToTopFlags::GrabFocusOnly )
257 nSysFlags |= SalFrameToTop::GrabFocusOnly;
258 mpWindowImpl->mpFrame->ToTop( nSysFlags );
259 }
260 }
261 }
262 else
263 {
264 if ( mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap.get() != this )
265 {
266 // remove window from the list
267 mpWindowImpl->mpPrev->mpWindowImpl->mpNext = mpWindowImpl->mpNext;
268 if ( mpWindowImpl->mpNext )
269 mpWindowImpl->mpNext->mpWindowImpl->mpPrev = mpWindowImpl->mpPrev;
270 else
271 mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpLastOverlap = mpWindowImpl->mpPrev;
272
273 // take AlwaysOnTop into account
274 bool bOnTop = IsAlwaysOnTopEnabled();
275 vcl::Window* pNextWin = mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap;
276 if ( !bOnTop )
277 {
278 while ( pNextWin )
279 {
280 if ( !pNextWin->IsAlwaysOnTopEnabled() )
281 break;
282 pNextWin = pNextWin->mpWindowImpl->mpNext;
283 }
284 }
285
286 // add the window to the list again
287 mpWindowImpl->mpNext = pNextWin;
288 if ( pNextWin )
289 {
290 mpWindowImpl->mpPrev = pNextWin->mpWindowImpl->mpPrev;
291 pNextWin->mpWindowImpl->mpPrev = this;
292 }
293 else
294 {
295 mpWindowImpl->mpPrev = mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpLastOverlap;
296 mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpLastOverlap = this;
297 }
298 if ( mpWindowImpl->mpPrev )
299 mpWindowImpl->mpPrev->mpWindowImpl->mpNext = this;
300 else
301 mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap = this;
302
303 // recalculate ClipRegion of this and all overlapping windows
304 if ( IsReallyVisible() )
305 {
306 mpWindowImpl->mpOverlapWindow->ImplSetClipFlagOverlapWindows();
307 }
308 }
309 }
310}
311
313{
314 ImplCalcToTopData aStartData;
315 ImplCalcToTopData* pCurData;
316 vcl::Window* pOverlapWindow;
317 if ( ImplIsOverlapWindow() )
318 pOverlapWindow = this;
319 else
320 pOverlapWindow = mpWindowImpl->mpOverlapWindow;
321
322 // first calculate paint areas
323 vcl::Window* pTempOverlapWindow = pOverlapWindow;
324 aStartData.mpNext = nullptr;
325 pCurData = &aStartData;
326 do
327 {
328 pTempOverlapWindow->ImplCalcToTop( pCurData );
329 if ( pCurData->mpNext )
330 pCurData = pCurData->mpNext.get();
331 pTempOverlapWindow = pTempOverlapWindow->mpWindowImpl->mpOverlapWindow;
332 }
333 while ( !pTempOverlapWindow->mpWindowImpl->mbFrame );
334 // next calculate the paint areas of the ChildOverlap windows
335 pTempOverlapWindow = mpWindowImpl->mpFirstOverlap;
336 while ( pTempOverlapWindow )
337 {
338 pTempOverlapWindow->ImplCalcToTop( pCurData );
339 if ( pCurData->mpNext )
340 pCurData = pCurData->mpNext.get();
341 pTempOverlapWindow = pTempOverlapWindow->mpWindowImpl->mpNext;
342 }
343
344 // and next change the windows list
345 pTempOverlapWindow = pOverlapWindow;
346 do
347 {
348 pTempOverlapWindow->ImplToTop( nFlags );
349 pTempOverlapWindow = pTempOverlapWindow->mpWindowImpl->mpOverlapWindow;
350 }
351 while ( !pTempOverlapWindow->mpWindowImpl->mbFrame );
352 // as last step invalidate the invalid areas
353 pCurData = aStartData.mpNext.get();
354 while ( pCurData )
355 {
357 pCurData = pCurData->mpNext.get();
358 }
359}
360
361void Window::ImplFocusToTop( ToTopFlags nFlags, bool bReallyVisible )
362{
363 // do we need to fetch the focus?
364 if ( !(nFlags & ToTopFlags::NoGrabFocus) )
365 {
366 // first window with GrabFocus-Activate gets the focus
367 vcl::Window* pFocusWindow = this;
368 while ( !pFocusWindow->ImplIsOverlapWindow() )
369 {
370 // if the window has no BorderWindow, we
371 // should always find the belonging BorderWindow
372 if ( !pFocusWindow->mpWindowImpl->mpBorderWindow )
373 {
374 if ( pFocusWindow->mpWindowImpl->mnActivateMode & ActivateModeFlags::GrabFocus )
375 break;
376 }
377 pFocusWindow = pFocusWindow->ImplGetParent();
378 }
379 if ( (pFocusWindow->mpWindowImpl->mnActivateMode & ActivateModeFlags::GrabFocus) &&
380 !pFocusWindow->HasChildPathFocus( true ) )
381 pFocusWindow->GrabFocus();
382 }
383
384 if ( bReallyVisible )
386}
387
389{
390 vcl::Window* pOverlapWindow = mpWindowImpl->mpFirstOverlap;
391 while ( pOverlapWindow )
392 {
393 if ( pOverlapWindow->mpWindowImpl->mbOverlapVisible )
394 {
395 pOverlapWindow->Show( true, ShowFlags::NoActivate );
396 pOverlapWindow->mpWindowImpl->mbOverlapVisible = false;
397 }
398
399 pOverlapWindow = pOverlapWindow->mpWindowImpl->mpNext;
400 }
401}
402
404{
405 vcl::Window* pOverlapWindow = mpWindowImpl->mpFirstOverlap;
406 while ( pOverlapWindow )
407 {
408 if ( pOverlapWindow->IsVisible() )
409 {
410 pOverlapWindow->mpWindowImpl->mbOverlapVisible = true;
411 pOverlapWindow->Show( false );
412 }
413
414 pOverlapWindow = pOverlapWindow->mpWindowImpl->mpNext;
415 }
416}
417
419{
420 if (!mpWindowImpl)
421 return;
422
423 ImplStartToTop( nFlags );
424 ImplFocusToTop( nFlags, IsReallyVisible() );
425}
426
427void Window::SetZOrder( vcl::Window* pRefWindow, ZOrderFlags nFlags )
428{
429
430 if ( mpWindowImpl->mpBorderWindow )
431 {
432 mpWindowImpl->mpBorderWindow->SetZOrder( pRefWindow, nFlags );
433 return;
434 }
435
436 if ( nFlags & ZOrderFlags::First )
437 {
438 if ( ImplIsOverlapWindow() )
439 pRefWindow = mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap;
440 else
441 pRefWindow = mpWindowImpl->mpParent->mpWindowImpl->mpFirstChild;
442 nFlags |= ZOrderFlags::Before;
443 }
444 else if ( nFlags & ZOrderFlags::Last )
445 {
446 if ( ImplIsOverlapWindow() )
447 pRefWindow = mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpLastOverlap;
448 else
449 pRefWindow = mpWindowImpl->mpParent->mpWindowImpl->mpLastChild;
450 nFlags |= ZOrderFlags::Behind;
451 }
452
453 while ( pRefWindow && pRefWindow->mpWindowImpl->mpBorderWindow )
454 pRefWindow = pRefWindow->mpWindowImpl->mpBorderWindow;
455 if (!pRefWindow || pRefWindow == this || mpWindowImpl->mbFrame)
456 return;
457
458 SAL_WARN_IF( pRefWindow->mpWindowImpl->mpParent != mpWindowImpl->mpParent, "vcl", "Window::SetZOrder() - pRefWindow has other parent" );
459 if ( nFlags & ZOrderFlags::Before )
460 {
461 if ( pRefWindow->mpWindowImpl->mpPrev.get() == this )
462 return;
463
464 if ( ImplIsOverlapWindow() )
465 {
466 if ( mpWindowImpl->mpPrev )
467 mpWindowImpl->mpPrev->mpWindowImpl->mpNext = mpWindowImpl->mpNext;
468 else
469 mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap = mpWindowImpl->mpNext;
470 if ( mpWindowImpl->mpNext )
471 mpWindowImpl->mpNext->mpWindowImpl->mpPrev = mpWindowImpl->mpPrev;
472 else
473 mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpLastOverlap = mpWindowImpl->mpPrev;
474 if ( !pRefWindow->mpWindowImpl->mpPrev )
475 mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap = this;
476 }
477 else
478 {
479 if ( mpWindowImpl->mpPrev )
480 mpWindowImpl->mpPrev->mpWindowImpl->mpNext = mpWindowImpl->mpNext;
481 else
482 mpWindowImpl->mpParent->mpWindowImpl->mpFirstChild = mpWindowImpl->mpNext;
483 if ( mpWindowImpl->mpNext )
484 mpWindowImpl->mpNext->mpWindowImpl->mpPrev = mpWindowImpl->mpPrev;
485 else
486 mpWindowImpl->mpParent->mpWindowImpl->mpLastChild = mpWindowImpl->mpPrev;
487 if ( !pRefWindow->mpWindowImpl->mpPrev )
488 mpWindowImpl->mpParent->mpWindowImpl->mpFirstChild = this;
489 }
490
491 mpWindowImpl->mpPrev = pRefWindow->mpWindowImpl->mpPrev;
492 mpWindowImpl->mpNext = pRefWindow;
493 if ( mpWindowImpl->mpPrev )
494 mpWindowImpl->mpPrev->mpWindowImpl->mpNext = this;
495 mpWindowImpl->mpNext->mpWindowImpl->mpPrev = this;
496 }
497 else if ( nFlags & ZOrderFlags::Behind )
498 {
499 if ( pRefWindow->mpWindowImpl->mpNext.get() == this )
500 return;
501
502 if ( ImplIsOverlapWindow() )
503 {
504 if ( mpWindowImpl->mpPrev )
505 mpWindowImpl->mpPrev->mpWindowImpl->mpNext = mpWindowImpl->mpNext;
506 else
507 mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap = mpWindowImpl->mpNext;
508 if ( mpWindowImpl->mpNext )
509 mpWindowImpl->mpNext->mpWindowImpl->mpPrev = mpWindowImpl->mpPrev;
510 else
511 mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpLastOverlap = mpWindowImpl->mpPrev;
512 if ( !pRefWindow->mpWindowImpl->mpNext )
513 mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpLastOverlap = this;
514 }
515 else
516 {
517 if ( mpWindowImpl->mpPrev )
518 mpWindowImpl->mpPrev->mpWindowImpl->mpNext = mpWindowImpl->mpNext;
519 else
520 mpWindowImpl->mpParent->mpWindowImpl->mpFirstChild = mpWindowImpl->mpNext;
521 if ( mpWindowImpl->mpNext )
522 mpWindowImpl->mpNext->mpWindowImpl->mpPrev = mpWindowImpl->mpPrev;
523 else
524 mpWindowImpl->mpParent->mpWindowImpl->mpLastChild = mpWindowImpl->mpPrev;
525 if ( !pRefWindow->mpWindowImpl->mpNext )
526 mpWindowImpl->mpParent->mpWindowImpl->mpLastChild = this;
527 }
528
529 mpWindowImpl->mpPrev = pRefWindow;
530 mpWindowImpl->mpNext = pRefWindow->mpWindowImpl->mpNext;
531 if ( mpWindowImpl->mpNext )
532 mpWindowImpl->mpNext->mpWindowImpl->mpPrev = this;
533 mpWindowImpl->mpPrev->mpWindowImpl->mpNext = this;
534 }
535
536 if ( !IsReallyVisible() )
537 return;
538
539 if ( !mpWindowImpl->mbInitWinClipRegion && mpWindowImpl->maWinClipRegion.IsEmpty() )
540 return;
541
542 bool bInitWinClipRegion = mpWindowImpl->mbInitWinClipRegion;
544
545 // When ClipRegion was not initialised, assume
546 // the window has not been sent, therefore do not
547 // trigger any Invalidates. This is an optimization
548 // for HTML documents with many controls. If this
549 // check gives problems, a flag should be introduced
550 // which tracks whether the window has already been
551 // emitted after Show
552 if ( bInitWinClipRegion )
553 return;
554
555 // Invalidate all windows which are next to each other
556 // Is INCOMPLETE !!!
558 vcl::Window* pWindow = nullptr;
559 if ( ImplIsOverlapWindow() )
560 {
561 if ( mpWindowImpl->mpOverlapWindow )
562 pWindow = mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap;
563 }
564 else
565 pWindow = ImplGetParent()->mpWindowImpl->mpFirstChild;
566 // Invalidate all windows in front of us and which are covered by us
567 while ( pWindow )
568 {
569 if ( pWindow == this )
570 break;
571 tools::Rectangle aCompRect = pWindow->GetOutputRectPixel();
572 if ( aWinRect.Overlaps( aCompRect ) )
574 pWindow = pWindow->mpWindowImpl->mpNext;
575 }
576
577 // If we are covered by a window in the background
578 // we should redraw it
579 while ( pWindow )
580 {
581 if ( pWindow != this )
582 {
583 tools::Rectangle aCompRect = pWindow->GetOutputRectPixel();
584 if ( aWinRect.Overlaps( aCompRect ) )
585 {
587 break;
588 }
589 }
590 pWindow = pWindow->mpWindowImpl->mpNext;
591 }
592}
593
594void Window::EnableAlwaysOnTop( bool bEnable )
595{
596
597 mpWindowImpl->mbAlwaysOnTop = bEnable;
598
599 if ( mpWindowImpl->mpBorderWindow )
600 mpWindowImpl->mpBorderWindow->EnableAlwaysOnTop( bEnable );
601 else if ( bEnable && IsReallyVisible() )
602 ToTop();
603
604 if ( mpWindowImpl->mbFrame )
605 mpWindowImpl->mpFrame->SetAlwaysOnTop( bEnable );
606}
607
609{
610 if ( !mpWindowImpl || mpWindowImpl->mbInDispose )
611 return false;
612
613 // topwindows must be frames or they must have a borderwindow which is a frame
614 if( !mpWindowImpl->mbFrame && (!mpWindowImpl->mpBorderWindow || !mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame ) )
615 return false;
616
618 if( mpWindowImpl->mpWinData->mnIsTopWindow == sal_uInt16(~0)) // still uninitialized
619 {
620 // #113722#, cache result of expensive queryInterface call
621 vcl::Window *pThisWin = const_cast<vcl::Window*>(this);
622 uno::Reference< XTopWindow > xTopWindow( pThisWin->GetComponentInterface(), UNO_QUERY );
623 pThisWin->mpWindowImpl->mpWinData->mnIsTopWindow = xTopWindow.is() ? 1 : 0;
624 }
625 return mpWindowImpl->mpWinData->mnIsTopWindow == 1;
626}
627
628vcl::Window* Window::ImplFindWindow( const Point& rFramePos )
629{
630 vcl::Window* pTempWindow;
631 vcl::Window* pFindWindow;
632
633 // first check all overlapping windows
634 pTempWindow = mpWindowImpl->mpFirstOverlap;
635 while ( pTempWindow )
636 {
637 pFindWindow = pTempWindow->ImplFindWindow( rFramePos );
638 if ( pFindWindow )
639 return pFindWindow;
640 pTempWindow = pTempWindow->mpWindowImpl->mpNext;
641 }
642
643 // then we check our window
644 if ( !mpWindowImpl->mbVisible )
645 return nullptr;
646
647 WindowHitTest nHitTest = ImplHitTest( rFramePos );
648 if ( nHitTest & WindowHitTest::Inside )
649 {
650 // and then we check all child windows
651 pTempWindow = mpWindowImpl->mpFirstChild;
652 while ( pTempWindow )
653 {
654 pFindWindow = pTempWindow->ImplFindWindow( rFramePos );
655 if ( pFindWindow )
656 return pFindWindow;
657 pTempWindow = pTempWindow->mpWindowImpl->mpNext;
658 }
659
660 if ( nHitTest & WindowHitTest::Transparent )
661 return nullptr;
662 else
663 return this;
664 }
665
666 return nullptr;
667}
668
669bool Window::ImplIsRealParentPath( const vcl::Window* pWindow ) const
670{
671 pWindow = pWindow->GetParent();
672 while ( pWindow )
673 {
674 if ( pWindow == this )
675 return true;
676 pWindow = pWindow->GetParent();
677 }
678
679 return false;
680}
681
682bool Window::ImplIsChild( const vcl::Window* pWindow, bool bSystemWindow ) const
683{
684 do
685 {
686 if ( !bSystemWindow && pWindow->ImplIsOverlapWindow() )
687 break;
688
689 pWindow = pWindow->ImplGetParent();
690
691 if ( pWindow == this )
692 return true;
693 }
694 while ( pWindow );
695
696 return false;
697}
698
699bool Window::ImplIsWindowOrChild( const vcl::Window* pWindow, bool bSystemWindow ) const
700{
701 if ( this == pWindow )
702 return true;
703 return ImplIsChild( pWindow, bSystemWindow );
704}
705
707{
708 bool bBecameReallyInvisible = mpWindowImpl->mbReallyVisible;
709
710 GetOutDev()->mbDevOutput = false;
711 mpWindowImpl->mbReallyVisible = false;
712 mpWindowImpl->mbReallyShown = false;
713
714 // the SHOW/HIDE events serve as indicators to send child creation/destroy events to the access bridge.
715 // For this, the data member of the event must not be NULL.
716 // Previously, we did this in Window::Show, but there some events got lost in certain situations.
717 if( bBecameReallyInvisible && ImplIsAccessibleCandidate() )
719 // TODO. It's kind of a hack that we're re-using the VclEventId::WindowHide. Normally, we should
720 // introduce another event which explicitly triggers the Accessibility implementations.
721
722 vcl::Window* pWindow = mpWindowImpl->mpFirstOverlap;
723 while ( pWindow )
724 {
725 if ( pWindow->mpWindowImpl->mbReallyVisible )
726 pWindow->ImplResetReallyVisible();
727 pWindow = pWindow->mpWindowImpl->mpNext;
728 }
729
730 pWindow = mpWindowImpl->mpFirstChild;
731 while ( pWindow )
732 {
733 if ( pWindow->mpWindowImpl->mbReallyVisible )
734 pWindow->ImplResetReallyVisible();
735 pWindow = pWindow->mpWindowImpl->mpNext;
736 }
737}
738
740{
741 if ( mpWindowImpl->mpFrameWindow != pWindow->mpWindowImpl->mpFrameWindow )
742 {
743 // release graphic
744 OutputDevice *pOutDev = GetOutDev();
745 pOutDev->ReleaseGraphics();
746 }
747
748 mpWindowImpl->mpFrameData = pWindow->mpWindowImpl->mpFrameData;
749 if (mpWindowImpl->mpFrame != pWindow->mpWindowImpl->mpFrame)
750 {
751 mpWindowImpl->mpFrame = pWindow->mpWindowImpl->mpFrame;
752 if (mpWindowImpl->mpSysObj)
753 mpWindowImpl->mpSysObj->Reparent(mpWindowImpl->mpFrame);
754 }
755 mpWindowImpl->mpFrameWindow = pWindow->mpWindowImpl->mpFrameWindow;
756 if ( pWindow->ImplIsOverlapWindow() )
757 mpWindowImpl->mpOverlapWindow = pWindow;
758 else
759 mpWindowImpl->mpOverlapWindow = pWindow->mpWindowImpl->mpOverlapWindow;
760
761 vcl::Window* pChild = mpWindowImpl->mpFirstChild;
762 while ( pChild )
763 {
764 pChild->ImplUpdateWindowPtr( pWindow );
765 pChild = pChild->mpWindowImpl->mpNext;
766 }
767}
768
770{
771 vcl::Window* pChild = mpWindowImpl->mpFirstChild;
772 while ( pChild )
773 {
774 pChild->ImplUpdateWindowPtr( this );
775 pChild = pChild->mpWindowImpl->mpNext;
776 }
777}
778
780{
781 bool bVisible = IsVisible();
782 Show( false );
783 ImplRemoveWindow( bNewFrame );
784 vcl::Window* pRealParent = mpWindowImpl->mpRealParent;
786 mpWindowImpl->mpRealParent = pRealParent;
788 if ( ImplUpdatePos() )
790
791 if ( bNewFrame )
792 {
793 vcl::Window* pOverlapWindow = mpWindowImpl->mpFirstOverlap;
794 while ( pOverlapWindow )
795 {
796 vcl::Window* pNextOverlapWindow = pOverlapWindow->mpWindowImpl->mpNext;
797 pOverlapWindow->ImplUpdateOverlapWindowPtr( bNewFrame );
798 pOverlapWindow = pNextOverlapWindow;
799 }
800 }
801
802 if ( bVisible )
803 Show();
804}
805
807{
808
809 const vcl::Window* pWin = this;
810 while ( pWin && !pWin->IsSystemWindow() )
811 pWin = pWin->GetParent();
812 return static_cast<SystemWindow*>(const_cast<Window*>(pWin));
813}
814
816{
817 // get the most top-level system window, the one that contains the taskpanelist
818 SystemWindow *pSysWin = nullptr;
819 if( !pWin )
820 return pSysWin;
821 vcl::Window *pMyParent = pWin;
822 while ( pMyParent )
823 {
824 if ( pMyParent->IsSystemWindow() )
825 pSysWin = static_cast<SystemWindow*>(pMyParent);
826 pMyParent = pMyParent->GetParent();
827 }
828 return pSysWin;
829}
830
832{
833 SAL_WARN_IF( !pNewParent, "vcl", "Window::SetParent(): pParent == NULL" );
834 SAL_WARN_IF( pNewParent == this, "vcl", "someone tried to reparent a window to itself" );
835
836 if( !pNewParent || pNewParent == this )
837 return;
838
839 // check if the taskpanelist would change and move the window pointer accordingly
840 SystemWindow *pSysWin = ImplGetLastSystemWindow(this);
841 SystemWindow *pNewSysWin = nullptr;
842 bool bChangeTaskPaneList = false;
843 if( pSysWin && pSysWin->ImplIsInTaskPaneList( this ) )
844 {
845 pNewSysWin = ImplGetLastSystemWindow( pNewParent );
846 if( pNewSysWin && pNewSysWin != pSysWin )
847 {
848 bChangeTaskPaneList = true;
849 pSysWin->GetTaskPaneList()->RemoveWindow( this );
850 }
851 }
852 // remove ownerdraw decorated windows from list in the top-most frame window
853 if( (GetStyle() & WB_OWNERDRAWDECORATION) && mpWindowImpl->mbFrame )
854 {
855 ::std::vector< VclPtr<vcl::Window> >& rList = ImplGetOwnerDrawList();
856 auto p = ::std::find( rList.begin(), rList.end(), VclPtr<vcl::Window>(this) );
857 if( p != rList.end() )
858 rList.erase( p );
859 }
860
861 ImplSetFrameParent( pNewParent );
862
863 if ( mpWindowImpl->mpBorderWindow )
864 {
865 mpWindowImpl->mpRealParent = pNewParent;
866 mpWindowImpl->mpBorderWindow->SetParent( pNewParent );
867 return;
868 }
869
870 if ( mpWindowImpl->mpParent.get() == pNewParent )
871 return;
872
873 if ( mpWindowImpl->mbFrame )
874 mpWindowImpl->mpFrame->SetParent( pNewParent->mpWindowImpl->mpFrame );
875
876 bool bVisible = IsVisible();
878
879 // check if the overlap window changes
880 vcl::Window* pOldOverlapWindow;
881 vcl::Window* pNewOverlapWindow = nullptr;
882 if ( ImplIsOverlapWindow() )
883 pOldOverlapWindow = nullptr;
884 else
885 {
886 pNewOverlapWindow = pNewParent->ImplGetFirstOverlapWindow();
887 if ( mpWindowImpl->mpOverlapWindow.get() != pNewOverlapWindow )
888 pOldOverlapWindow = mpWindowImpl->mpOverlapWindow;
889 else
890 pOldOverlapWindow = nullptr;
891 }
892
893 // convert windows in the hierarchy
894 bool bFocusOverlapWin = HasChildPathFocus( true );
895 bool bFocusWin = HasChildPathFocus();
896 bool bNewFrame = pNewParent->mpWindowImpl->mpFrameWindow != mpWindowImpl->mpFrameWindow;
897 if ( bNewFrame )
898 {
899 if ( mpWindowImpl->mpFrameData->mpFocusWin )
900 {
901 if ( IsWindowOrChild( mpWindowImpl->mpFrameData->mpFocusWin ) )
902 mpWindowImpl->mpFrameData->mpFocusWin = nullptr;
903 }
904 if ( mpWindowImpl->mpFrameData->mpMouseMoveWin )
905 {
906 if ( IsWindowOrChild( mpWindowImpl->mpFrameData->mpMouseMoveWin ) )
907 mpWindowImpl->mpFrameData->mpMouseMoveWin = nullptr;
908 }
909 if ( mpWindowImpl->mpFrameData->mpMouseDownWin )
910 {
911 if ( IsWindowOrChild( mpWindowImpl->mpFrameData->mpMouseDownWin ) )
912 mpWindowImpl->mpFrameData->mpMouseDownWin = nullptr;
913 }
914 }
915 ImplRemoveWindow( bNewFrame );
916 ImplInsertWindow( pNewParent );
917 if ( mpWindowImpl->mnParentClipMode & ParentClipMode::Clip )
918 pNewParent->mpWindowImpl->mbClipChildren = true;
920 if ( ImplUpdatePos() )
922
923 // If the Overlap-Window has changed, we need to test whether
924 // OverlapWindows that had the Child window as their parent
925 // need to be put into the window hierarchy.
926 if ( ImplIsOverlapWindow() )
927 {
928 if ( bNewFrame )
929 {
930 vcl::Window* pOverlapWindow = mpWindowImpl->mpFirstOverlap;
931 while ( pOverlapWindow )
932 {
933 vcl::Window* pNextOverlapWindow = pOverlapWindow->mpWindowImpl->mpNext;
934 pOverlapWindow->ImplUpdateOverlapWindowPtr( bNewFrame );
935 pOverlapWindow = pNextOverlapWindow;
936 }
937 }
938 }
939 else if ( pOldOverlapWindow )
940 {
941 // reset Focus-Save
942 if ( bFocusWin ||
943 (pOldOverlapWindow->mpWindowImpl->mpLastFocusWindow &&
944 IsWindowOrChild( pOldOverlapWindow->mpWindowImpl->mpLastFocusWindow )) )
945 pOldOverlapWindow->mpWindowImpl->mpLastFocusWindow = nullptr;
946
947 vcl::Window* pOverlapWindow = pOldOverlapWindow->mpWindowImpl->mpFirstOverlap;
948 while ( pOverlapWindow )
949 {
950 vcl::Window* pNextOverlapWindow = pOverlapWindow->mpWindowImpl->mpNext;
951 if ( ImplIsRealParentPath( pOverlapWindow->ImplGetWindow() ) )
952 pOverlapWindow->ImplUpdateOverlapWindowPtr( bNewFrame );
953 pOverlapWindow = pNextOverlapWindow;
954 }
955
956 // update activate-status at next overlap window
957 if ( HasChildPathFocus( true ) )
958 ImplCallFocusChangeActivate( pNewOverlapWindow, pOldOverlapWindow );
959 }
960
961 // also convert Activate-Status
962 if ( bNewFrame )
963 {
964 if ( (GetType() == WindowType::BORDERWINDOW) &&
966 static_cast<ImplBorderWindow*>(this)->SetDisplayActive( mpWindowImpl->mpFrameData->mbHasFocus );
967 }
968
969 // when required give focus to new frame if
970 // FocusWindow is changed with SetParent()
971 if ( bFocusOverlapWin )
972 {
973 mpWindowImpl->mpFrameData->mpFocusWin = Application::GetFocusWindow();
974 if ( !mpWindowImpl->mpFrameData->mbHasFocus )
975 {
976 mpWindowImpl->mpFrame->ToTop( SalFrameToTop::NONE );
977 }
978 }
979
980 // Assure DragSource and DropTarget members are created
981 if ( bNewFrame )
982 {
984 }
985
986 if( bChangeTaskPaneList )
987 pNewSysWin->GetTaskPaneList()->AddWindow( this );
988
989 if( (GetStyle() & WB_OWNERDRAWDECORATION) && mpWindowImpl->mbFrame )
990 ImplGetOwnerDrawList().emplace_back(this );
991
992 if ( bVisible )
994}
995
996bool Window::IsAncestorOf( const vcl::Window& rWindow ) const
997{
998 return ImplIsRealParentPath(&rWindow);
999}
1000
1001sal_uInt16 Window::GetChildCount() const
1002{
1003 if (!mpWindowImpl)
1004 return 0;
1005
1006 sal_uInt16 nChildCount = 0;
1007 vcl::Window* pChild = mpWindowImpl->mpFirstChild;
1008 while ( pChild )
1009 {
1010 nChildCount++;
1011 pChild = pChild->mpWindowImpl->mpNext;
1012 }
1013
1014 return nChildCount;
1015}
1016
1017vcl::Window* Window::GetChild( sal_uInt16 nChild ) const
1018{
1019 if (!mpWindowImpl)
1020 return nullptr;
1021
1022 sal_uInt16 nChildCount = 0;
1023 vcl::Window* pChild = mpWindowImpl->mpFirstChild;
1024 while ( pChild )
1025 {
1026 if ( nChild == nChildCount )
1027 return pChild;
1028 pChild = pChild->mpWindowImpl->mpNext;
1029 nChildCount++;
1030 }
1031
1032 return nullptr;
1033}
1034
1036{
1037 if (!mpWindowImpl)
1038 return nullptr;
1039
1040 switch ( nType )
1041 {
1043 return mpWindowImpl->mpRealParent;
1044
1046 return mpWindowImpl->mpFirstChild;
1047
1049 return mpWindowImpl->mpLastChild;
1050
1052 return mpWindowImpl->mpPrev;
1053
1055 return mpWindowImpl->mpNext;
1056
1058 return mpWindowImpl->mpFirstOverlap;
1059
1061 if ( ImplIsOverlapWindow() )
1062 return const_cast<vcl::Window*>(this);
1063 else
1064 return mpWindowImpl->mpOverlapWindow;
1065
1067 if ( ImplIsOverlapWindow() )
1068 return mpWindowImpl->mpOverlapWindow;
1069 else
1070 return mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpOverlapWindow;
1071
1073 return this->ImplGetWindow();
1074
1076 return ImplGetParent();
1077
1079 return mpWindowImpl->mpFrameWindow;
1080
1082 if ( mpWindowImpl->mpBorderWindow )
1083 return mpWindowImpl->mpBorderWindow->GetWindow( GetWindowType::Border );
1084 return const_cast<vcl::Window*>(this);
1085
1087 return ImplGetWinData()->maTopWindowChildren.empty() ? nullptr : (*ImplGetWinData()->maTopWindowChildren.begin()).get();
1088
1090 {
1091 if ( !mpWindowImpl->mpRealParent )
1092 return nullptr;
1093 const ::std::list< VclPtr<vcl::Window> >& rTopWindows( mpWindowImpl->mpRealParent->ImplGetWinData()->maTopWindowChildren );
1094 ::std::list< VclPtr<vcl::Window> >::const_iterator myPos =
1095 ::std::find( rTopWindows.begin(), rTopWindows.end(), this );
1096 if ( ( myPos == rTopWindows.end() ) || ( ++myPos == rTopWindows.end() ) )
1097 return nullptr;
1098 return *myPos;
1099 }
1100
1101 }
1102
1103 return nullptr;
1104}
1105
1106bool Window::IsChild( const vcl::Window* pWindow ) const
1107{
1108 do
1109 {
1110 if ( pWindow->ImplIsOverlapWindow() )
1111 break;
1112
1113 pWindow = pWindow->ImplGetParent();
1114
1115 if ( pWindow == this )
1116 return true;
1117 }
1118 while ( pWindow );
1119
1120 return false;
1121}
1122
1123bool Window::IsWindowOrChild( const vcl::Window* pWindow, bool bSystemWindow ) const
1124{
1125
1126 if ( this == pWindow )
1127 return true;
1128 return ImplIsChild( pWindow, bSystemWindow );
1129}
1130
1132{
1134 while( pFrameWindow )
1135 {
1136 // search all frames that are children of this window
1137 // and reparent them
1138 if( ImplIsRealParentPath( pFrameWindow ) )
1139 {
1140 SAL_WARN_IF( mpWindowImpl->mpFrame == pFrameWindow->mpWindowImpl->mpFrame, "vcl", "SetFrameParent to own" );
1141 SAL_WARN_IF( !mpWindowImpl->mpFrame, "vcl", "no frame" );
1142 SalFrame* pParentFrame = pParent ? pParent->mpWindowImpl->mpFrame : nullptr;
1143 pFrameWindow->mpWindowImpl->mpFrame->SetParent( pParentFrame );
1144 }
1145 pFrameWindow = pFrameWindow->mpWindowImpl->mpFrameData->mpNextFrame;
1146 }
1147}
1148
1149} /* namespace vcl */
1150
1151/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static vcl::Window * GetFocusWindow()
Get the currently focused window.
Definition: svapp.cxx:1161
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:171
virtual void ReleaseGraphics(bool bRelease=true)=0
Release the graphics device, and remove it from the graphics device list.
bool mbDevOutput
Definition: outdev.hxx:245
A SalFrame is a system window (e.g. an X11 window).
Definition: salframe.hxx:115
SAL_DLLPRIVATE bool ImplIsInTaskPaneList(vcl::Window *pWin)
Definition: syswin.cxx:955
TaskPaneList * GetTaskPaneList()
Definition: syswin.cxx:240
void AddWindow(vcl::Window *pWindow)
void RemoveWindow(vcl::Window *pWindow)
bool Overlaps(const tools::Rectangle &rRect) const
bool IsEmpty() const
Definition: region.cxx:229
SAL_DLLPRIVATE bool ImplIsWindowOrChild(const vcl::Window *pWindow, bool bSystemWindow=false) const
Definition: stacking.cxx:699
bool IsReallyVisible() const
Definition: window2.cxx:1131
void SetZOrder(vcl::Window *pRefWindow, ZOrderFlags nFlags)
Definition: stacking.cxx:427
vcl::Window * GetParent() const
Definition: window2.cxx:1121
void EnableAlwaysOnTop(bool bEnable=true)
Definition: stacking.cxx:594
SAL_DLLPRIVATE void ImplStartToTop(ToTopFlags nFlags)
Definition: stacking.cxx:312
SAL_DLLPRIVATE vcl::Window * ImplFindWindow(const Point &rFramePos)
Definition: stacking.cxx:628
bool HasChildPathFocus(bool bSystemWindow=false) const
Definition: window.cxx:3009
SAL_DLLPRIVATE bool ImplIsAccessibleCandidate() const
bool IsChild(const vcl::Window *pWindow) const
Definition: stacking.cxx:1106
sal_uInt16 GetChildCount() const
Definition: stacking.cxx:1001
WindowType GetType() const
Definition: window2.cxx:998
SAL_DLLPRIVATE ::std::vector< VclPtr< vcl::Window > > & ImplGetOwnerDrawList()
Definition: window2.cxx:837
SAL_DLLPRIVATE void ImplGenerateMouseMove()
Definition: mouse.cxx:157
SAL_DLLPRIVATE bool ImplIsOverlapWindow() const
Definition: window2.cxx:950
SAL_DLLPRIVATE void ImplCalcToTop(ImplCalcToTopData *pPrevData)
Definition: stacking.cxx:211
vcl::Window * GetWindow(GetWindowType nType) const
Definition: stacking.cxx:1035
SAL_DLLPRIVATE void ImplUpdateWindowPtr()
Definition: stacking.cxx:769
SAL_DLLPRIVATE bool ImplIsChild(const vcl::Window *pWindow, bool bSystemWindow=false) const
Definition: stacking.cxx:682
void GrabFocus()
Definition: window.cxx:2981
SAL_DLLPRIVATE void ImplHideAllOverlaps()
Definition: stacking.cxx:403
void reorderWithinParent(sal_uInt16 nNewPosition)
Definition: stacking.cxx:162
SAL_DLLPRIVATE void ImplCalcOverlapRegionOverlaps(const vcl::Region &rInterRegion, vcl::Region &rRegion) const
void SetParent(vcl::Window *pNewParent)
Definition: stacking.cxx:831
SAL_DLLPRIVATE void ImplInsertWindow(vcl::Window *pParent)
Definition: stacking.cxx:58
SAL_DLLPRIVATE bool ImplUpdatePos()
Definition: window.cxx:1416
SAL_DLLPRIVATE void ImplUpdateSysObjPos()
Definition: window.cxx:1447
static SAL_DLLPRIVATE void ImplCallFocusChangeActivate(vcl::Window *pNewOverlapWindow, vcl::Window *pOldOverlapWindow)
Definition: event.cxx:571
WinBits GetStyle() const
Definition: window2.cxx:977
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)
Definition: window.cxx:2189
SAL_DLLPRIVATE bool ImplSetClipFlag(bool bSysObjOnlySmaller=false)
SAL_DLLPRIVATE void ImplUpdateWindowPtr(vcl::Window *pWindow)
Definition: stacking.cxx:739
SAL_DLLPRIVATE vcl::Window * ImplGetParent() const
Definition: window2.cxx:884
SAL_DLLPRIVATE void ImplResetReallyVisible()
Definition: stacking.cxx:706
void ToTop(ToTopFlags nFlags=ToTopFlags::NONE)
Definition: stacking.cxx:418
SAL_DLLPRIVATE vcl::Window * ImplGetFirstOverlapWindow()
Definition: window2.cxx:899
::OutputDevice const * GetOutDev() const
Definition: window.cxx:567
SAL_DLLPRIVATE void ImplRemoveWindow(bool bRemoveFrameData)
Definition: stacking.cxx:112
SAL_DLLPRIVATE void ImplToTop(ToTopFlags nFlags)
Definition: stacking.cxx:235
SAL_DLLPRIVATE vcl::Window * ImplGetTopmostFrameWindow()
Definition: stacking.cxx:50
virtual css::uno::Reference< css::awt::XWindowPeer > GetComponentInterface(bool bCreate=true)
Definition: window.cxx:3150
SystemWindow * GetSystemWindow() const
Definition: stacking.cxx:806
bool IsAlwaysOnTopEnabled() const
Definition: window2.cxx:1167
SAL_DLLPRIVATE ImplWinData * ImplGetWinData() const
Definition: window.cxx:1225
std::unique_ptr< WindowImpl > mpWindowImpl
Definition: window.hxx:484
bool IsSystemWindow() const
Definition: window2.cxx:1021
SAL_DLLPRIVATE void ImplFocusToTop(ToTopFlags nFlags, bool bReallyVisible)
Definition: stacking.cxx:361
virtual WindowHitTest ImplHitTest(const Point &rFramePos)
Definition: mouse.cxx:57
bool IsTopWindow() const
Definition: stacking.cxx:608
bool IsWindowOrChild(const vcl::Window *pWindow, bool bSystemWindow=false) const
Definition: stacking.cxx:1123
SAL_DLLPRIVATE void ImplToBottomChild()
Definition: stacking.cxx:194
bool IsVisible() const
Definition: window2.cxx:1126
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
Definition: paint.cxx:1143
void CallEventListeners(VclEventId nEvent, void *pData=nullptr)
Definition: event.cxx:219
tools::Rectangle GetOutputRectPixel() const
Definition: window3.cxx:91
css::uno::Reference< css::datatransfer::dnd::XDropTarget > GetDropTarget()
Definition: mouse.cxx:673
vcl::Window * ImplGetWindow() const
if this is a proxy return the client, otherwise itself
Definition: window2.cxx:854
SAL_DLLPRIVATE void ImplShowAllOverlaps()
Definition: stacking.cxx:388
SAL_DLLPRIVATE vcl::Window * ImplGetClientWindow() const
Definition: window2.cxx:889
vcl::Window * GetChild(sal_uInt16 nChild) const
Definition: stacking.cxx:1017
bool IsAncestorOf(const vcl::Window &rWindow) const
Definition: stacking.cxx:996
SAL_DLLPRIVATE void ImplInvalidateFrameRegion(const vcl::Region *pRegion, InvalidateFlags nFlags)
Definition: paint.cxx:689
SAL_DLLPRIVATE bool ImplIsRealParentPath(const vcl::Window *pWindow) const
Definition: stacking.cxx:669
SAL_DLLPRIVATE void ImplSetFrameParent(const vcl::Window *pParent)
Definition: stacking.cxx:1131
SAL_DLLPRIVATE void ImplUpdateOverlapWindowPtr(bool bNewFrame)
Definition: stacking.cxx:779
void * p
#define SAL_WARN_IF(condition, area, stream)
std::unique_ptr< sal_Int32[]> pData
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
static SystemWindow * ImplGetLastSystemWindow(vcl::Window *pWin)
Definition: stacking.cxx:815
QPRO_FUNC_TYPE nType
SalFrameToTop
Definition: salframe.hxx:43
std::unique_ptr< vcl::Region > mpInvalidateRegion
Definition: stacking.cxx:45
std::unique_ptr< ImplCalcToTopData > mpNext
Definition: stacking.cxx:43
VclPtr< vcl::Window > mpWindow
Definition: stacking.cxx:44
ImplSVFrameData maFrameData
Definition: svdata.hxx:402
VclPtr< vcl::Window > mpFirstFrame
Definition: svdata.hxx:245
::std::list< VclPtr< vcl::Window > > maTopWindowChildren
Definition: window.h:123
ImplSVData * ImplGetSVData()
Definition: svdata.cxx:76
bool bVisible
ZOrderFlags
Definition: window.hxx:146
GetWindowType
Definition: window.hxx:107
WindowHitTest
Definition: window.hxx:403
@ Children
The child windows are invalidated, too.
@ NoTransparent
The parent window is not invalidated.
ToTopFlags
Definition: window.hxx:171
WinBits const WB_OWNERDRAWDECORATION
Definition: wintypes.hxx:173
WinBits const WB_SYSTEMFLOATWIN
Definition: wintypes.hxx:169