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 .
20 #ifndef INCLUDED_BASCTL_SOURCE_INC_ACCESSIBLEDIALOGCONTROLSHAPE_HXX
21 #define INCLUDED_BASCTL_SOURCE_INC_ACCESSIBLEDIALOGCONTROLSHAPE_HXX
23 #include <com/sun/star/beans/XPropertySet.hpp>
24 #include <com/sun/star/lang/XServiceInfo.hpp>
25 #include <comphelper/accessiblecomponenthelper.hxx>
26 #include <cppuhelper/implbase3.hxx>
27 #include <vcl/vclptr.hxx>
29 namespace vcl
{ class Window
; }
32 class AccessibleStateSetHelper
;
42 // class AccessibleDialogControlShape
44 typedef ::cppu::ImplHelper3
<
45 css::accessibility::XAccessible
,
46 css::lang::XServiceInfo
,
47 css::beans::XPropertyChangeListener
> AccessibleDialogControlShape_BASE
;
49 class AccessibleDialogControlShape final
: public comphelper::OAccessibleExtendedComponentHelper
,
50 public AccessibleDialogControlShape_BASE
52 friend class AccessibleDialogWindow
;
55 VclPtr
<DialogWindow
> m_pDialogWindow
;
56 DlgEdObj
* m_pDlgEdObj
;
60 css::awt::Rectangle m_aBounds
;
61 css::uno::Reference
< css::beans::XPropertySet
> m_xControlModel
;
66 void SetFocused (bool bFocused
);
67 void SetSelected (bool bSelected
);
69 css::awt::Rectangle
GetBounds();
70 void SetBounds( const css::awt::Rectangle
& aBounds
);
72 vcl::Window
* GetWindow() const;
74 OUString
GetModelStringProperty( OUString
const & pPropertyName
);
76 void FillAccessibleStateSet( utl::AccessibleStateSetHelper
& rStateSet
);
78 // OCommonAccessibleComponent
79 virtual css::awt::Rectangle
implGetBounds() override
;
82 virtual void SAL_CALL
disposing() override
;
85 AccessibleDialogControlShape (DialogWindow
*, DlgEdObj
*);
86 virtual ~AccessibleDialogControlShape() override
;
92 DECLARE_XTYPEPROVIDER()
95 virtual void SAL_CALL
disposing( const css::lang::EventObject
& rSource
) override
;
97 // XPropertyChangeListener
98 virtual void SAL_CALL
propertyChange( const css::beans::PropertyChangeEvent
& rEvent
) override
;
101 virtual OUString SAL_CALL
getImplementationName() override
;
102 virtual sal_Bool SAL_CALL
supportsService( const OUString
& rServiceName
) override
;
103 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
106 virtual css::uno::Reference
< css::accessibility::XAccessibleContext
> SAL_CALL
getAccessibleContext( ) override
;
108 // XAccessibleContext
109 virtual sal_Int32 SAL_CALL
getAccessibleChildCount( ) override
;
110 virtual css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
getAccessibleChild( sal_Int32 i
) override
;
111 virtual css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
getAccessibleParent( ) override
;
112 virtual sal_Int32 SAL_CALL
getAccessibleIndexInParent( ) override
;
113 virtual sal_Int16 SAL_CALL
getAccessibleRole( ) override
;
114 virtual OUString SAL_CALL
getAccessibleDescription( ) override
;
115 virtual OUString SAL_CALL
getAccessibleName( ) override
;
116 virtual css::uno::Reference
< css::accessibility::XAccessibleRelationSet
> SAL_CALL
getAccessibleRelationSet( ) override
;
117 virtual css::uno::Reference
< css::accessibility::XAccessibleStateSet
> SAL_CALL
getAccessibleStateSet( ) override
;
118 virtual css::lang::Locale SAL_CALL
getLocale( ) override
;
120 // XAccessibleComponent
121 virtual css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
getAccessibleAtPoint( const css::awt::Point
& aPoint
) override
;
122 virtual void SAL_CALL
grabFocus( ) override
;
123 virtual sal_Int32 SAL_CALL
getForeground( ) override
;
124 virtual sal_Int32 SAL_CALL
getBackground( ) override
;
126 // XAccessibleExtendedComponent
127 virtual css::uno::Reference
< css::awt::XFont
> SAL_CALL
getFont( ) override
;
128 virtual OUString SAL_CALL
getTitledBorderText( ) override
;
129 virtual OUString SAL_CALL
getToolTipText( ) override
;
132 } // namespace basctl
134 #endif // INCLUDED_BASCTL_SOURCE_INC_ACCESSIBLEDIALOGCONTROLSHAPE_HXX
136 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */