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_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLETABPAGE_HXX
21 #define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLETABPAGE_HXX
23 #include <com/sun/star/accessibility/XAccessible.hpp>
24 #include <com/sun/star/lang/XServiceInfo.hpp>
25 #include <comphelper/accessibletexthelper.hxx>
26 #include <cppuhelper/implbase2.hxx>
27 #include <vcl/vclptr.hxx>
33 class AccessibleStateSetHelper
;
37 // class VCLXAccessibleTabPage
40 typedef ::comphelper::OAccessibleTextHelper AccessibleTextHelper_BASE
;
42 typedef ::cppu::ImplHelper2
<
43 css::accessibility::XAccessible
,
44 css::lang::XServiceInfo
> VCLXAccessibleTabPage_BASE
;
46 class VCLXAccessibleTabPage final
: public AccessibleTextHelper_BASE
,
47 public VCLXAccessibleTabPage_BASE
49 friend class VCLXAccessibleTabControl
;
52 VclPtr
<TabControl
> m_pTabControl
;
58 sal_Int32
implGetAccessibleChildCount();
63 void SetFocused( bool bFocused
);
64 void SetSelected( bool bSelected
);
65 void SetPageText( const OUString
& sPageText
);
66 OUString
GetPageText();
68 void Update( bool bNew
);
70 sal_uInt16
GetPageId() const { return m_nPageId
; }
72 void FillAccessibleStateSet( utl::AccessibleStateSetHelper
& rStateSet
);
74 // OCommonAccessibleComponent
75 virtual css::awt::Rectangle
implGetBounds( ) override
;
77 // OCommonAccessibleText
78 virtual OUString
implGetText() override
;
79 virtual css::lang::Locale
implGetLocale() override
;
80 virtual void implGetSelection( sal_Int32
& nStartIndex
, sal_Int32
& nEndIndex
) override
;
83 virtual void SAL_CALL
disposing() override
;
86 VCLXAccessibleTabPage( TabControl
* pTabControl
, sal_uInt16 nPageId
);
87 virtual ~VCLXAccessibleTabPage() override
;
93 DECLARE_XTYPEPROVIDER()
96 virtual OUString SAL_CALL
getImplementationName() override
;
97 virtual sal_Bool SAL_CALL
supportsService( const OUString
& rServiceName
) override
;
98 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
101 virtual css::uno::Reference
< css::accessibility::XAccessibleContext
> SAL_CALL
getAccessibleContext( ) override
;
103 // XAccessibleContext
104 virtual sal_Int32 SAL_CALL
getAccessibleChildCount( ) override
;
105 virtual css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
getAccessibleChild( sal_Int32 i
) override
;
106 virtual css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
getAccessibleParent( ) override
;
107 virtual sal_Int32 SAL_CALL
getAccessibleIndexInParent( ) override
;
108 virtual sal_Int16 SAL_CALL
getAccessibleRole( ) override
;
109 virtual OUString SAL_CALL
getAccessibleDescription( ) override
;
110 virtual OUString SAL_CALL
getAccessibleName( ) override
;
111 virtual css::uno::Reference
< css::accessibility::XAccessibleRelationSet
> SAL_CALL
getAccessibleRelationSet( ) override
;
112 virtual css::uno::Reference
< css::accessibility::XAccessibleStateSet
> SAL_CALL
getAccessibleStateSet( ) override
;
113 virtual css::lang::Locale SAL_CALL
getLocale( ) override
;
115 // XAccessibleComponent
116 virtual css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
getAccessibleAtPoint( const css::awt::Point
& aPoint
) override
;
117 virtual void SAL_CALL
grabFocus( ) override
;
118 virtual sal_Int32 SAL_CALL
getForeground( ) override
;
119 virtual sal_Int32 SAL_CALL
getBackground( ) override
;
121 // XAccessibleExtendedComponent
122 virtual css::uno::Reference
< css::awt::XFont
> SAL_CALL
getFont( ) override
;
123 virtual OUString SAL_CALL
getTitledBorderText( ) override
;
124 virtual OUString SAL_CALL
getToolTipText( ) override
;
127 virtual OUString SAL_CALL
getText() override
;
128 virtual sal_Unicode SAL_CALL
getCharacter( sal_Int32 nIndex
) override
;
129 virtual sal_Int32 SAL_CALL
getCharacterCount() override
;
130 virtual sal_Int32 SAL_CALL
getCaretPosition() override
;
131 virtual sal_Bool SAL_CALL
setCaretPosition( sal_Int32 nIndex
) override
;
132 virtual css::uno::Sequence
< css::beans::PropertyValue
> SAL_CALL
getCharacterAttributes( sal_Int32 nIndex
, const css::uno::Sequence
< OUString
>& aRequestedAttributes
) override
;
133 virtual css::awt::Rectangle SAL_CALL
getCharacterBounds( sal_Int32 nIndex
) override
;
134 virtual sal_Int32 SAL_CALL
getIndexAtPoint( const css::awt::Point
& aPoint
) override
;
135 virtual sal_Bool SAL_CALL
setSelection( sal_Int32 nStartIndex
, sal_Int32 nEndIndex
) override
;
136 virtual sal_Bool SAL_CALL
copyText( sal_Int32 nStartIndex
, sal_Int32 nEndIndex
) override
;
137 virtual OUString SAL_CALL
getTextRange(sal_Int32 nStartIndex
, sal_Int32 nEndIndex
) override
;
140 #endif // INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLETABPAGE_HXX
142 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */