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