Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
5 : : * This Source Code Form is subject to the terms of the Mozilla Public
6 : : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : : *
9 : : * This file incorporates work covered by the following license notice:
10 : : *
11 : : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : : * contributor license agreements. See the NOTICE file distributed
13 : : * with this work for additional information regarding copyright
14 : : * ownership. The ASF licenses this file to you under the Apache
15 : : * License, Version 2.0 (the "License"); you may not use this file
16 : : * except in compliance with the License. You may obtain a copy of
17 : : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : : */
19 : :
20 : : #ifndef SDEXT_PRESENTER_PRESENTER_PAINT_MANAGER_HXX
21 : : #define SDEXT_PRESENTER_PRESENTER_PAINT_MANAGER_HXX
22 : :
23 : : #include <com/sun/star/awt/XWindow.hpp>
24 : : #include <com/sun/star/awt/XWindowPeer.hpp>
25 : : #include <com/sun/star/drawing/XPresenterHelper.hpp>
26 : : #include <rtl/ref.hxx>
27 : : #include <boost/function.hpp>
28 : :
29 : : namespace css = ::com::sun::star;
30 : :
31 : : namespace sdext { namespace presenter {
32 : :
33 : : class PresenterPaneContainer;
34 : :
35 : : /** Synchronize painting of windows and canvases. At the moment there is
36 : : just some processing of invalidate calls.
37 : : This could be extended to process incoming windowPaint() calls.
38 : : */
39 : 0 : class PresenterPaintManager
40 : : {
41 : : public:
42 : : /** Create paint manager with the window that is the top node in the
43 : : local window hierarchy.
44 : : */
45 : : PresenterPaintManager (
46 : : const css::uno::Reference<css::awt::XWindow>& rxParentWindow,
47 : : const css::uno::Reference<css::drawing::XPresenterHelper>& rxPresenterHelper,
48 : : const rtl::Reference<PresenterPaneContainer>& rpPaneContainer);
49 : :
50 : : ::boost::function<void(const css::awt::Rectangle& rRepaintBox)>
51 : : GetInvalidator (
52 : : const css::uno::Reference<css::awt::XWindow>& rxWindow,
53 : : const bool bSynchronous = false);
54 : :
55 : : /** Request a repaint of the whole window.
56 : : @param rxWindow
57 : : May be the parent window or one of its descendents.
58 : : */
59 : : void Invalidate (
60 : : const css::uno::Reference<css::awt::XWindow>& rxWindow,
61 : : const bool bSynchronous = false);
62 : : void Invalidate (
63 : : const css::uno::Reference<css::awt::XWindow>& rxWindow,
64 : : const sal_Int16 nInvalidateFlags);
65 : :
66 : : /** Request a repaint of a part of a window.
67 : : @param rxWindow
68 : : May be the parent window or one of its descendents.
69 : : */
70 : : void Invalidate (
71 : : const css::uno::Reference<css::awt::XWindow>& rxWindow,
72 : : const css::awt::Rectangle& rRepaintBox,
73 : : const bool bSynchronous = false);
74 : : void Invalidate (
75 : : const css::uno::Reference<css::awt::XWindow>& rxWindow,
76 : : const css::awt::Rectangle& rRepaintBox,
77 : : const sal_Int16 nInvalidateFlags);
78 : :
79 : : private:
80 : : css::uno::Reference<css::awt::XWindow> mxParentWindow;
81 : : css::uno::Reference<css::awt::XWindowPeer> mxParentWindowPeer;
82 : : css::uno::Reference<css::drawing::XPresenterHelper> mxPresenterHelper;
83 : : ::rtl::Reference<PresenterPaneContainer> mpPaneContainer;
84 : : };
85 : :
86 : : } }
87 : :
88 : : #endif
89 : :
90 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|