LibreOffice Module sdext (master)  1
PresenterPane.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 #ifndef INCLUDED_SDEXT_SOURCE_PRESENTER_PRESENTERPANE_HXX
21 #define INCLUDED_SDEXT_SOURCE_PRESENTER_PRESENTERPANE_HXX
22 
23 #include "PresenterPaneBase.hxx"
24 #include <com/sun/star/uno/XComponentContext.hpp>
25 #include <com/sun/star/rendering/XCanvas.hpp>
26 #include <rtl/ref.hxx>
27 
28 namespace sdext::presenter
29 {
37 {
38 public:
39  PresenterPane(const css::uno::Reference<css::uno::XComponentContext>& rxContext,
40  const ::rtl::Reference<PresenterController>& rpPresenterController);
41  virtual ~PresenterPane() override;
42 
43  // XPane
44 
45  css::uno::Reference<css::awt::XWindow> SAL_CALL getWindow() override;
46 
47  css::uno::Reference<css::rendering::XCanvas> SAL_CALL getCanvas() override;
48 
49  // XWindowListener
50 
51  virtual void SAL_CALL windowResized(const css::awt::WindowEvent& rEvent) override;
52 
53  virtual void SAL_CALL windowMoved(const css::awt::WindowEvent& rEvent) override;
54 
55  virtual void SAL_CALL windowShown(const css::lang::EventObject& rEvent) override;
56 
57  virtual void SAL_CALL windowHidden(const css::lang::EventObject& rEvent) override;
58 
59  // XPaintListener
60 
61  virtual void SAL_CALL windowPaint(const css::awt::PaintEvent& rEvent) override;
62 
63 private:
67  css::awt::Rectangle maBoundingBox;
68 
69  virtual void CreateCanvases(
70  const css::uno::Reference<css::rendering::XSpriteCanvas>& rxParentCanvas) override;
71 
72  void Invalidate(const css::awt::Rectangle& rRepaintBox);
73  void UpdateBoundingBox();
74 };
75 
76 } // end of namespace ::sd::presenter
77 
78 #endif
79 
80 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::uno::Reference< css::awt::XWindow > SAL_CALL getWindow() override
virtual void SAL_CALL windowHidden(const css::lang::EventObject &rEvent) override
css::awt::Rectangle maBoundingBox
Store the bounding box so that when the window is resized or moved we still know the old position and...
virtual void SAL_CALL windowResized(const css::awt::WindowEvent &rEvent) override
virtual ~PresenterPane() override
Base class of the panes used by the presenter screen.
virtual void CreateCanvases(const css::uno::Reference< css::rendering::XSpriteCanvas > &rxParentCanvas) override
Pane used by the presenter screen.
virtual void SAL_CALL windowShown(const css::lang::EventObject &rEvent) override
virtual void SAL_CALL windowPaint(const css::awt::PaintEvent &rEvent) override
PresenterPane(const css::uno::Reference< css::uno::XComponentContext > &rxContext, const ::rtl::Reference< PresenterController > &rpPresenterController)
virtual void SAL_CALL windowMoved(const css::awt::WindowEvent &rEvent) override
css::uno::Reference< css::rendering::XCanvas > SAL_CALL getCanvas() override
void Invalidate(const css::awt::Rectangle &rRepaintBox)