sc: copy cache values when clone color conditional format
[LibreOffice.git] / sdext / source / presenter / PresenterSpritePane.hxx
blob377d5fa7898ed21d64928754b24640ef31748fb1
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SDEXT_SOURCE_PRESENTER_PRESENTERSPRITEPANE_HXX
21 #define INCLUDED_SDEXT_SOURCE_PRESENTER_PRESENTERSPRITEPANE_HXX
23 #include "PresenterPaneBase.hxx"
24 #include "PresenterSprite.hxx"
25 #include <com/sun/star/uno/XComponentContext.hpp>
26 #include <com/sun/star/rendering/XCanvas.hpp>
27 #include <com/sun/star/rendering/XSpriteCanvas.hpp>
28 #include <rtl/ref.hxx>
29 #include <memory>
31 namespace sdext::presenter
33 /** Use a sprite to display the contents and the border of a pane. Windows
34 are still used to define the locations and sizes of both the border and
35 the pane content. Note that every resize results in a disposed canvas.
36 Therefore call getCanvas in every repaint or at least after every resize.
38 class PresenterSpritePane : public PresenterPaneBase
40 public:
41 PresenterSpritePane(const css::uno::Reference<css::uno::XComponentContext>& rxContext,
42 const ::rtl::Reference<PresenterController>& rpPresenterController);
43 virtual ~PresenterSpritePane() override;
45 virtual void SAL_CALL disposing() override;
47 using PresenterPaneBase::disposing;
49 // XPane
51 virtual css::uno::Reference<css::awt::XWindow> SAL_CALL getWindow() override;
53 virtual css::uno::Reference<css::rendering::XCanvas> SAL_CALL getCanvas() override;
55 // XWindowListener
57 virtual void SAL_CALL windowResized(const css::awt::WindowEvent& rEvent) override;
59 virtual void SAL_CALL windowMoved(const css::awt::WindowEvent& rEvent) override;
61 virtual void SAL_CALL windowShown(const css::lang::EventObject& rEvent) override;
63 virtual void SAL_CALL windowHidden(const css::lang::EventObject& rEvent) override;
65 // XPaintListener
67 virtual void SAL_CALL windowPaint(const css::awt::PaintEvent& rEvent) override;
69 private:
70 css::uno::Reference<css::rendering::XSpriteCanvas> mxParentCanvas;
71 std::shared_ptr<PresenterSprite> mpSprite;
73 virtual void CreateCanvases(
74 const css::uno::Reference<css::rendering::XSpriteCanvas>& rxParentCanvas) override;
75 void UpdateCanvases();
78 } // end of namespace ::sd::presenter
80 #endif
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */