21 #include <osl/diagnose.h>
41 std::vector<VclPtr<vcl::Window> > m_aCandidates;
42 std::set<VclPtr<vcl::Window> > m_aDeletedCandidates;
54 if (rEvent.GetId() == VclEventId::ObjectDying)
56 m_aDeletedCandidates.insert(pWindow);
60 CandidateMgr::~CandidateMgr()
64 if (m_aDeletedCandidates.find(pCandidate) != m_aDeletedCandidates.end())
66 pCandidate->RemoveEventListener(
LINK(
this, CandidateMgr, WindowEventListener));
75 CandidateMgr aManager;
76 aManager.PaintTransparentChildren(rWindow, rPixelRect);
90 if (aCandidatePosSizePixel.Overlaps(rPixelRect))
92 m_aCandidates.emplace_back(pCandidate);
96 pCandidate = pCandidate->
GetWindow( GetWindowType::Next );
99 for (
const auto& rpCandidate : m_aCandidates)
101 pCandidate = rpCandidate.get();
102 if (m_aDeletedCandidates.find(pCandidate) != m_aDeletedCandidates.end())
107 pCandidate->
Invalidate(InvalidateFlags::NoTransparent|InvalidateFlags::Children);
109 if (m_aDeletedCandidates.find(pCandidate) != m_aDeletedCandidates.end())
116 : mpOutputDevice(&rOriginal),
159 aRegionPixel.GetRegionRectangles(aRectangles);
161 for(
const auto& rRect : aRectangles)
164 const Point aTopLeft(rRect.TopLeft());
165 const Size aSize(rRect.GetSize());
188 xOverlayManager->setStripeColorA(aColA);
189 xOverlayManager->setStripeColorB(aColB);
219 OSL_ENSURE(xOverlayManager.is(),
"SdrPaintWindow::SdrPaintWindow: Could not allocate an overlayManager (!)");
231 return xOverlayManager;
242 : mpOutputDevice(&rOut),
244 mrPaintView(rNewPaintView),
245 mbTemporaryTarget(
false),
246 mbOutputToWindow(
OUTDEV_WINDOW == mpOutputDevice->GetOutDevType()),
283 const bool bPrepareBufferedOutput(
289 if(bPrepareBufferedOutput)
virtual Point GetPosPixel() const
#define LINK(Instance, Class, Member)
OutDevType GetOutDevType() const
DECL_LINK(CheckNameHdl, SvxNameDialog &, bool)
rtl::Reference< sdr::overlay::OverlayManager > mxOverlayManager
virtual bool IsVirtual() const
rtl::Reference< sdr::overlay::OverlayManager > const & GetOverlayManager() const
bool IsBufferedOutputAllowed() const
const StyleSettings & GetStyleSettings() const
static const AllSettings & GetSettings()
bool IsMapModeEnabled() const
virtual Size GetSizePixel() const
const MapMode & GetMapMode() const
void DestroyPreRenderDevice()
GDIMetaFile * GetConnectMetaFile() const
virtual void SetSettings(const AllSettings &rSettings)
void EnableMapMode(bool bEnable=true)
static rtl::Reference< OverlayManager > create(OutputDevice &rOutputDevice)
const Color & GetHighlightColor() const
void PaintTransparentChildren(vcl::Window const &rWindow, tools::Rectangle const &rPixelRect)
paint the transparent children of rWin that overlap rPixelRect (for example, transparent form control...
std::vector< tools::Rectangle > RectangleVector
void SetDrawMode(DrawModeFlags nDrawMode)
void SetRedrawRegion(const vcl::Region &rNew)
tools::Rectangle GetVisibleArea() const
virtual rtl::Reference< sdr::overlay::OverlayManager > CreateOverlayManager(OutputDevice &rDevice) const
VclPtr< OutputDevice > mpOutputDevice
bool IsChildTransparentModeEnabled() const
VclPtr< vcl::Window > mpWindow
SdrPaintWindow(SdrPaintView &rNewPaintView, OutputDevice &rOut, vcl::Window *pWindow=nullptr)
sal_uInt16 GetStripeLength()
bool IsBufferedOverlayAllowed() const
bool SetOutputSizePixel(const Size &rNewSize, bool bErase=true)
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
void Create(SvxOrientationItem &rItem, SvStream &rStrm, sal_uInt16)
SdrPreRenderDevice(OutputDevice &rOriginal)
static rtl::Reference< OverlayManager > create(OutputDevice &rOutputDevice)
IMPL_LINK(CandidateMgr, WindowEventListener, VclWindowEvent &, rEvent, void)
const AllSettings & GetSettings() const
Size GetOutputSizePixel() const
VclPtr< OutputDevice > mpOutputDevice
bool OutputToPrinter() const
DrawModeFlags GetDrawMode() const
vcl::Window * GetWindow(GetWindowType nType) const
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
void PreparePreRenderDevice()
void AddEventListener(const Link< VclWindowEvent &, void > &rEventListener)
VclPtr< VirtualDevice > mpPreRenderDevice
void OutputPreRenderDevice(const vcl::Region &rExpandedRegion)
static void InitOverlayManager(rtl::Reference< sdr::overlay::OverlayManager > xOverlayManager)
bool IsPaintTransparent() const
void DrawOverlay(const vcl::Region &rRegion)
void OutputPreRenderDevice(const vcl::Region &rExpandedRegion)
void impCreateOverlayManager()
bool OutputToRecordingMetaFile() const
bool SupportsDoubleBuffering() const
vcl::Region maRedrawRegion
virtual vcl::Window * GetOwnerWindow() const
OutputDevice & GetOutputDevice() const
SAL_DLLPRIVATE void DrawOutDev(const Point &, const Size &, const Point &, const Size &, const Printer &)=delete
void PreparePreRenderDevice()
std::unique_ptr< SdrPreRenderDevice > mpPreRenderDevice
SdrPaintView & mrPaintView
bool m_bDetectedRangeSegmentation false