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 .
21 #ifndef _SVX_ACCESSIBILITY_ACCESSIBLE_EXTENDED_COMPONENT_BASE_HXX
22 #define _SVX_ACCESSIBILITY_ACCESSIBLE_EXTENDED_COMPONENT_BASE_HXX
25 #include <com/sun/star/accessibility/XAccessible.hpp>
26 #include <com/sun/star/accessibility/XAccessibleExtendedComponent.hpp>
27 #include <com/sun/star/awt/XFocusListener.hpp>
28 #include "editeng/editengdllapi.h"
30 namespace accessibility
{
33 This base class provides (will provice) a base implementation of the
34 <type>XAccessibleComponent</type> and the
35 <type>XAccessibleExtendedComponent</type> for all shapes. For
36 more detailed documentation about the methods refer to the interface
37 descriptions of <type>XAccessible</type>,
38 <type>XAccessibleContext</type>, <type>XInterface</type>,
39 <type>XServiceInfo</type>, and <type>XTypeProvider</type>.
41 class EDITENG_DLLPUBLIC AccessibleComponentBase
42 : public ::com::sun::star::accessibility::XAccessibleExtendedComponent
45 //===== internal ========================================================
46 AccessibleComponentBase (void);
47 virtual ~AccessibleComponentBase (void);
50 //===== XAccessibleComponent ================================================
52 /** The default implementation uses the result of
53 <member>getBounds</member> to determine whether the given point lies
56 virtual sal_Bool SAL_CALL
containsPoint (
57 const ::com::sun::star::awt::Point
& aPoint
)
58 throw (::com::sun::star::uno::RuntimeException
);
60 /** The default implementation returns an empty reference.
62 virtual ::com::sun::star::uno::Reference
<
63 ::com::sun::star::accessibility::XAccessible
> SAL_CALL
64 getAccessibleAtPoint (
65 const ::com::sun::star::awt::Point
& aPoint
)
66 throw (::com::sun::star::uno::RuntimeException
);
68 /** The default implementation returns an empty rectangle.
70 virtual ::com::sun::star::awt::Rectangle SAL_CALL
getBounds (void)
71 throw (::com::sun::star::uno::RuntimeException
);
73 /** The default implementation uses the result of
74 <member>getBounds</member> to determine the location.
76 virtual ::com::sun::star::awt::Point SAL_CALL
getLocation (void)
77 throw (::com::sun::star::uno::RuntimeException
);
79 /** The default implementation returns an empty position, i.e. the
80 * result of the default constructor of <type>com::sun::star::awt::Point</type>.
82 virtual ::com::sun::star::awt::Point SAL_CALL
getLocationOnScreen (void)
83 throw (::com::sun::star::uno::RuntimeException
);
85 /** The default implementation uses the result of
86 <member>getBounds</member> to determine the size.
88 virtual ::com::sun::star::awt::Size SAL_CALL
getSize (void)
89 throw (::com::sun::star::uno::RuntimeException
);
91 /** The default implementation ignores this call.
93 virtual void SAL_CALL
addFocusListener (
94 const ::com::sun::star::uno::Reference
<
95 ::com::sun::star::awt::XFocusListener
>& xListener
)
96 throw (::com::sun::star::uno::RuntimeException
);
98 /** The default implementation ignores this call.
100 virtual void SAL_CALL
removeFocusListener (const ::com::sun::star::uno::Reference
<
101 ::com::sun::star::awt::XFocusListener
>& xListener
)
102 throw (::com::sun::star::uno::RuntimeException
);
104 /** The default implementation does nothing.
106 virtual void SAL_CALL
grabFocus (void)
107 throw (::com::sun::star::uno::RuntimeException
);
109 /** Returns black as the default foreground color.
111 virtual sal_Int32 SAL_CALL
getForeground (void)
112 throw (::com::sun::star::uno::RuntimeException
);
114 /** Returns white as the default background color.
116 virtual sal_Int32 SAL_CALL
getBackground (void)
117 throw (::com::sun::star::uno::RuntimeException
);
119 //===== XAccessibleExtendedComponent ====================================
120 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::awt::XFont
> SAL_CALL
122 throw (::com::sun::star::uno::RuntimeException
);
123 virtual OUString SAL_CALL
getTitledBorderText (void)
124 throw (::com::sun::star::uno::RuntimeException
);
125 virtual OUString SAL_CALL
getToolTipText (void)
126 throw (::com::sun::star::uno::RuntimeException
);
129 //===== XTypeProvider ===================================================
131 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
133 throw (::com::sun::star::uno::RuntimeException
);
137 } // end of namespace accessibility
141 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */