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 INCLUDED_EDITENG_ACCESSIBLECOMPONENTBASE_HXX
22 #define INCLUDED_EDITENG_ACCESSIBLECOMPONENTBASE_HXX
25 #include <com/sun/star/accessibility/XAccessibleExtendedComponent.hpp>
26 #include <editeng/editengdllapi.h>
28 namespace com::sun::star::accessibility
{ class XAccessible
; }
30 namespace accessibility
{
33 This base class provides (will provice) a base implementation of the
34 XAccessibleComponent and the
35 XAccessibleExtendedComponent for all shapes. For
36 more detailed documentation about the methods refer to the interface
37 descriptions of XAccessible,
38 XAccessibleContext, <type>XInterface</type>,
39 XServiceInfo, and <type>XTypeProvider</type>.
41 class EDITENG_DLLPUBLIC AccessibleComponentBase
42 : public css::accessibility::XAccessibleExtendedComponent
45 //===== internal ========================================================
46 AccessibleComponentBase();
47 virtual ~AccessibleComponentBase();
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 css::awt::Point
& aPoint
) override
;
59 /** The default implementation returns an empty reference.
61 virtual css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
62 getAccessibleAtPoint (
63 const css::awt::Point
& aPoint
) override
;
65 /** The default implementation returns an empty rectangle.
67 virtual css::awt::Rectangle SAL_CALL
getBounds() override
;
69 /** The default implementation uses the result of
70 <member>getBounds</member> to determine the location.
72 virtual css::awt::Point SAL_CALL
getLocation() override
;
74 /** The default implementation returns an empty position, i.e. the
75 * result of the default constructor of css::awt::Point.
77 virtual css::awt::Point SAL_CALL
getLocationOnScreen() override
;
79 /** The default implementation uses the result of
80 <member>getBounds</member> to determine the size.
82 virtual css::awt::Size SAL_CALL
getSize() override
;
84 /** The default implementation does nothing.
86 virtual void SAL_CALL
grabFocus() override
;
88 /** Returns black as the default foreground color.
90 virtual sal_Int32 SAL_CALL
getForeground() override
;
92 /** Returns white as the default background color.
94 virtual sal_Int32 SAL_CALL
getBackground() override
;
96 //===== XAccessibleExtendedComponent ====================================
97 virtual css::uno::Reference
< css::awt::XFont
> SAL_CALL
99 virtual OUString SAL_CALL
getTitledBorderText() override
;
100 virtual OUString SAL_CALL
getToolTipText() override
;
103 //===== XTypeProvider ===================================================
105 /// @throws css::uno::RuntimeException
106 virtual css::uno::Sequence
< css::uno::Type
> SAL_CALL
111 } // end of namespace accessibility
115 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */