23#include <com/sun/star/awt/InvalidateStyle.hpp>
24#include <com/sun/star/awt/XWindowPeer.hpp>
33 const css::uno::Reference<css::awt::XWindow>& rxParentWindow,
34 css::uno::Reference<css::drawing::XPresenterHelper> xPresenterHelper,
36 : mxParentWindow(rxParentWindow),
37 mxParentWindowPeer(rxParentWindow, UNO_QUERY),
39 mpPaneContainer(
std::move(xPaneContainer))
43::std::function<void (
const css::awt::Rectangle& rRepaintBox)>
45 const css::uno::Reference<css::awt::XWindow>& rxWindow)
47 return [
this, rxWindow] (css::awt::Rectangle
const& rRepaintBox)
49 return this->
Invalidate(rxWindow, rRepaintBox );
54 const css::uno::Reference<css::awt::XWindow>& rxWindow)
56 sal_Int16 nInvalidateMode (awt::InvalidateStyle::CHILDREN);
60 if (!pDescriptor || ! pDescriptor->mbIsOpaque)
61 nInvalidateMode |= awt::InvalidateStyle::TRANSPARENT;
63 nInvalidateMode |= awt::InvalidateStyle::NOTRANSPARENT;
69 const css::uno::Reference<css::awt::XWindow>& rxWindow,
70 const sal_Int16 nInvalidateFlags)
72 if ((nInvalidateFlags & awt::InvalidateStyle::TRANSPARENT) != 0)
78 const awt::Rectangle aBBox (
85 Reference<awt::XWindowPeer> xPeer (rxWindow, UNO_QUERY);
87 xPeer->invalidate(nInvalidateFlags);
92 const css::uno::Reference<css::awt::XWindow>& rxWindow,
93 const css::awt::Rectangle& rRepaintBox,
94 const bool bSynchronous)
96 sal_Int16 nInvalidateMode (awt::InvalidateStyle::CHILDREN);
98 nInvalidateMode |= awt::InvalidateStyle::UPDATE;
102 if (!pDescriptor || ! pDescriptor->mbIsOpaque)
103 nInvalidateMode |= awt::InvalidateStyle::TRANSPARENT;
105 nInvalidateMode |= awt::InvalidateStyle::NOTRANSPARENT;
107 Invalidate(rxWindow, rRepaintBox, nInvalidateMode);
111 const css::uno::Reference<css::awt::XWindow>& rxWindow,
112 const css::awt::Rectangle& rRepaintBox,
113 const sal_Int16 nInvalidateFlags)
115 if ((nInvalidateFlags & awt::InvalidateStyle::TRANSPARENT) != 0)
121 const awt::Rectangle aBBox (
125 rRepaintBox.X + aBBox.X,
126 rRepaintBox.Y + aBBox.Y,
134 Reference<awt::XWindowPeer> xPeer (rxWindow, UNO_QUERY);
136 xPeer->invalidateRect(rRepaintBox, nInvalidateFlags);
Reference< drawing::XPresenterHelper > mxPresenterHelper
::std::function< void(const css::awt::Rectangle &rRepaintBox)> GetInvalidator(const css::uno::Reference< css::awt::XWindow > &rxWindow)
css::uno::Reference< css::drawing::XPresenterHelper > mxPresenterHelper
css::uno::Reference< css::awt::XWindowPeer > mxParentWindowPeer
css::uno::Reference< css::awt::XWindow > mxParentWindow
PresenterPaintManager(const css::uno::Reference< css::awt::XWindow > &rxParentWindow, css::uno::Reference< css::drawing::XPresenterHelper > xPresenterHelper, rtl::Reference< PresenterPaneContainer > xPaneContainer)
Create paint manager with the window that is the top node in the local window hierarchy.
void Invalidate(const css::uno::Reference< css::awt::XWindow > &rxWindow)
Request a repaint of the whole window.
::rtl::Reference< PresenterPaneContainer > mpPaneContainer
std::shared_ptr< PaneDescriptor > SharedPaneDescriptor