LibreOffice Module sdext (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 
23 #include <cppuhelper/basemutex.hxx>
24 #include <cppuhelper/compbase.hxx>
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 
35 namespace sdext { namespace presenter {
36 
38 
39 typedef ::cppu::WeakComponentImplHelper <
40  css::drawing::framework::XPane,
41  css::lang::XInitialization,
42  css::awt::XWindowListener,
43  css::awt::XPaintListener
45 
53  : protected ::cppu::BaseMutex,
54  public PresenterPaneBaseInterfaceBase
55 {
56 public:
58  const css::uno::Reference<css::uno::XComponentContext>& rxContext,
59  const ::rtl::Reference<PresenterController>& rpPresenterController);
60  virtual ~PresenterPaneBase() override;
61  PresenterPaneBase(const PresenterPaneBase&) = delete;
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 
95 protected:
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: */
::cppu::WeakComponentImplHelper< css::drawing::framework::XPane, css::lang::XInitialization, css::awt::XWindowListener, css::awt::XPaintListener > PresenterPaneBaseInterfaceBase
virtual css::uno::Reference< css::drawing::framework::XResourceId > SAL_CALL getResourceId() override
css::uno::Reference< css::drawing::framework::XResourceId > mxPaneId
css::uno::Reference< css::uno::XComponentContext > mxComponentContext
css::uno::Reference< css::awt::XWindow > mxBorderWindow
PresenterPaneBase & operator=(const PresenterPaneBase &)=delete
Base class of the panes used by the presenter screen.
void SetTitle(const OUString &rsTitle)
virtual sal_Bool SAL_CALL isAnchorOnly() override
virtual void CreateCanvases(const css::uno::Reference< css::rendering::XSpriteCanvas > &rxParentCanvas)=0
::rtl::Reference< PresenterController > mpPresenterController
css::uno::Reference< css::rendering::XCanvas > mxContentCanvas
The controller of the presenter screen is responsible for telling the individual views which slides t...
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &rArguments) override
css::uno::Reference< css::rendering::XCanvas > mxBorderCanvas
virtual void SAL_CALL windowResized(const css::awt::WindowEvent &rEvent) override
unsigned char sal_Bool
const css::uno::Reference< css::drawing::framework::XPaneBorderPainter > & GetPaneBorderPainter() const
virtual void SAL_CALL windowShown(const css::lang::EventObject &rEvent) override
css::uno::Reference< css::drawing::XPresenterHelper > mxPresenterHelper
const css::uno::Reference< css::awt::XWindow > & GetBorderWindow() const
virtual void SAL_CALL disposing() override
css::uno::Reference< css::awt::XWindow > mxContentWindow
void PaintBorder(const css::awt::Rectangle &rUpdateRectangle)
css::uno::Reference< css::drawing::framework::XPaneBorderPainter > mxBorderPainter
css::uno::Reference< css::awt::XWindow > mxParentWindow
virtual void SAL_CALL windowHidden(const css::lang::EventObject &rEvent) override
virtual void SAL_CALL windowMoved(const css::awt::WindowEvent &rEvent) override
PresenterPaneBase(const css::uno::Reference< css::uno::XComponentContext > &rxContext, const ::rtl::Reference< PresenterController > &rpPresenterController)
void CreateWindows(const bool bIsWindowVisibleOnCreation)