merge the formfield patch from ooo-build
[ooovba.git] / sdext / source / presenter / PresenterPaintManager.hxx
blob42b45b94aab40c162ce258cd02fe871fea22dcdb
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: PresenterPaintManager.hxx,v $
11 * $Revision: 1.2 $
13 * This file is part of OpenOffice.org.
15 * OpenOffice.org is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU Lesser General Public License version 3
17 * only, as published by the Free Software Foundation.
19 * OpenOffice.org is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Lesser General Public License version 3 for more details
23 * (a copy is included in the LICENSE file that accompanied this code).
25 * You should have received a copy of the GNU Lesser General Public License
26 * version 3 along with OpenOffice.org. If not, see
27 * <http://www.openoffice.org/license.html>
28 * for a copy of the LGPLv3 License.
30 ************************************************************************/
32 #ifndef SDEXT_PRESENTER_PRESENTER_PAINT_MANAGER_HXX
33 #define SDEXT_PRESENTER_PRESENTER_PAINT_MANAGER_HXX
35 #include <com/sun/star/awt/XWindow.hpp>
36 #include <com/sun/star/awt/XWindowPeer.hpp>
37 #include <com/sun/star/drawing/XPresenterHelper.hpp>
38 #include <rtl/ref.hxx>
39 #include <boost/function.hpp>
41 namespace css = ::com::sun::star;
43 namespace sdext { namespace presenter {
45 class PresenterPaneContainer;
47 /** Synchronize painting of windows and canvases. At the moment there is
48 just some processing of invalidate calls.
49 This could be extended to process incoming windowPaint() calls.
51 class PresenterPaintManager
53 public:
54 /** Create paint manager with the window that is the top node in the
55 local window hierarchy.
57 PresenterPaintManager (
58 const css::uno::Reference<css::awt::XWindow>& rxParentWindow,
59 const css::uno::Reference<css::drawing::XPresenterHelper>& rxPresenterHelper,
60 const rtl::Reference<PresenterPaneContainer>& rpPaneContainer);
62 ::boost::function<void(const css::awt::Rectangle& rRepaintBox)>
63 GetInvalidator (
64 const css::uno::Reference<css::awt::XWindow>& rxWindow,
65 const bool bSynchronous = false);
67 /** Request a repaint of the whole window.
68 @param rxWindow
69 May be the parent window or one of its descendents.
71 void Invalidate (
72 const css::uno::Reference<css::awt::XWindow>& rxWindow,
73 const bool bSynchronous = false);
74 void Invalidate (
75 const css::uno::Reference<css::awt::XWindow>& rxWindow,
76 const sal_Int16 nInvalidateFlags);
78 /** Request a repaint of a part of a window.
79 @param rxWindow
80 May be the parent window or one of its descendents.
82 void Invalidate (
83 const css::uno::Reference<css::awt::XWindow>& rxWindow,
84 const css::awt::Rectangle& rRepaintBox,
85 const bool bSynchronous = false);
86 void Invalidate (
87 const css::uno::Reference<css::awt::XWindow>& rxWindow,
88 const css::awt::Rectangle& rRepaintBox,
89 const sal_Int16 nInvalidateFlags);
91 private:
92 css::uno::Reference<css::awt::XWindow> mxParentWindow;
93 css::uno::Reference<css::awt::XWindowPeer> mxParentWindowPeer;
94 css::uno::Reference<css::drawing::XPresenterHelper> mxPresenterHelper;
95 ::rtl::Reference<PresenterPaneContainer> mpPaneContainer;
98 } }
100 #endif