23 #include <com/sun/star/awt/InvalidateStyle.hpp>
24 #include <com/sun/star/awt/XWindowPeer.hpp>
32 const css::uno::Reference<css::awt::XWindow>& rxParentWindow,
33 const css::uno::Reference<css::drawing::XPresenterHelper>& rxPresenterHelper,
35 : mxParentWindow(rxParentWindow),
36 mxParentWindowPeer(rxParentWindow, UNO_QUERY),
38 mpPaneContainer(rpPaneContainer)
42 ::std::function<void (const css::awt::Rectangle& rRepaintBox)>
44 const css::uno::Reference<css::awt::XWindow>& rxWindow)
46 return [
this, rxWindow] (css::awt::Rectangle
const& rRepaintBox)
48 return this->
Invalidate(rxWindow, rRepaintBox );
53 const css::uno::Reference<css::awt::XWindow>& rxWindow)
55 sal_Int16 nInvalidateMode (awt::InvalidateStyle::CHILDREN);
59 if (!pDescriptor || ! pDescriptor->mbIsOpaque)
60 nInvalidateMode |= awt::InvalidateStyle::TRANSPARENT;
62 nInvalidateMode |= awt::InvalidateStyle::NOTRANSPARENT;
68 const css::uno::Reference<css::awt::XWindow>& rxWindow,
69 const sal_Int16 nInvalidateFlags)
71 if ((nInvalidateFlags & awt::InvalidateStyle::TRANSPARENT) != 0)
77 const awt::Rectangle aBBox (
84 Reference<awt::XWindowPeer> xPeer (rxWindow, UNO_QUERY);
86 xPeer->invalidate(nInvalidateFlags);
91 const css::uno::Reference<css::awt::XWindow>& rxWindow,
92 const css::awt::Rectangle& rRepaintBox,
93 const bool bSynchronous)
95 sal_Int16 nInvalidateMode (awt::InvalidateStyle::CHILDREN);
97 nInvalidateMode |= awt::InvalidateStyle::UPDATE;
101 if (!pDescriptor || ! pDescriptor->mbIsOpaque)
102 nInvalidateMode |= awt::InvalidateStyle::TRANSPARENT;
104 nInvalidateMode |= awt::InvalidateStyle::NOTRANSPARENT;
106 Invalidate(rxWindow, rRepaintBox, nInvalidateMode);
110 const css::uno::Reference<css::awt::XWindow>& rxWindow,
111 const css::awt::Rectangle& rRepaintBox,
112 const sal_Int16 nInvalidateFlags)
114 if ((nInvalidateFlags & awt::InvalidateStyle::TRANSPARENT) != 0)
120 const awt::Rectangle aBBox (
124 rRepaintBox.X + aBBox.X,
125 rRepaintBox.Y + aBBox.Y,
133 Reference<awt::XWindowPeer> xPeer (rxWindow, UNO_QUERY);
135 xPeer->invalidateRect(rRepaintBox, nInvalidateFlags);
::rtl::Reference< PresenterPaneContainer > mpPaneContainer
Reference< drawing::XPresenterHelper > mxPresenterHelper
css::uno::Reference< css::awt::XWindowPeer > mxParentWindowPeer
void Invalidate(const css::uno::Reference< css::awt::XWindow > &rxWindow)
Request a repaint of the whole window.
css::uno::Reference< css::awt::XWindow > mxParentWindow
::std::function< void(const css::awt::Rectangle &rRepaintBox)> GetInvalidator(const css::uno::Reference< css::awt::XWindow > &rxWindow)
std::shared_ptr< PaneDescriptor > SharedPaneDescriptor
css::uno::Reference< css::drawing::XPresenterHelper > mxPresenterHelper
PresenterPaintManager(const css::uno::Reference< css::awt::XWindow > &rxParentWindow, const css::uno::Reference< css::drawing::XPresenterHelper > &rxPresenterHelper, const rtl::Reference< PresenterPaneContainer > &rpPaneContainer)
Create paint manager with the window that is the top node in the local window hierarchy.