LibreOffice Module sd (master) 1
PresenterHelpView.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_PRESENTERHELPVIEW_HXX
21#define INCLUDED_SDEXT_SOURCE_PRESENTER_PRESENTERHELPVIEW_HXX
22
26#include <com/sun/star/awt/XPaintListener.hpp>
27#include <com/sun/star/awt/XWindowListener.hpp>
28#include <com/sun/star/drawing/framework/XView.hpp>
29#include <com/sun/star/drawing/framework/XResourceId.hpp>
30#include <com/sun/star/frame/XController.hpp>
31#include <memory>
32
33namespace sdext::presenter {
34
35class PresenterButton;
36
37typedef cppu::WeakComponentImplHelper<
38 css::drawing::framework::XView,
39 css::awt::XWindowListener,
40 css::awt::XPaintListener
42
46 : private ::cppu::BaseMutex,
48{
49public:
50 explicit PresenterHelpView (
51 const css::uno::Reference<css::uno::XComponentContext>& rxContext,
52 const css::uno::Reference<css::drawing::framework::XResourceId>& rxViewId,
53 const rtl::Reference<::sd::DrawController>& rxController,
54 ::rtl::Reference<PresenterController> xPresenterController);
55 virtual ~PresenterHelpView() override;
56
57 virtual void SAL_CALL disposing() override;
58
59 // lang::XEventListener
60
61 virtual void SAL_CALL
62 disposing (const css::lang::EventObject& rEventObject) override;
63
64 // XWindowListener
65
66 virtual void SAL_CALL windowResized (const css::awt::WindowEvent& rEvent) override;
67
68 virtual void SAL_CALL windowMoved (const css::awt::WindowEvent& rEvent) override;
69
70 virtual void SAL_CALL windowShown (const css::lang::EventObject& rEvent) override;
71
72 virtual void SAL_CALL windowHidden (const css::lang::EventObject& rEvent) override;
73
74 // XPaintListener
75
76 virtual void SAL_CALL windowPaint (const css::awt::PaintEvent& rEvent) override;
77
78 // XResourceId
79
80 virtual css::uno::Reference<css::drawing::framework::XResourceId> SAL_CALL getResourceId() override;
81
82 virtual sal_Bool SAL_CALL isAnchorOnly() override;
83
84private:
85 class TextContainer;
86
87 css::uno::Reference<css::uno::XComponentContext> mxComponentContext;
88 css::uno::Reference<css::drawing::framework::XResourceId> mxViewId;
89 css::uno::Reference<css::drawing::framework::XPane> mxPane;
90 css::uno::Reference<css::awt::XWindow> mxWindow;
91 css::uno::Reference<css::rendering::XCanvas> mxCanvas;
94 std::unique_ptr<TextContainer> mpTextContainer;
96 sal_Int32 mnSeparatorY;
97 sal_Int32 mnMaximalWidth;
98
99 void ProvideCanvas();
100 void Resize();
101 void Paint (const css::awt::Rectangle& rRedrawArea);
102 void ReadHelpStrings();
103 void ProcessString (
104 const css::uno::Reference<css::beans::XPropertySet>& rsProperties);
105
109 void CheckFontSize();
110
114 void ThrowIfDisposed();
115};
116
117} // end of namespace ::sdext::presenter
118
119#endif
120
121/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Show help text that describes the defined keys.
void ProcessString(const css::uno::Reference< css::beans::XPropertySet > &rsProperties)
virtual void SAL_CALL windowResized(const css::awt::WindowEvent &rEvent) override
::rtl::Reference< PresenterButton > mpCloseButton
css::uno::Reference< css::awt::XWindow > mxWindow
virtual void SAL_CALL disposing(const css::lang::EventObject &rEventObject) override
css::uno::Reference< css::rendering::XCanvas > mxCanvas
virtual css::uno::Reference< css::drawing::framework::XResourceId > SAL_CALL getResourceId() override
PresenterTheme::SharedFontDescriptor mpFont
virtual void SAL_CALL windowShown(const css::lang::EventObject &rEvent) override
std::unique_ptr< TextContainer > mpTextContainer
void Paint(const css::awt::Rectangle &rRedrawArea)
virtual sal_Bool SAL_CALL isAnchorOnly() override
virtual void SAL_CALL windowMoved(const css::awt::WindowEvent &rEvent) override
css::uno::Reference< css::drawing::framework::XPane > mxPane
virtual void SAL_CALL windowPaint(const css::awt::PaintEvent &rEvent) override
void CheckFontSize()
Find a font size, so that all text can be displayed at the same time.
css::uno::Reference< css::drawing::framework::XResourceId > mxViewId
virtual void SAL_CALL windowHidden(const css::lang::EventObject &rEvent) override
::rtl::Reference< PresenterController > mpPresenterController
css::uno::Reference< css::uno::XComponentContext > mxComponentContext
virtual void SAL_CALL disposing() override
PresenterHelpView(const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Reference< css::drawing::framework::XResourceId > &rxViewId, const rtl::Reference<::sd::DrawController > &rxController, ::rtl::Reference< PresenterController > xPresenterController)
std::shared_ptr< FontDescriptor > SharedFontDescriptor
cppu::WeakComponentImplHelper< css::drawing::framework::XView, css::awt::XWindowListener, css::awt::XPaintListener > PresenterHelpViewInterfaceBase
unsigned char sal_Bool