LibreOffice Module toolkit (master) 1
accessiblecontrolcontext.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
23#include <com/sun/star/lang/XEventListener.hpp>
25#include <rtl/ref.hxx>
26
27namespace vcl { class Window; }
28namespace com::sun::star::awt { class XWindow; }
29namespace com::sun::star::beans { class XPropertySet; }
30namespace com::sun::star::beans { class XPropertySetInfo; }
31
32namespace toolkit
33{
34
35
36 //= OAccessibleControlContext
37
38
40
48 :public cppu::ImplInheritanceHelper<
49 OAccessibleControlContext_Base, css::lang::XEventListener>
50 {
51 public:
58 const css::uno::Reference< css::accessibility::XAccessible >& _rxCreator
59 );
60
61 private:
62
63 // XAccessibleContext
64 virtual sal_Int64 SAL_CALL getAccessibleChildCount( ) override;
65 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int64 i ) override;
66 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) override;
67 virtual sal_Int16 SAL_CALL getAccessibleRole( ) override;
68 virtual OUString SAL_CALL getAccessibleDescription( ) override;
69 virtual OUString SAL_CALL getAccessibleName( ) override;
70 virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) override;
71 virtual sal_Int64 SAL_CALL getAccessibleStateSet( ) override;
72
73 // XAccessibleComponent
74 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) override;
75 virtual void SAL_CALL grabFocus( ) override;
76 virtual sal_Int32 SAL_CALL getForeground( ) override;
77 virtual sal_Int32 SAL_CALL getBackground( ) override;
78
79 // XEventListener
81 virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
82
83 // retrieves the value of a string property from the model, if the property is present
84 OUString getModelStringProperty( const char* _pPropertyName );
85
86 // starts listening at the control model (currently for disposal only)
87 void startModelListening( );
88 // stops listening at the control model
89 void stopModelListening( );
90
91 vcl::Window* implGetWindow( css::uno::Reference< css::awt::XWindow >* _pxUNOWindow = nullptr ) const;
92
95 virtual ~OAccessibleControlContext() override;
96
99 void Init(
100 const css::uno::Reference< css::accessibility::XAccessible >& _rxCreator
101 );
102
103 // OCommonAccessibleComponent overridables
104 virtual css::awt::Rectangle implGetBounds( ) override;
105
106 css::uno::Reference< css::beans::XPropertySet >
107 m_xControlModel; // the model of the control which's context we implement
108 css::uno::Reference< css::beans::XPropertySetInfo >
109 m_xModelPropsInfo; // the cached property set info of the model
110 };
111
112
113} // namespace toolkit
114
115
116/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void SAL_CALL disposing() override
class implementing the AccessibleContext for a UNO control - to be used in design mode of the control...
void Init(const css::uno::Reference< css::accessibility::XAccessible > &_rxCreator)
late ctor
virtual sal_Int32 SAL_CALL getForeground() override
virtual sal_Int64 SAL_CALL getAccessibleStateSet() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int64 i) override
virtual sal_Int64 SAL_CALL getAccessibleChildCount() override
virtual OUString SAL_CALL getAccessibleName() override
css::uno::Reference< css::beans::XPropertySetInfo > m_xModelPropsInfo
virtual void SAL_CALL grabFocus() override
static rtl::Reference< OAccessibleControlContext > create(const css::uno::Reference< css::accessibility::XAccessible > &_rxCreator)
creates an accessible context for a uno control
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
virtual OUString SAL_CALL getAccessibleDescription() override
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() override
OUString getModelStringProperty(const char *_pPropertyName)
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
virtual sal_Int32 SAL_CALL getBackground() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(const css::awt::Point &aPoint) override
virtual css::awt::Rectangle implGetBounds() override
vcl::Window * implGetWindow(css::uno::Reference< css::awt::XWindow > *_pxUNOWindow=nullptr) const
css::uno::Reference< css::beans::XPropertySet > m_xControlModel
virtual sal_Int16 SAL_CALL getAccessibleRole() override
class SAL_NO_VTABLE XPropertySet
int i
::comphelper::OAccessibleComponentHelper OAccessibleControlContext_Base