LibreOffice Module chart2 (master) 1
AccessibleChartView.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#pragma once
20
21#include "AccessibleBase.hxx"
24#include <com/sun/star/lang/XInitialization.hpp>
25#include <com/sun/star/view/XSelectionChangeListener.hpp>
26
27#include <memory>
28
29namespace com::sun::star::accessibility { class XAccessible; }
30namespace com::sun::star::awt { class XWindow; }
31namespace com::sun::star::frame { class XModel; }
32namespace com::sun::star::view { class XSelectionSupplier; }
33
34namespace accessibility
35{
36class IAccessibleViewForwarder;
37}
38
39namespace chart
40{
41class ChartView;
42
43namespace impl
44{
45typedef ::cppu::ImplInheritanceHelper<
47 css::lang::XInitialization,
48 css::view::XSelectionChangeListener >
50}
51
54{
55public:
57 virtual ~AccessibleChartView() override;
58
60
61 // ____ WeakComponentHelper (called from XComponent::dispose()) ____
63
64 // ____ lang::XInitialization ____
65 // 0: view::XSelectionSupplier offers notifications for selection changes and access to the selection itself
66 // 1: frame::XModel representing the chart model - offers access to object data
67 // 2: lang::XInterface representing the normal chart view - offers access to some extra object data
68 // 3: accessibility::XAccessible representing the parent accessible
69 // 4: awt::XWindow representing the view's window (is a vcl Window)
70 // all arguments are only valid until next initialization - don't keep them longer
71 virtual void SAL_CALL initialize(
72 const css::uno::Sequence< css::uno::Any >& aArguments ) override;
73
74 // ____ view::XSelectionChangeListener ____
75 virtual void SAL_CALL selectionChanged( const css::lang::EventObject& aEvent ) override;
76
77 // ________ XEventListener ________
78 virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
79
80 // ________ XAccessibleContext ________
81 virtual OUString SAL_CALL getAccessibleDescription() override;
82 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override;
83 virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override;
84 virtual OUString SAL_CALL getAccessibleName() override;
85 virtual sal_Int16 SAL_CALL getAccessibleRole() override;
86
87 // ________ XAccessibleComponent ________
88 virtual css::awt::Rectangle SAL_CALL getBounds() override;
89 virtual css::awt::Point SAL_CALL getLocationOnScreen() override;
90
91protected:
92 // ________ AccessibleChartElement ________
93 virtual css::awt::Point GetUpperLeftOnScreen() const override;
94
95private: // methods
102 css::awt::Rectangle GetWindowPosSize() const;
103
104private: // members
105 css::uno::WeakReference< css::view::XSelectionSupplier > m_xSelectionSupplier;
108 css::uno::WeakReference< css::awt::XWindow > m_xWindow;
109 css::uno::WeakReference< css::accessibility::XAccessible > m_xParent;
110
111 std::shared_ptr< ObjectHierarchy > m_spObjectHierarchy;
114 std::unique_ptr<::accessibility::IAccessibleViewForwarder> m_pViewForwarder;
115};
116
117} //namespace chart
118
119/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Base class for all Chart Accessibility objects.
virtual void SAL_CALL disposing() override
virtual void SAL_CALL selectionChanged(const css::lang::EventObject &aEvent) override
std::shared_ptr< ObjectHierarchy > m_spObjectHierarchy
virtual OUString SAL_CALL getAccessibleName() override
virtual sal_Int16 SAL_CALL getAccessibleRole() override
virtual OUString SAL_CALL getAccessibleDescription() override
virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override
unotools::WeakReference< ChartView > m_xChartView
std::unique_ptr<::accessibility::IAccessibleViewForwarder > m_pViewForwarder
css::uno::WeakReference< css::view::XSelectionSupplier > m_xSelectionSupplier
css::uno::WeakReference< css::accessibility::XAccessible > m_xParent
virtual css::awt::Point SAL_CALL getLocationOnScreen() override
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &aArguments) override
css::awt::Rectangle GetWindowPosSize() const
virtual css::awt::Rectangle SAL_CALL getBounds() override
virtual void SAL_CALL disposing() override
virtual ~AccessibleChartView() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
virtual css::awt::Point GetUpperLeftOnScreen() const override
unotools::WeakReference<::chart::ChartModel > m_xChartModel
AccessibleUniqueId m_aCurrentSelectionOID
css::uno::WeakReference< css::awt::XWindow > m_xWindow
::cppu::ImplInheritanceHelper< ::chart::AccessibleBase, css::lang::XInitialization, css::view::XSelectionChangeListener > AccessibleChartView_Base