LibreOffice Module svx (master) 1
AccessibleFrameSelector.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef INCLUDED_SVX_SOURCE_INC_ACCESSIBLEFRAMESELECTOR_HXX
21#define INCLUDED_SVX_SOURCE_INC_ACCESSIBLEFRAMESELECTOR_HXX
22
23#include <com/sun/star/accessibility/XAccessible.hpp>
24#include <com/sun/star/accessibility/XAccessibleContext.hpp>
28
29namespace svx {
30
31class FrameSelector;
32
33namespace a11y {
34
35class AccFrameSelector final : public cppu::ImplInheritanceHelper<
36 ::comphelper::OAccessibleComponentHelper,
37 css::accessibility::XAccessible>
38{
39public:
40 explicit AccFrameSelector(FrameSelector& rFrameSel);
41 virtual ~AccFrameSelector() override;
42
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;
46
47 //XAccessibleContext
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;
57
58 //XAccessible
59 virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) override;
60
61 virtual sal_Int32 SAL_CALL getForeground( ) override;
62 virtual sal_Int32 SAL_CALL getBackground( ) override;
63
64 void Invalidate();
65
66private:
67 // OCommonAccessibleComponent
69 virtual css::awt::Rectangle implGetBounds( ) override;
70
72 void IsValid();
73
75};
76
77class AccFrameSelectorChild final : public cppu::ImplInheritanceHelper<
78 ::comphelper::OAccessibleComponentHelper,
79 css::accessibility::XAccessible>
80{
81public:
82 explicit AccFrameSelectorChild( FrameSelector& rFrameSel, FrameBorderType eBorder );
83
84 virtual ~AccFrameSelectorChild() override;
85
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;
89
90 //XAccessibleContext
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;
99
100 //XAccessible
101 virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext( ) override;
102
103 virtual sal_Int32 SAL_CALL getForeground( ) override;
104 virtual sal_Int32 SAL_CALL getBackground( ) override;
105
106 void NotifyAccessibleEvent(const sal_Int16 _nEventId, const css::uno::Any& _rOldValue, const css::uno::Any& _rNewValue)
107 {
108 ::comphelper::OAccessibleComponentHelper::NotifyAccessibleEvent(_nEventId, _rOldValue, _rNewValue);
109 }
110
111 void Invalidate();
112
113private:
114 // OCommonAccessibleComponent
116 virtual css::awt::Rectangle implGetBounds( ) override;
117
119 void IsValid();
120
122
124};
125
126
127}
128}
129
130#endif
131
132/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(const css::awt::Point &aPoint) override
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() override
virtual sal_Int16 SAL_CALL getAccessibleRole() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int64 i) override
virtual OUString SAL_CALL getAccessibleName() override
void NotifyAccessibleEvent(const sal_Int16 _nEventId, const css::uno::Any &_rOldValue, const css::uno::Any &_rNewValue)
virtual css::awt::Rectangle implGetBounds() override
implements the calculation of the bounding rectangle
virtual void SAL_CALL grabFocus() override
virtual sal_Int64 SAL_CALL getAccessibleStateSet() override
virtual sal_Int64 SAL_CALL getAccessibleChildCount() override
virtual OUString SAL_CALL getAccessibleDescription() override
AccFrameSelectorChild(FrameSelector &rFrameSel, FrameBorderType eBorder)
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
virtual sal_Int32 SAL_CALL getForeground() override
virtual sal_Int32 SAL_CALL getBackground() override
virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext() override
virtual sal_Int32 SAL_CALL getBackground() override
virtual css::uno::Reference< css::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext() override
virtual sal_Int64 SAL_CALL getAccessibleChildCount() override
virtual sal_Int64 SAL_CALL getAccessibleStateSet() override
virtual void SAL_CALL grabFocus() override
AccFrameSelector(FrameSelector &rFrameSel)
virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleChild(sal_Int64 i) override
virtual css::awt::Rectangle implGetBounds() override
implements the calculation of the bounding rectangle
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint(const css::awt::Point &aPoint) override
virtual OUString SAL_CALL getAccessibleName() override
virtual sal_Int32 SAL_CALL getForeground() override
virtual OUString SAL_CALL getAccessibleDescription() override
virtual css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getAccessibleParent() override
virtual sal_Int16 SAL_CALL getAccessibleRole() override
virtual css::awt::Point SAL_CALL getLocationOnScreen() override
int i
FrameBorderType
Enumerates all borders a frame selection control can contain.