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_SVX_SOURCE_INC_ACCESSIBLEFRAMESELECTOR_HXX
21 #define INCLUDED_SVX_SOURCE_INC_ACCESSIBLEFRAMESELECTOR_HXX
23 #include <com/sun/star/accessibility/XAccessible.hpp>
24 #include <com/sun/star/accessibility/XAccessibleContext.hpp>
25 #include <cppuhelper/implbase.hxx>
26 #include<comphelper/accessiblecomponenthelper.hxx>
27 #include <svx/framebordertype.hxx>
35 class AccFrameSelector final
: public cppu::ImplInheritanceHelper
<
36 ::comphelper::OAccessibleComponentHelper
,
37 css::accessibility::XAccessible
>
40 explicit AccFrameSelector(FrameSelector
& rFrameSel
);
41 virtual ~AccFrameSelector() override
;
43 //XAccessibleComponent
44 virtual void SAL_CALL
grabFocus( ) override
;
45 virtual css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
getAccessibleAtPoint( const css::awt::Point
& aPoint
) override
;
48 virtual sal_Int64 SAL_CALL
getAccessibleChildCount( ) override
;
49 virtual css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
getAccessibleChild( sal_Int64 i
) override
;
50 virtual css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
getAccessibleParent( ) override
;
51 virtual sal_Int16 SAL_CALL
getAccessibleRole( ) override
;
52 virtual OUString SAL_CALL
getAccessibleDescription( ) override
;
53 virtual OUString SAL_CALL
getAccessibleName( ) override
;
54 virtual css::uno::Reference
< css::accessibility::XAccessibleRelationSet
> SAL_CALL
getAccessibleRelationSet( ) override
;
55 virtual sal_Int64 SAL_CALL
getAccessibleStateSet( ) override
;
56 virtual css::awt::Point SAL_CALL
getLocationOnScreen() override
;
59 virtual css::uno::Reference
< css::accessibility::XAccessibleContext
> SAL_CALL
getAccessibleContext( ) override
;
61 virtual sal_Int32 SAL_CALL
getForeground( ) override
;
62 virtual sal_Int32 SAL_CALL
getBackground( ) override
;
67 // OCommonAccessibleComponent
68 /// implements the calculation of the bounding rectangle
69 virtual css::awt::Rectangle
implGetBounds( ) override
;
71 /// @throws css::uno::RuntimeException
74 FrameSelector
* mpFrameSel
;
77 class AccFrameSelectorChild final
: public cppu::ImplInheritanceHelper
<
78 ::comphelper::OAccessibleComponentHelper
,
79 css::accessibility::XAccessible
>
82 explicit AccFrameSelectorChild( FrameSelector
& rFrameSel
, FrameBorderType eBorder
);
84 virtual ~AccFrameSelectorChild() override
;
86 //XAccessibleComponent
87 virtual void SAL_CALL
grabFocus( ) override
;
88 virtual css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
getAccessibleAtPoint( const css::awt::Point
& aPoint
) override
;
91 virtual sal_Int64 SAL_CALL
getAccessibleChildCount( ) override
;
92 virtual css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
getAccessibleChild( sal_Int64 i
) override
;
93 virtual css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
getAccessibleParent( ) override
;
94 virtual sal_Int16 SAL_CALL
getAccessibleRole( ) override
;
95 virtual OUString SAL_CALL
getAccessibleDescription( ) override
;
96 virtual OUString SAL_CALL
getAccessibleName( ) override
;
97 virtual css::uno::Reference
< css::accessibility::XAccessibleRelationSet
> SAL_CALL
getAccessibleRelationSet( ) override
;
98 virtual sal_Int64 SAL_CALL
getAccessibleStateSet( ) override
;
101 virtual css::uno::Reference
< css::accessibility::XAccessibleContext
> SAL_CALL
getAccessibleContext( ) override
;
103 virtual sal_Int32 SAL_CALL
getForeground( ) override
;
104 virtual sal_Int32 SAL_CALL
getBackground( ) override
;
106 void NotifyAccessibleEvent(const sal_Int16 _nEventId
, const css::uno::Any
& _rOldValue
, const css::uno::Any
& _rNewValue
)
108 ::comphelper::OAccessibleComponentHelper::NotifyAccessibleEvent(_nEventId
, _rOldValue
, _rNewValue
);
114 // OCommonAccessibleComponent
115 /// implements the calculation of the bounding rectangle
116 virtual css::awt::Rectangle
implGetBounds( ) override
;
118 /// @throws css::uno::RuntimeException
121 FrameSelector
* mpFrameSel
;
123 FrameBorderType meBorder
;
132 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */