LibreOffice Module vcl (master) 1
window/clipping.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/window.hxx>
21#include <vcl/virdev.hxx>
22
23#include <tools/debug.hxx>
24
25#include <salobj.hxx>
26#include <window.h>
27
28namespace vcl {
29
31{
34
35 return aClip;
36}
37
39{
41
42 vcl::Region aRegion;
43
44 if ( mxOwnerWindow->mpWindowImpl->mbInPaint )
45 aRegion = *(mxOwnerWindow->mpWindowImpl->mpPaintRegion);
46 else
47 {
49 // only this region is in frame coordinates, so re-mirror it
50 // the mpWindowImpl->mpPaintRegion above is already correct (see ImplCallPaint()) !
51 if( ImplIsAntiparallel() )
52 ReMirror ( aRegion );
53 }
54 if ( mbClipRegion )
56 if ( aRegion.IsEmpty() )
57 mbOutputClipped = true;
58 else
59 {
60 mbOutputClipped = false;
61 SelectClipRegion( aRegion );
62 }
63 mbClipRegionSet = true;
64
65 mbInitClipRegion = false;
66}
67
69{
70 if ( mpWindowImpl->mpBorderWindow )
71 mpWindowImpl->mpBorderWindow->SetParentClipMode( nMode );
72 else
73 {
74 if ( !ImplIsOverlapWindow() )
75 {
76 mpWindowImpl->mnParentClipMode = nMode;
77 if ( nMode & ParentClipMode::Clip )
78 mpWindowImpl->mpParent->mpWindowImpl->mbClipChildren = true;
79 }
80 }
81}
82
84{
85 if ( mpWindowImpl->mpBorderWindow )
86 return mpWindowImpl->mpBorderWindow->GetParentClipMode();
87 else
88 return mpWindowImpl->mnParentClipMode;
89}
90
92{
93 if( !mpWindowImpl->mpPaintRegion )
94 return;
95
96 vcl::Region aPixRegion = LogicToPixel( rRegion );
97 vcl::Region aDevPixRegion = GetOutDev()->ImplPixelToDevicePixel( aPixRegion );
98
99 vcl::Region aWinChildRegion = ImplGetWinChildClipRegion();
100 // only this region is in frame coordinates, so re-mirror it
101 if( GetOutDev()->ImplIsAntiparallel() )
102 {
103 const OutputDevice *pOutDev = GetOutDev();
104 pOutDev->ReMirror( aWinChildRegion );
105 }
106
107 aDevPixRegion.Intersect( aWinChildRegion );
108 if( ! aDevPixRegion.IsEmpty() )
109 {
110 mpWindowImpl->mpPaintRegion->Union( aDevPixRegion );
111 GetOutDev()->mbInitClipRegion = true;
112 }
113}
114
116{
117 vcl::Region aWinClipRegion;
118
119 if ( mpWindowImpl->mbInitWinClipRegion )
120 const_cast<vcl::Window*>(this)->ImplInitWinClipRegion();
121 aWinClipRegion = mpWindowImpl->maWinClipRegion;
122
123 vcl::Region aWinRegion( GetOutputRectPixel() );
124
125 if ( aWinRegion == aWinClipRegion )
126 aWinClipRegion.SetNull();
127
128 aWinClipRegion.Move( -GetOutDev()->mnOutOffX, -GetOutDev()->mnOutOffY );
129
130 return aWinClipRegion;
131}
132
133
135{
136 vcl::Region aRegion(true);
137
138 if ( mxOwnerWindow->mpWindowImpl->mbInPaint )
139 {
140 aRegion = *(mxOwnerWindow->mpWindowImpl->mpPaintRegion);
141 aRegion.Move( -mnOutOffX, -mnOutOffY );
142 }
143
144 if ( mbClipRegion )
145 aRegion.Intersect( maRegion );
146
147 return PixelToLogic( aRegion );
148}
149
151{
152 const vcl::Region aPaintRgn(mxOwnerWindow->GetPaintRegion());
153
154 if (!aPaintRgn.IsNull())
155 rDstRect.Intersection(LogicToPixel(aPaintRgn.GetBoundRect()));
156}
157
158void Window::EnableClipSiblings( bool bClipSiblings )
159{
160
161 if ( mpWindowImpl->mpBorderWindow )
162 mpWindowImpl->mpBorderWindow->EnableClipSiblings( bClipSiblings );
163
164 mpWindowImpl->mbClipSiblings = bClipSiblings;
165}
166
167void Window::ImplClipBoundaries( vcl::Region& rRegion, bool bThis, bool bOverlaps )
168{
169 if ( bThis )
171 else if ( ImplIsOverlapWindow() )
172 {
173 // clip to frame if required
174 if ( !mpWindowImpl->mbFrame )
175 rRegion.Intersect( tools::Rectangle( Point( 0, 0 ), mpWindowImpl->mpFrameWindow->GetOutputSizePixel() ) );
176
177 if ( bOverlaps && !rRegion.IsEmpty() )
178 {
179 // Clip Overlap Siblings
180 vcl::Window* pStartOverlapWindow = this;
181 while ( !pStartOverlapWindow->mpWindowImpl->mbFrame )
182 {
183 vcl::Window* pOverlapWindow = pStartOverlapWindow->mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap;
184 while ( pOverlapWindow && (pOverlapWindow != pStartOverlapWindow) )
185 {
186 pOverlapWindow->ImplExcludeOverlapWindows2( rRegion );
187 pOverlapWindow = pOverlapWindow->mpWindowImpl->mpNext;
188 }
189 pStartOverlapWindow = pStartOverlapWindow->mpWindowImpl->mpOverlapWindow;
190 }
191
192 // Clip Child Overlap Windows
193 ImplExcludeOverlapWindows( rRegion );
194 }
195 }
196 else
198}
199
201{
202 bool bOtherClip = false;
203 vcl::Window* pWindow = mpWindowImpl->mpFirstChild;
204 while ( pWindow )
205 {
206 if ( pWindow->mpWindowImpl->mbReallyVisible )
207 {
208 // read-out ParentClipMode-Flags
209 ParentClipMode nClipMode = pWindow->GetParentClipMode();
210 if ( !(nClipMode & ParentClipMode::NoClip) &&
211 ((nClipMode & ParentClipMode::Clip) || (GetStyle() & WB_CLIPCHILDREN)) )
212 pWindow->ImplExcludeWindowRegion( rRegion );
213 else
214 bOtherClip = true;
215 }
216
217 pWindow = pWindow->mpWindowImpl->mpNext;
218 }
219
220 return bOtherClip;
221}
222
224{
225 vcl::Window* pWindow = mpWindowImpl->mpFirstChild;
226 while ( pWindow )
227 {
228 if ( pWindow->mpWindowImpl->mbReallyVisible )
229 pWindow->ImplExcludeWindowRegion( rRegion );
230 pWindow = pWindow->mpWindowImpl->mpNext;
231 }
232}
233
235{
236 vcl::Window* pWindow = ImplGetParent()->mpWindowImpl->mpFirstChild;
237 while ( pWindow )
238 {
239 if ( pWindow == this )
240 break;
241
242 if ( pWindow->mpWindowImpl->mbReallyVisible )
243 pWindow->ImplExcludeWindowRegion( rRegion );
244
245 pWindow = pWindow->mpWindowImpl->mpNext;
246 }
247}
248
250{
251 // Build Window Region
252 mpWindowImpl->maWinClipRegion = GetOutputRectPixel();
253 if ( mpWindowImpl->mbWinRegion )
254 mpWindowImpl->maWinClipRegion.Intersect( GetOutDev()->ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) );
255
256 // ClipSiblings
257 if ( mpWindowImpl->mbClipSiblings && !ImplIsOverlapWindow() )
258 ImplClipSiblings( mpWindowImpl->maWinClipRegion );
259
260 // Clip Parent Boundaries
261 ImplClipBoundaries( mpWindowImpl->maWinClipRegion, false, true );
262
263 // Clip Children
264 if ( (GetStyle() & WB_CLIPCHILDREN) || mpWindowImpl->mbClipChildren )
265 mpWindowImpl->mbInitChildRegion = true;
266
267 mpWindowImpl->mbInitWinClipRegion = false;
268}
269
271{
272 if ( !mpWindowImpl->mpFirstChild )
273 {
274 mpWindowImpl->mpChildClipRegion.reset();
275 }
276 else
277 {
278 if ( !mpWindowImpl->mpChildClipRegion )
279 mpWindowImpl->mpChildClipRegion.reset( new vcl::Region( mpWindowImpl->maWinClipRegion ) );
280 else
281 *mpWindowImpl->mpChildClipRegion = mpWindowImpl->maWinClipRegion;
282
283 ImplClipChildren( *mpWindowImpl->mpChildClipRegion );
284 }
285
286 mpWindowImpl->mbInitChildRegion = false;
287}
288
290{
291 if ( mpWindowImpl->mbInitWinClipRegion )
293 if ( mpWindowImpl->mbInitChildRegion )
295 if ( mpWindowImpl->mpChildClipRegion )
296 return *mpWindowImpl->mpChildClipRegion;
297 return mpWindowImpl->maWinClipRegion;
298}
299
300bool Window::ImplSysObjClip( const vcl::Region* pOldRegion )
301{
302 bool bUpdate = true;
303
304 if ( mpWindowImpl->mpSysObj )
305 {
306 bool bVisibleState = mpWindowImpl->mbReallyVisible;
307
308 if ( bVisibleState )
309 {
310 vcl::Region& rWinChildClipRegion = ImplGetWinChildClipRegion();
311
312 if (!rWinChildClipRegion.IsEmpty())
313 {
314 if ( pOldRegion )
315 {
316 vcl::Region aNewRegion = rWinChildClipRegion;
317 rWinChildClipRegion.Intersect(*pOldRegion);
318 bUpdate = aNewRegion == rWinChildClipRegion;
319 }
320
321 vcl::Region aRegion = rWinChildClipRegion;
322 vcl::Region aWinRectRegion( GetOutputRectPixel() );
323
324 if ( aRegion == aWinRectRegion )
325 mpWindowImpl->mpSysObj->ResetClipRegion();
326 else
327 {
328 aRegion.Move( -GetOutDev()->mnOutOffX, -GetOutDev()->mnOutOffY );
329
330 // set/update clip region
331 RectangleVector aRectangles;
332 aRegion.GetRegionRectangles(aRectangles);
333 mpWindowImpl->mpSysObj->BeginSetClipRegion(aRectangles.size());
334
335 for (auto const& rectangle : aRectangles)
336 {
337 mpWindowImpl->mpSysObj->UnionClipRegion(
338 rectangle.Left(),
339 rectangle.Top(),
340 rectangle.GetWidth(), // orig nWidth was ((R - L) + 1), same as GetWidth does
341 rectangle.GetHeight()); // same for height
342 }
343
344 mpWindowImpl->mpSysObj->EndSetClipRegion();
345 }
346 }
347 else
348 bVisibleState = false;
349 }
350
351 // update visible status
352 mpWindowImpl->mpSysObj->Show( bVisibleState );
353 }
354
355 return bUpdate;
356}
357
359{
360 if ( mpWindowImpl->mpSysObj && mpWindowImpl->mbInitWinClipRegion )
361 ImplSysObjClip( nullptr );
362
363 vcl::Window* pWindow = mpWindowImpl->mpFirstChild;
364 while ( pWindow )
365 {
367 pWindow = pWindow->mpWindowImpl->mpNext;
368 }
369}
370
372{
374
375 vcl::Window* pWindow = mpWindowImpl->mpFirstOverlap;
376 while ( pWindow )
377 {
379 pWindow = pWindow->mpWindowImpl->mpNext;
380 }
381}
382
384{
385 if ( !ImplIsOverlapWindow() )
386 {
388
389 // siblings should recalculate their clip region
390 if ( mpWindowImpl->mbClipSiblings )
391 {
392 vcl::Window* pWindow = mpWindowImpl->mpNext;
393 while ( pWindow )
394 {
396 pWindow = pWindow->mpWindowImpl->mpNext;
397 }
398 }
399 }
400 else
401 mpWindowImpl->mpFrameWindow->ImplUpdateSysObjOverlapsClip();
402}
403
404bool Window::ImplSetClipFlagChildren( bool bSysObjOnlySmaller )
405{
406 bool bUpdate = true;
407 if ( mpWindowImpl->mpSysObj )
408 {
409 std::unique_ptr<vcl::Region> pOldRegion;
410 if ( bSysObjOnlySmaller && !mpWindowImpl->mbInitWinClipRegion )
411 pOldRegion.reset(new vcl::Region( mpWindowImpl->maWinClipRegion ));
412
413 GetOutDev()->mbInitClipRegion = true;
414 mpWindowImpl->mbInitWinClipRegion = true;
415
416 vcl::Window* pWindow = mpWindowImpl->mpFirstChild;
417 while ( pWindow )
418 {
419 if ( !pWindow->ImplSetClipFlagChildren( bSysObjOnlySmaller ) )
420 bUpdate = false;
421 pWindow = pWindow->mpWindowImpl->mpNext;
422 }
423
424 if ( !ImplSysObjClip( pOldRegion.get() ) )
425 {
426 GetOutDev()->mbInitClipRegion = true;
427 mpWindowImpl->mbInitWinClipRegion = true;
428 bUpdate = false;
429 }
430 }
431 else
432 {
433 GetOutDev()->mbInitClipRegion = true;
434 mpWindowImpl->mbInitWinClipRegion = true;
435
436 vcl::Window* pWindow = mpWindowImpl->mpFirstChild;
437 while ( pWindow )
438 {
439 if ( !pWindow->ImplSetClipFlagChildren( bSysObjOnlySmaller ) )
440 bUpdate = false;
441 pWindow = pWindow->mpWindowImpl->mpNext;
442 }
443 }
444 return bUpdate;
445}
446
447bool Window::ImplSetClipFlagOverlapWindows( bool bSysObjOnlySmaller )
448{
449 bool bUpdate = ImplSetClipFlagChildren( bSysObjOnlySmaller );
450
451 vcl::Window* pWindow = mpWindowImpl->mpFirstOverlap;
452 while ( pWindow )
453 {
454 if ( !pWindow->ImplSetClipFlagOverlapWindows( bSysObjOnlySmaller ) )
455 bUpdate = false;
456 pWindow = pWindow->mpWindowImpl->mpNext;
457 }
458
459 return bUpdate;
460}
461
462bool Window::ImplSetClipFlag( bool bSysObjOnlySmaller )
463{
464 if ( !ImplIsOverlapWindow() )
465 {
466 bool bUpdate = ImplSetClipFlagChildren( bSysObjOnlySmaller );
467
468 vcl::Window* pParent = ImplGetParent();
469 if ( pParent &&
470 ((pParent->GetStyle() & WB_CLIPCHILDREN) || (mpWindowImpl->mnParentClipMode & ParentClipMode::Clip)) )
471 {
472 pParent->GetOutDev()->mbInitClipRegion = true;
473 pParent->mpWindowImpl->mbInitChildRegion = true;
474 }
475
476 // siblings should recalculate their clip region
477 if ( mpWindowImpl->mbClipSiblings )
478 {
479 vcl::Window* pWindow = mpWindowImpl->mpNext;
480 while ( pWindow )
481 {
482 if ( !pWindow->ImplSetClipFlagChildren( bSysObjOnlySmaller ) )
483 bUpdate = false;
484 pWindow = pWindow->mpWindowImpl->mpNext;
485 }
486 }
487
488 return bUpdate;
489 }
490 else
491 return mpWindowImpl->mpFrameWindow->ImplSetClipFlagOverlapWindows( bSysObjOnlySmaller );
492}
493
495{
496 if ( mpWindowImpl->mbInitWinClipRegion )
498
499 rRegion.Intersect( mpWindowImpl->maWinClipRegion );
500}
501
503{
504 rRegion.Intersect( GetOutputRectPixel() );
505 if ( mpWindowImpl->mbWinRegion )
506 rRegion.Intersect( GetOutDev()->ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) );
507}
508
510{
511 if ( mpWindowImpl->mbWinRegion )
512 {
513 vcl::Region aRegion( GetOutputRectPixel() );
514 aRegion.Intersect( GetOutDev()->ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) );
515 rRegion.Exclude( aRegion );
516 }
517 else
518 {
519 rRegion.Exclude( GetOutputRectPixel() );
520 }
521}
522
524{
525 vcl::Window* pWindow = mpWindowImpl->mpFirstOverlap;
526 while ( pWindow )
527 {
528 if ( pWindow->mpWindowImpl->mbReallyVisible )
529 {
530 pWindow->ImplExcludeWindowRegion( rRegion );
531 pWindow->ImplExcludeOverlapWindows( rRegion );
532 }
533
534 pWindow = pWindow->mpWindowImpl->mpNext;
535 }
536}
537
539{
540 if ( mpWindowImpl->mbReallyVisible )
541 ImplExcludeWindowRegion( rRegion );
542
543 ImplExcludeOverlapWindows( rRegion );
544}
545
546void Window::ImplIntersectAndUnionOverlapWindows( const vcl::Region& rInterRegion, vcl::Region& rRegion ) const
547{
548 vcl::Window* pWindow = mpWindowImpl->mpFirstOverlap;
549 while ( pWindow )
550 {
551 if ( pWindow->mpWindowImpl->mbReallyVisible )
552 {
553 vcl::Region aTempRegion( rInterRegion );
554 pWindow->ImplIntersectWindowRegion( aTempRegion );
555 rRegion.Union( aTempRegion );
556 pWindow->ImplIntersectAndUnionOverlapWindows( rInterRegion, rRegion );
557 }
558
559 pWindow = pWindow->mpWindowImpl->mpNext;
560 }
561}
562
564{
565 if ( mpWindowImpl->mbReallyVisible )
566 {
567 vcl::Region aTempRegion( rInterRegion );
568 ImplIntersectWindowRegion( aTempRegion );
569 rRegion.Union( aTempRegion );
570 }
571
572 ImplIntersectAndUnionOverlapWindows( rInterRegion, rRegion );
573}
574
575void Window::ImplCalcOverlapRegionOverlaps( const vcl::Region& rInterRegion, vcl::Region& rRegion ) const
576{
577 // Clip Overlap Siblings
578 vcl::Window const * pStartOverlapWindow;
579 if ( !ImplIsOverlapWindow() )
580 pStartOverlapWindow = mpWindowImpl->mpOverlapWindow;
581 else
582 pStartOverlapWindow = this;
583 while ( !pStartOverlapWindow->mpWindowImpl->mbFrame )
584 {
585 vcl::Window* pOverlapWindow = pStartOverlapWindow->mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap;
586 while ( pOverlapWindow && (pOverlapWindow != pStartOverlapWindow) )
587 {
588 pOverlapWindow->ImplIntersectAndUnionOverlapWindows2( rInterRegion, rRegion );
589 pOverlapWindow = pOverlapWindow->mpWindowImpl->mpNext;
590 }
591 pStartOverlapWindow = pStartOverlapWindow->mpWindowImpl->mpOverlapWindow;
592 }
593
594 // Clip Child Overlap Windows
595 if ( !ImplIsOverlapWindow() )
596 mpWindowImpl->mpOverlapWindow->ImplIntersectAndUnionOverlapWindows( rInterRegion, rRegion );
597 else
598 ImplIntersectAndUnionOverlapWindows( rInterRegion, rRegion );
599}
600
602 bool bChildren, bool bSiblings )
603{
604 vcl::Region aRegion( rSourceRect );
605 if ( mpWindowImpl->mbWinRegion )
606 rRegion.Intersect( GetOutDev()->ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) );
607 vcl::Region aTempRegion;
608 vcl::Window* pWindow;
609
610 ImplCalcOverlapRegionOverlaps( aRegion, rRegion );
611
612 // Parent-Boundaries
613 pWindow = this;
614 if ( !ImplIsOverlapWindow() )
615 {
616 pWindow = ImplGetParent();
617 do
618 {
619 aTempRegion = aRegion;
620 pWindow->ImplExcludeWindowRegion( aTempRegion );
621 rRegion.Union( aTempRegion );
622 if ( pWindow->ImplIsOverlapWindow() )
623 break;
624 pWindow = pWindow->ImplGetParent();
625 }
626 while ( pWindow );
627 }
628 if ( pWindow && !pWindow->mpWindowImpl->mbFrame )
629 {
630 aTempRegion = aRegion;
631 aTempRegion.Exclude( tools::Rectangle( Point( 0, 0 ), mpWindowImpl->mpFrameWindow->GetOutputSizePixel() ) );
632 rRegion.Union( aTempRegion );
633 }
634
635 // Siblings
636 if ( bSiblings && !ImplIsOverlapWindow() )
637 {
638 pWindow = mpWindowImpl->mpParent->mpWindowImpl->mpFirstChild;
639 do
640 {
641 if ( pWindow->mpWindowImpl->mbReallyVisible && (pWindow != this) )
642 {
643 aTempRegion = aRegion;
644 pWindow->ImplIntersectWindowRegion( aTempRegion );
645 rRegion.Union( aTempRegion );
646 }
647 pWindow = pWindow->mpWindowImpl->mpNext;
648 }
649 while ( pWindow );
650 }
651
652 if ( !bChildren )
653 return;
654
655 pWindow = mpWindowImpl->mpFirstChild;
656 while ( pWindow )
657 {
658 if ( pWindow->mpWindowImpl->mbReallyVisible )
659 {
660 aTempRegion = aRegion;
661 pWindow->ImplIntersectWindowRegion( aTempRegion );
662 rRegion.Union( aTempRegion );
663 }
664 pWindow = pWindow->mpWindowImpl->mpNext;
665 }
666}
667
668void WindowOutputDevice::SaveBackground(VirtualDevice& rSaveDevice, const Point& rPos, const Size& rSize, const Size&) const
669{
670 MapMode aTempMap(GetMapMode());
671 aTempMap.SetOrigin(Point());
672 rSaveDevice.SetMapMode(aTempMap);
673
674 if ( mxOwnerWindow->mpWindowImpl->mpPaintRegion )
675 {
676 vcl::Region aClip( *mxOwnerWindow->mpWindowImpl->mpPaintRegion );
677 const Point aPixPos( LogicToPixel( rPos ) );
678
679 aClip.Move( -mnOutOffX, -mnOutOffY );
680 aClip.Intersect( tools::Rectangle( aPixPos, LogicToPixel( rSize ) ) );
681
682 if ( !aClip.IsEmpty() )
683 {
684 const vcl::Region aOldClip( rSaveDevice.GetClipRegion() );
685 const Point aPixOffset( rSaveDevice.LogicToPixel( Point() ) );
686 const bool bMap = rSaveDevice.IsMapModeEnabled();
687
688 // move clip region to have the same distance to DestOffset
689 aClip.Move( aPixOffset.X() - aPixPos.X(), aPixOffset.Y() - aPixPos.Y() );
690
691 // set pixel clip region
692 rSaveDevice.EnableMapMode( false );
693 rSaveDevice.SetClipRegion( aClip );
694 rSaveDevice.EnableMapMode( bMap );
695 rSaveDevice.DrawOutDev( Point(), rSize, rPos, rSize, *this );
696 rSaveDevice.SetClipRegion( aOldClip );
697 }
698 }
699 else
700 {
701 rSaveDevice.DrawOutDev( Point(), rSize, rPos, rSize, *this );
702 }
703
704 rSaveDevice.SetMapMode(MapMode());
705}
706
707} /* namespace vcl */
708
709/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SetOrigin(const Point &rOrigin)
Definition: mapmod.cxx:103
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:171
Size GetOutputSize() const
Definition: outdev.hxx:328
void EnableMapMode(bool bEnable=true)
Definition: map.cxx:612
vcl::Region GetClipRegion() const
SAL_DLLPRIVATE bool ImplIsAntiparallel() const
Definition: outdev.cxx:656
vcl::Region maRegion
Definition: outdev.hxx:226
tools::Long mnOutOffY
Output offset for device output in pixel (pseudo window offset within window system's frames)
Definition: outdev.hxx:210
bool mbOutputClipped
Definition: outdev.hxx:246
tools::Long mnOutOffX
Output offset for device output in pixel (pseudo window offset within window system's frames)
Definition: outdev.hxx:208
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
Definition: map.cxx:1135
bool mbClipRegion
Definition: outdev.hxx:242
void SetMapMode()
Definition: map.cxx:620
virtual void DrawOutDev(const Point &rDestPt, const Size &rDestSize, const Point &rSrcPt, const Size &rSrcSize)
Definition: outdev.cxx:418
bool mbInitClipRegion
Definition: outdev.hxx:253
bool mbClipRegionSet
Definition: outdev.hxx:254
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
Definition: map.cxx:904
SAL_DLLPRIVATE void ReMirror(Point &rPoint) const
Definition: outdev.cxx:672
const MapMode & GetMapMode() const
Definition: outdev.hxx:1558
bool SelectClipRegion(const vcl::Region &, SalGraphics *pGraphics=nullptr)
SAL_DLLPRIVATE vcl::Region ImplPixelToDevicePixel(const vcl::Region &rRegion) const
Convert a region in pixel units to a region in device pixel units and coords.
Definition: map.cxx:602
bool IsMapModeEnabled() const
Definition: outdev.hxx:1552
tools::Rectangle & Intersection(const tools::Rectangle &rRect)
void Move(tools::Long nHorzMove, tools::Long nVertMove)
Definition: region.cxx:401
bool IsNull() const
Definition: region.hxx:99
void Intersect(const tools::Rectangle &rRegion)
Definition: region.cxx:583
bool IsEmpty() const
Definition: region.cxx:229
tools::Rectangle GetBoundRect() const
Definition: region.cxx:1219
void Union(const tools::Rectangle &rRegion)
Definition: region.cxx:507
void Exclude(const tools::Rectangle &rRegion)
Definition: region.cxx:680
void GetRegionRectangles(RectangleVector &rTarget) const
Definition: region.cxx:1674
void SetNull()
Definition: region.cxx:1413
virtual void InitClipRegion() override
void SaveBackground(VirtualDevice &rSaveDevice, const Point &rPos, const Size &rSize, const Size &) const override
virtual vcl::Region GetActiveClipRegion() const override
VclPtr< vcl::Window > mxOwnerWindow
Definition: windowdev.hxx:77
virtual void ClipToPaintRegion(tools::Rectangle &rDstRect) override
virtual vcl::Region GetOutputBoundsClipRegion() const override
SAL_DLLPRIVATE bool ImplSysObjClip(const vcl::Region *pOldRegion)
Point LogicToPixel(const Point &rLogicPt) const
Definition: window3.cxx:131
SAL_DLLPRIVATE void ImplClipBoundaries(vcl::Region &rRegion, bool bThis, bool bOverlaps)
SAL_DLLPRIVATE void ImplCalcOverlapRegion(const tools::Rectangle &rSourceRect, vcl::Region &rRegion, bool bChildren, bool bSiblings)
SAL_DLLPRIVATE void ImplExcludeWindowRegion(vcl::Region &rRegion)
SAL_DLLPRIVATE void ImplIntersectAndUnionOverlapWindows(const vcl::Region &rInterRegion, vcl::Region &rRegion) const
SAL_DLLPRIVATE bool ImplIsOverlapWindow() const
Definition: window2.cxx:957
SAL_DLLPRIVATE void ImplExcludeOverlapWindows(vcl::Region &rRegion) const
SAL_DLLPRIVATE void ImplInitWinClipRegion()
void SetParentClipMode(ParentClipMode nMode=ParentClipMode::NONE)
ParentClipMode GetParentClipMode() const
SAL_DLLPRIVATE void ImplUpdateSysObjChildrenClip()
SAL_DLLPRIVATE void ImplCalcOverlapRegionOverlaps(const vcl::Region &rInterRegion, vcl::Region &rRegion) const
SAL_DLLPRIVATE bool ImplSetClipFlagOverlapWindows(bool bSysObjOnlySmaller=false)
SAL_DLLPRIVATE void ImplInitWinChildClipRegion()
SAL_DLLPRIVATE void ImplClipSiblings(vcl::Region &rRegion) const
SAL_DLLPRIVATE void ImplExcludeOverlapWindows2(vcl::Region &rRegion)
WinBits GetStyle() const
Definition: window2.cxx:984
SAL_DLLPRIVATE bool ImplSetClipFlag(bool bSysObjOnlySmaller=false)
SAL_DLLPRIVATE vcl::Window * ImplGetParent() const
Definition: window2.cxx:891
SAL_DLLPRIVATE void ImplIntersectWindowClipRegion(vcl::Region &rRegion)
::OutputDevice const * GetOutDev() const
Definition: window.cxx:567
SAL_DLLPRIVATE vcl::Region & ImplGetWinChildClipRegion()
SAL_DLLPRIVATE void ImplUpdateSysObjOverlapsClip()
SAL_DLLPRIVATE void ImplUpdateSysObjClip()
SAL_DLLPRIVATE bool ImplClipChildren(vcl::Region &rRegion) const
std::unique_ptr< WindowImpl > mpWindowImpl
Definition: window.hxx:484
vcl::Region GetPaintRegion() const
Definition: paint.cxx:1127
SAL_DLLPRIVATE void ImplIntersectAndUnionOverlapWindows2(const vcl::Region &rInterRegion, vcl::Region &rRegion)
void EnableClipSiblings(bool bClipSiblings=true)
SAL_DLLPRIVATE bool ImplSetClipFlagChildren(bool bSysObjOnlySmaller)
void ExpandPaintClipRegion(const vcl::Region &rRegion)
SAL_DLLPRIVATE void ImplClipAllChildren(vcl::Region &rRegion) const
tools::Rectangle GetOutputRectPixel() const
Definition: window3.cxx:91
vcl::Region GetWindowClipRegionPixel() const
SAL_DLLPRIVATE void ImplIntersectWindowRegion(vcl::Region &rRegion)
#define DBG_TESTSOLARMUTEX()
def rectangle(l)
std::vector< tools::Rectangle > RectangleVector
Definition: region.hxx:34
ParentClipMode
Definition: window.hxx:237
WinBits const WB_CLIPCHILDREN
Definition: wintypes.hxx:112