LibreOffice Module sd (master) 1
PresenterPaneBase.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_PRESENTERPANEBASE_HXX
21#define INCLUDED_SDEXT_SOURCE_PRESENTER_PRESENTERPANEBASE_HXX
22
25#include <com/sun/star/awt/XWindowListener.hpp>
26#include <com/sun/star/drawing/XPresenterHelper.hpp>
27#include <com/sun/star/drawing/framework/XPane.hpp>
28#include <com/sun/star/drawing/framework/XPaneBorderPainter.hpp>
29#include <com/sun/star/lang/XInitialization.hpp>
30#include <com/sun/star/uno/XComponentContext.hpp>
31#include <com/sun/star/rendering/XCanvas.hpp>
32#include <rtl/ref.hxx>
33
34
35namespace sdext::presenter {
36
37class PresenterController;
38
39typedef ::cppu::WeakComponentImplHelper <
40 css::drawing::framework::XPane,
41 css::lang::XInitialization,
42 css::awt::XWindowListener,
43 css::awt::XPaintListener
45
53 : protected ::cppu::BaseMutex,
55{
56public:
58 const css::uno::Reference<css::uno::XComponentContext>& rxContext,
59 ::rtl::Reference<PresenterController> xPresenterController);
60 virtual ~PresenterPaneBase() override;
63
64 virtual void SAL_CALL disposing() override;
65
66 const css::uno::Reference<css::awt::XWindow>& GetBorderWindow() const;
67 void SetTitle (const OUString& rsTitle);
68 const OUString& GetTitle() const;
69 const css::uno::Reference<css::drawing::framework::XPaneBorderPainter>& GetPaneBorderPainter() const;
70
71 // XInitialization
72
73 virtual void SAL_CALL initialize (const css::uno::Sequence<css::uno::Any>& rArguments) override;
74
75 // XResourceId
76
77 virtual css::uno::Reference<css::drawing::framework::XResourceId> SAL_CALL getResourceId() override;
78
79 virtual sal_Bool SAL_CALL isAnchorOnly() override;
80
81 // XWindowListener
82
83 virtual void SAL_CALL windowResized (const css::awt::WindowEvent& rEvent) override;
84
85 virtual void SAL_CALL windowMoved (const css::awt::WindowEvent& rEvent) override;
86
87 virtual void SAL_CALL windowShown (const css::lang::EventObject& rEvent) override;
88
89 virtual void SAL_CALL windowHidden (const css::lang::EventObject& rEvent) override;
90
91 // lang::XEventListener
92
93 virtual void SAL_CALL disposing (const css::lang::EventObject& rEvent) override;
94
95protected:
97 css::uno::Reference<css::awt::XWindow> mxParentWindow;
98 css::uno::Reference<css::awt::XWindow> mxBorderWindow;
99 css::uno::Reference<css::rendering::XCanvas> mxBorderCanvas;
100 css::uno::Reference<css::awt::XWindow> mxContentWindow;
101 css::uno::Reference<css::rendering::XCanvas> mxContentCanvas;
102 css::uno::Reference<css::drawing::framework::XResourceId> mxPaneId;
103 css::uno::Reference<css::drawing::framework::XPaneBorderPainter> mxBorderPainter;
104 css::uno::Reference<css::drawing::XPresenterHelper> mxPresenterHelper;
105 OUString msTitle;
106 css::uno::Reference<css::uno::XComponentContext> mxComponentContext;
107
108 virtual void CreateCanvases (
109 const css::uno::Reference<css::rendering::XSpriteCanvas>& rxParentCanvas) = 0;
110
111 void CreateWindows (
112 const bool bIsWindowVisibleOnCreation);
113 void PaintBorder (const css::awt::Rectangle& rUpdateRectangle);
114 void ToTop();
115 void LayoutContextWindow();
116 bool IsVisible() const;
117
121 void ThrowIfDisposed();
122};
123
124} // end of namespace ::sd::presenter
125
126#endif
127
128/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Base class of the panes used by the presenter screen.
void PaintBorder(const css::awt::Rectangle &rUpdateRectangle)
virtual void SAL_CALL windowShown(const css::lang::EventObject &rEvent) override
css::uno::Reference< css::drawing::framework::XResourceId > mxPaneId
css::uno::Reference< css::awt::XWindow > mxBorderWindow
css::uno::Reference< css::uno::XComponentContext > mxComponentContext
virtual void SAL_CALL windowMoved(const css::awt::WindowEvent &rEvent) override
virtual sal_Bool SAL_CALL isAnchorOnly() override
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &rArguments) override
css::uno::Reference< css::awt::XWindow > mxContentWindow
css::uno::Reference< css::rendering::XCanvas > mxContentCanvas
virtual void SAL_CALL disposing() override
void CreateWindows(const bool bIsWindowVisibleOnCreation)
::rtl::Reference< PresenterController > mpPresenterController
const css::uno::Reference< css::drawing::framework::XPaneBorderPainter > & GetPaneBorderPainter() const
virtual void SAL_CALL windowResized(const css::awt::WindowEvent &rEvent) override
PresenterPaneBase & operator=(const PresenterPaneBase &)=delete
const css::uno::Reference< css::awt::XWindow > & GetBorderWindow() const
virtual void CreateCanvases(const css::uno::Reference< css::rendering::XSpriteCanvas > &rxParentCanvas)=0
virtual css::uno::Reference< css::drawing::framework::XResourceId > SAL_CALL getResourceId() override
PresenterPaneBase(const css::uno::Reference< css::uno::XComponentContext > &rxContext, ::rtl::Reference< PresenterController > xPresenterController)
css::uno::Reference< css::awt::XWindow > mxParentWindow
css::uno::Reference< css::rendering::XCanvas > mxBorderCanvas
css::uno::Reference< css::drawing::framework::XPaneBorderPainter > mxBorderPainter
virtual void SAL_CALL windowHidden(const css::lang::EventObject &rEvent) override
void SetTitle(const OUString &rsTitle)
css::uno::Reference< css::drawing::XPresenterHelper > mxPresenterHelper
PresenterPaneBase(const PresenterPaneBase &)=delete
::cppu::WeakComponentImplHelper< css::drawing::framework::XPane, css::lang::XInitialization, css::awt::XWindowListener, css::awt::XPaintListener > PresenterPaneBaseInterfaceBase
unsigned char sal_Bool