LibreOffice Module sd (master) 1
PresenterSpritePane.hxx
Go to the documentation of this file.
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#pragma once
21
22#include "PresenterPaneBase.hxx"
23#include "PresenterSprite.hxx"
24#include <com/sun/star/uno/XComponentContext.hpp>
25#include <com/sun/star/rendering/XCanvas.hpp>
26#include <com/sun/star/rendering/XSpriteCanvas.hpp>
27#include <rtl/ref.hxx>
28#include <memory>
29
30namespace sdext::presenter
31{
38{
39public:
40 PresenterSpritePane(const css::uno::Reference<css::uno::XComponentContext>& rxContext,
41 const ::rtl::Reference<PresenterController>& rpPresenterController);
42 virtual ~PresenterSpritePane() override;
43
44 virtual void SAL_CALL disposing() override;
45
47
48 // XPane
49
50 virtual css::uno::Reference<css::awt::XWindow> SAL_CALL getWindow() override;
51
52 virtual css::uno::Reference<css::rendering::XCanvas> SAL_CALL getCanvas() override;
53
54 // XWindowListener
55
56 virtual void SAL_CALL windowResized(const css::awt::WindowEvent& rEvent) override;
57
58 virtual void SAL_CALL windowMoved(const css::awt::WindowEvent& rEvent) override;
59
60 virtual void SAL_CALL windowShown(const css::lang::EventObject& rEvent) override;
61
62 virtual void SAL_CALL windowHidden(const css::lang::EventObject& rEvent) override;
63
64 // XPaintListener
65
66 virtual void SAL_CALL windowPaint(const css::awt::PaintEvent& rEvent) override;
67
68private:
69 css::uno::Reference<css::rendering::XSpriteCanvas> mxParentCanvas;
70 std::shared_ptr<PresenterSprite> mpSprite;
71
72 virtual void CreateCanvases(
73 const css::uno::Reference<css::rendering::XSpriteCanvas>& rxParentCanvas) override;
74 void UpdateCanvases();
75};
76
77} // end of namespace ::sd::presenter
78
79/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Base class of the panes used by the presenter screen.
virtual void SAL_CALL disposing() override
Use a sprite to display the contents and the border of a pane.
PresenterSpritePane(const css::uno::Reference< css::uno::XComponentContext > &rxContext, const ::rtl::Reference< PresenterController > &rpPresenterController)
virtual css::uno::Reference< css::rendering::XCanvas > SAL_CALL getCanvas() override
virtual css::uno::Reference< css::awt::XWindow > SAL_CALL getWindow() override
virtual void SAL_CALL windowShown(const css::lang::EventObject &rEvent) override
virtual void SAL_CALL windowPaint(const css::awt::PaintEvent &rEvent) override
css::uno::Reference< css::rendering::XSpriteCanvas > mxParentCanvas
virtual void SAL_CALL windowResized(const css::awt::WindowEvent &rEvent) override
virtual void SAL_CALL windowHidden(const css::lang::EventObject &rEvent) override
virtual void CreateCanvases(const css::uno::Reference< css::rendering::XSpriteCanvas > &rxParentCanvas) override
virtual void SAL_CALL disposing() override
std::shared_ptr< PresenterSprite > mpSprite
virtual void SAL_CALL windowMoved(const css::awt::WindowEvent &rEvent) override