LibreOffice Module sd (master) 1
Pane.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 <com/sun/star/drawing/framework/XPane.hpp>
23#include <com/sun/star/drawing/framework/XPane2.hpp>
26#include <vcl/vclptr.hxx>
27#include <vcl/window.hxx>
28
29namespace sd::framework {
30
31typedef ::cppu::WeakComponentImplHelper <
32 css::drawing::framework::XPane,
33 css::drawing::framework::XPane2
35
48class Pane
49 : protected cppu::BaseMutex,
51{
52public:
62 Pane (
63 const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId,
64 vcl::Window* pWindow)
65 noexcept;
66 virtual ~Pane() override;
67
68 virtual void SAL_CALL disposing() override;
69
73 virtual vcl::Window* GetWindow();
74
75 //----- XPane -------------------------------------------------------------
76
81 virtual css::uno::Reference<css::awt::XWindow>
82 SAL_CALL getWindow() override;
83
84 virtual css::uno::Reference<css::rendering::XCanvas>
85 SAL_CALL getCanvas() override;
86
87 //----- XPane2 -------------------------------------------------------------
88
89 virtual sal_Bool SAL_CALL isVisible() override;
90
91 virtual void SAL_CALL setVisible (sal_Bool bIsVisible) override;
92
93 virtual css::uno::Reference<css::accessibility::XAccessible> SAL_CALL getAccessible() override;
94
95 virtual void SAL_CALL setAccessible (
96 const css::uno::Reference<css::accessibility::XAccessible>& rxAccessible) override;
97
98 //----- XResource ---------------------------------------------------------
99
100 virtual css::uno::Reference<css::drawing::framework::XResourceId>
101 SAL_CALL getResourceId() override;
102
106 virtual sal_Bool SAL_CALL isAnchorOnly() override;
107
108protected:
109 css::uno::Reference<css::drawing::framework::XResourceId> mxPaneId;
111 css::uno::Reference<css::awt::XWindow> mxWindow;
112 css::uno::Reference<css::rendering::XCanvas> mxCanvas;
113
119 virtual css::uno::Reference<css::rendering::XCanvas>
120 CreateCanvas();
121
128 void ThrowIfDisposed() const;
129};
130
131} // end of namespace sd::framework
132
133/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
A pane is a wrapper for a window and possibly for a tab bar (for view switching).
Definition: Pane.hxx:51
VclPtr< vcl::Window > mpWindow
Definition: Pane.hxx:110
Pane(const css::uno::Reference< css::drawing::framework::XResourceId > &rxPaneId, vcl::Window *pWindow) noexcept
Create a new Pane object that wraps the given window.
Definition: Pane.cxx:35
virtual css::uno::Reference< css::drawing::framework::XResourceId > SAL_CALL getResourceId() override
Definition: Pane.cxx:127
css::uno::Reference< css::rendering::XCanvas > mxCanvas
Definition: Pane.hxx:112
virtual ~Pane() override
Definition: Pane.cxx:46
virtual void SAL_CALL setAccessible(const css::uno::Reference< css::accessibility::XAccessible > &rxAccessible) override
Definition: Pane.cxx:116
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessible() override
Definition: Pane.cxx:106
virtual void SAL_CALL disposing() override
Definition: Pane.cxx:50
virtual css::uno::Reference< css::awt::XWindow > SAL_CALL getWindow() override
For a UNO API based implementation of a view this may the most important method of this class because...
Definition: Pane.cxx:66
virtual css::uno::Reference< css::rendering::XCanvas > CreateCanvas()
Override this method, not getCanvas(), when you want to provide a different canvas.
Definition: Pane.cxx:139
virtual sal_Bool SAL_CALL isAnchorOnly() override
For the typical pane it makes no sense to be displayed without a view.
Definition: Pane.cxx:134
css::uno::Reference< css::awt::XWindow > mxWindow
Definition: Pane.hxx:111
virtual vcl::Window * GetWindow()
This method is typically used to obtain a Window pointer from an XPane object.
Definition: Pane.cxx:56
virtual void SAL_CALL setVisible(sal_Bool bIsVisible) override
Definition: Pane.cxx:97
virtual css::uno::Reference< css::rendering::XCanvas > SAL_CALL getCanvas() override
Definition: Pane.cxx:73
void ThrowIfDisposed() const
Throw DisposedException when the object has already been disposed or is currently being disposed.
Definition: Pane.cxx:154
virtual sal_Bool SAL_CALL isVisible() override
Definition: Pane.cxx:86
css::uno::Reference< css::drawing::framework::XResourceId > mxPaneId
Definition: Pane.hxx:109
::cppu::WeakComponentImplHelper< css::drawing::framework::XPane, css::drawing::framework::XPane2 > PaneInterfaceBase
Definition: Pane.hxx:34
unsigned char sal_Bool