1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
22 #include <com/sun/star/beans/XPropertySet.hpp>
23 #include <com/sun/star/lang/XServiceInfo.hpp>
24 #include <comphelper/accessiblecomponenthelper.hxx>
25 #include <cppuhelper/implbase.hxx>
26 #include <vcl/vclptr.hxx>
28 namespace vcl
{ class Window
; }
38 class AccessibleDialogControlShape final
: public cppu::ImplInheritanceHelper
<
39 comphelper::OAccessibleExtendedComponentHelper
,
40 css::accessibility::XAccessible
,
41 css::lang::XServiceInfo
,
42 css::beans::XPropertyChangeListener
>
44 friend class AccessibleDialogWindow
;
47 VclPtr
<DialogWindow
> m_pDialogWindow
;
48 DlgEdObj
* m_pDlgEdObj
;
52 css::awt::Rectangle m_aBounds
;
53 css::uno::Reference
< css::beans::XPropertySet
> m_xControlModel
;
55 bool IsFocused() const;
56 bool IsSelected() const;
58 void SetFocused (bool bFocused
);
59 void SetSelected (bool bSelected
);
61 css::awt::Rectangle
GetBounds() const;
62 void SetBounds( const css::awt::Rectangle
& aBounds
);
64 vcl::Window
* GetWindow() const;
66 OUString
GetModelStringProperty( OUString
const & pPropertyName
);
68 void FillAccessibleStateSet( sal_Int64
& rStateSet
);
70 // OCommonAccessibleComponent
71 virtual css::awt::Rectangle
implGetBounds() override
;
74 virtual void SAL_CALL
disposing() override
;
77 AccessibleDialogControlShape (DialogWindow
*, DlgEdObj
*);
78 virtual ~AccessibleDialogControlShape() override
;
81 virtual void SAL_CALL
disposing( const css::lang::EventObject
& rSource
) override
;
83 // XPropertyChangeListener
84 virtual void SAL_CALL
propertyChange( const css::beans::PropertyChangeEvent
& rEvent
) override
;
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
;
92 virtual css::uno::Reference
< css::accessibility::XAccessibleContext
> SAL_CALL
getAccessibleContext( ) override
;
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
;
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
;
112 // XAccessibleExtendedComponent
113 virtual OUString SAL_CALL
getTitledBorderText( ) override
;
114 virtual OUString SAL_CALL
getToolTipText( ) override
;
117 } // namespace basctl
119 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */