update dev300-m58
[ooovba.git] / sdext / source / presenter / PresenterPaintManager.hxx
blob5c7f7824402c0c636ef6e5e0156b0058011bc8c9
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>
40 namespace css = ::com::sun::star;
42 namespace sdext { namespace presenter {
44 class PresenterPaneContainer;
46 /** Synchronize painting of windows and canvases. At the moment there is
47 just some processing of invalidate calls.
48 This could be extended to process incoming windowPaint() calls.
50 class PresenterPaintManager
52 public:
53 /** Create paint manager with the window that is the top node in the
54 local window hierarchy.
56 PresenterPaintManager (
57 const css::uno::Reference<css::awt::XWindow>& rxParentWindow,
58 const css::uno::Reference<css::drawing::XPresenterHelper>& rxPresenterHelper,
59 const rtl::Reference<PresenterPaneContainer>& rpPaneContainer);
61 /** Request a repaint of the whole window.
62 @param rxWindow
63 May be the parent window or one of its descendents.
65 void Invalidate (
66 const css::uno::Reference<css::awt::XWindow>& rxWindow,
67 const bool bSynchronous = false);
68 void Invalidate (
69 const css::uno::Reference<css::awt::XWindow>& rxWindow,
70 const sal_Int16 nInvalidateFlags);
72 /** Request a repaint of a part of a window.
73 @param rxWindow
74 May be the parent window or one of its descendents.
76 void Invalidate (
77 const css::uno::Reference<css::awt::XWindow>& rxWindow,
78 const css::awt::Rectangle& rRepaintBox,
79 const bool bSynchronous = false);
80 void Invalidate (
81 const css::uno::Reference<css::awt::XWindow>& rxWindow,
82 const css::awt::Rectangle& rRepaintBox,
83 const sal_Int16 nInvalidateFlags);
85 private:
86 css::uno::Reference<css::awt::XWindow> mxParentWindow;
87 css::uno::Reference<css::awt::XWindowPeer> mxParentWindowPeer;
88 css::uno::Reference<css::drawing::XPresenterHelper> mxPresenterHelper;
89 ::rtl::Reference<PresenterPaneContainer> mpPaneContainer;
92 } }
94 #endif