tdf#130857 qt weld: Support mail merge "Server Auth" dialog
[LibreOffice.git] / svx / inc / sdr / overlay / overlaymanagerbuffered.hxx
bloba5acd6abc3eea620fc366a4514fbaebc39b79177
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SVX_INC_SDR_OVERLAY_OVERLAYMANAGERBUFFERED_HXX
21 #define INCLUDED_SVX_INC_SDR_OVERLAY_OVERLAYMANAGERBUFFERED_HXX
23 #include <svx/sdr/overlay/overlaymanager.hxx>
24 #include <basegfx/range/b2irange.hxx>
25 #include <vcl/virdev.hxx>
26 #include <vcl/idle.hxx>
29 namespace sdr::overlay
31 class OverlayManagerBuffered final : public OverlayManager
33 // The VirtualDevice for draw window content buffering, this
34 // is the view content without overlay
35 ScopedVclPtr<VirtualDevice> mpBufferDevice;
37 // #i73602# The VirtualDevice for OverlayPaint buffering. This
38 // is an extra device to avoid flickering of overlay paints
39 ScopedVclPtr<VirtualDevice> mpOutputBufferDevice;
41 // Idle for buffering
42 Idle maBufferIdle;
44 // Range for buffering (in pixel to be independent from mapMode)
45 basegfx::B2IRange maBufferRememberedRangePixel;
47 // link for timer
48 DECL_LINK(ImpBufferTimerHandler, Timer*, void);
50 // Internal methods for buffering
51 void ImpPrepareBufferDevice();
52 void ImpRestoreBackground() const ;
53 void ImpRestoreBackground(const vcl::Region& rRegionPixel) const;
54 void ImpSaveBackground(const vcl::Region& rRegion, OutputDevice* pPreRenderDevice);
56 OverlayManagerBuffered(OutputDevice& rOutputDevice);
57 virtual ~OverlayManagerBuffered() override;
59 public:
60 static rtl::Reference<OverlayManager> create(OutputDevice& rOutputDevice);
62 // complete redraw
63 virtual void completeRedraw(const vcl::Region& rRegion, OutputDevice* pPreRenderDevice = nullptr) const override;
65 // flush. Do buffered updates.
66 virtual void flush() override;
68 // invalidate the given range at local OutputDevice
69 virtual void invalidateRange(const basegfx::B2DRange& rRange) override;
71 } // end of namespace sdr::overlay
74 #endif // INCLUDED_SVX_INC_SDR_OVERLAY_OVERLAYMANAGERBUFFERED_HXX
76 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */