LibreOffice Module basctl (master) 1
accessibledialogcontrolshape.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/beans/XPropertySet.hpp>
23#include <com/sun/star/lang/XServiceInfo.hpp>
26#include <vcl/vclptr.hxx>
27
28namespace vcl { class Window; }
29
30namespace basctl
31{
32
33class DlgEdObj;
34class DialogWindow;
35
36
37
38class AccessibleDialogControlShape final : public cppu::ImplInheritanceHelper<
39 comphelper::OAccessibleExtendedComponentHelper,
40 css::accessibility::XAccessible,
41 css::lang::XServiceInfo,
42 css::beans::XPropertyChangeListener>
43{
45
46private:
51
52 css::awt::Rectangle m_aBounds;
53 css::uno::Reference< css::beans::XPropertySet > m_xControlModel;
54
55 bool IsFocused() const;
56 bool IsSelected() const;
57
58 void SetFocused (bool bFocused);
59 void SetSelected (bool bSelected);
60
61 css::awt::Rectangle GetBounds() const;
62 void SetBounds( const css::awt::Rectangle& aBounds );
63
64 vcl::Window* GetWindow() const;
65
66 OUString GetModelStringProperty( OUString const & pPropertyName );
67
68 void FillAccessibleStateSet( sal_Int64& rStateSet );
69
70 // OCommonAccessibleComponent
71 virtual css::awt::Rectangle implGetBounds() override;
72
73 // XComponent
74 virtual void SAL_CALL disposing() override;
75
76public:
78 virtual ~AccessibleDialogControlShape() override;
79
80 // XEventListener
81 virtual void SAL_CALL disposing( const css::lang::EventObject& rSource ) override;
82
83 // XPropertyChangeListener
84 virtual void SAL_CALL propertyChange( const css::beans::PropertyChangeEvent& rEvent ) override;
85
86 // XServiceInfo
87 virtual OUString SAL_CALL getImplementationName() override;
88 virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) override;
89 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
90
91 // XAccessible
92 virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) override;
93
94 // XAccessibleContext
95 virtual sal_Int64 SAL_CALL getAccessibleChildCount( ) override;
96 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int64 i ) override;
97 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent( ) override;
98 virtual sal_Int64 SAL_CALL getAccessibleIndexInParent( ) override;
99 virtual sal_Int16 SAL_CALL getAccessibleRole( ) override;
100 virtual OUString SAL_CALL getAccessibleDescription( ) override;
101 virtual OUString SAL_CALL getAccessibleName( ) override;
102 virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet( ) override;
103 virtual sal_Int64 SAL_CALL getAccessibleStateSet( ) override;
104 virtual css::lang::Locale SAL_CALL getLocale( ) override;
105
106 // XAccessibleComponent
107 virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const css::awt::Point& aPoint ) override;
108 virtual void SAL_CALL grabFocus( ) override;
109 virtual sal_Int32 SAL_CALL getForeground( ) override;
110 virtual sal_Int32 SAL_CALL getBackground( ) override;
111
112 // XAccessibleExtendedComponent
113 virtual css::uno::Reference< css::awt::XFont > SAL_CALL getFont( ) override;
114 virtual OUString SAL_CALL getTitledBorderText( ) override;
115 virtual OUString SAL_CALL getToolTipText( ) override;
116};
117
118} // namespace basctl
119
120/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int64 i) override
virtual OUString SAL_CALL getToolTipText() override
OUString GetModelStringProperty(OUString const &pPropertyName)
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL disposing(const css::lang::EventObject &rSource) override
virtual sal_Int16 SAL_CALL getAccessibleRole() override
virtual OUString SAL_CALL getAccessibleName() override
virtual void SAL_CALL propertyChange(const css::beans::PropertyChangeEvent &rEvent) override
virtual sal_Int32 SAL_CALL getForeground() override
virtual OUString SAL_CALL getAccessibleDescription() override
void SetBounds(const css::awt::Rectangle &aBounds)
virtual sal_Bool SAL_CALL supportsService(const OUString &rServiceName) override
AccessibleDialogControlShape(DialogWindow *, DlgEdObj *)
virtual sal_Int64 SAL_CALL getAccessibleStateSet() override
virtual OUString SAL_CALL getTitledBorderText() override
virtual sal_Int32 SAL_CALL getBackground() override
virtual OUString SAL_CALL getImplementationName() override
virtual sal_Int64 SAL_CALL getAccessibleChildCount() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(const css::awt::Point &aPoint) override
virtual css::awt::Rectangle implGetBounds() override
virtual sal_Int64 SAL_CALL getAccessibleIndexInParent() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
virtual css::lang::Locale SAL_CALL getLocale() override
virtual css::uno::Reference< css::awt::XFont > SAL_CALL getFont() override
virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext() override
css::uno::Reference< css::beans::XPropertySet > m_xControlModel
unsigned char sal_Bool