LibreOffice Module accessibility (master) 1
vclxaccessibletextcomponent.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#pragma once
21
22#include <com/sun/star/accessibility/AccessibleScrollType.hpp>
26
27
28
29
30class VCLXAccessibleTextComponent : public cppu::ImplInheritanceHelper<
31 VCLXAccessibleComponent,
32 css::accessibility::XAccessibleText>,
34{
35 OUString m_sText;
36
37protected:
38 void SetText( const OUString& sText );
39
40 virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
41
42 // OCommonAccessibleText
43 virtual OUString implGetText() override;
44 virtual css::lang::Locale implGetLocale() override;
45 virtual void implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) override;
46
47 // XComponent
48 virtual void SAL_CALL disposing() override;
49
50public:
52
53 // XAccessibleText
54 virtual sal_Int32 SAL_CALL getCaretPosition() override;
55 virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) override;
56 virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) override;
57 virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes( sal_Int32 nIndex, const css::uno::Sequence< OUString >& aRequestedAttributes ) override;
58 virtual css::awt::Rectangle SAL_CALL getCharacterBounds( sal_Int32 nIndex ) override;
59 virtual sal_Int32 SAL_CALL getCharacterCount() override;
60 virtual sal_Int32 SAL_CALL getIndexAtPoint( const css::awt::Point& aPoint ) override;
61 virtual OUString SAL_CALL getSelectedText() override;
62 virtual sal_Int32 SAL_CALL getSelectionStart() override;
63 virtual sal_Int32 SAL_CALL getSelectionEnd() override;
64 virtual sal_Bool SAL_CALL setSelection( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) override;
65 virtual OUString SAL_CALL getText() override;
66 virtual OUString SAL_CALL getTextRange( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) override;
67 virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex( sal_Int32 nIndex, sal_Int16 aTextType ) override;
68 virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex( sal_Int32 nIndex, sal_Int16 aTextType ) override;
69 virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex( sal_Int32 nIndex, sal_Int16 aTextType ) override;
70 virtual sal_Bool SAL_CALL copyText( sal_Int32 nStartIndex, sal_Int32 nEndIndex ) override;
71 virtual sal_Bool SAL_CALL scrollSubstringTo( sal_Int32 nStartIndex, sal_Int32 nEndIndex, css::accessibility::AccessibleScrollType aScrollType) override;
72};
73
74
75
76/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual OUString implGetText() override
virtual css::accessibility::TextSegment SAL_CALL getTextBehindIndex(sal_Int32 nIndex, sal_Int16 aTextType) override
virtual sal_Int32 SAL_CALL getIndexAtPoint(const css::awt::Point &aPoint) override
virtual sal_Bool SAL_CALL setCaretPosition(sal_Int32 nIndex) override
virtual css::lang::Locale implGetLocale() override
virtual void implGetSelection(sal_Int32 &nStartIndex, sal_Int32 &nEndIndex) override
virtual OUString SAL_CALL getTextRange(sal_Int32 nStartIndex, sal_Int32 nEndIndex) override
virtual sal_Unicode SAL_CALL getCharacter(sal_Int32 nIndex) override
virtual css::awt::Rectangle SAL_CALL getCharacterBounds(sal_Int32 nIndex) override
virtual OUString SAL_CALL getSelectedText() override
virtual void ProcessWindowEvent(const VclWindowEvent &rVclWindowEvent) override
virtual sal_Int32 SAL_CALL getSelectionStart() override
virtual sal_Int32 SAL_CALL getCaretPosition() override
virtual css::accessibility::TextSegment SAL_CALL getTextBeforeIndex(sal_Int32 nIndex, sal_Int16 aTextType) override
void SetText(const OUString &sText)
virtual sal_Int32 SAL_CALL getSelectionEnd() override
virtual void SAL_CALL disposing() override
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCharacterAttributes(sal_Int32 nIndex, const css::uno::Sequence< OUString > &aRequestedAttributes) override
virtual css::accessibility::TextSegment SAL_CALL getTextAtIndex(sal_Int32 nIndex, sal_Int16 aTextType) override
virtual sal_Bool SAL_CALL copyText(sal_Int32 nStartIndex, sal_Int32 nEndIndex) override
virtual sal_Bool SAL_CALL setSelection(sal_Int32 nStartIndex, sal_Int32 nEndIndex) override
virtual OUString SAL_CALL getText() override
virtual sal_Int32 SAL_CALL getCharacterCount() override
VCLXAccessibleTextComponent(VCLXWindow *pVCLXWindow)
virtual sal_Bool SAL_CALL scrollSubstringTo(sal_Int32 nStartIndex, sal_Int32 nEndIndex, css::accessibility::AccessibleScrollType aScrollType) override
unsigned char sal_Bool
sal_uInt16 sal_Unicode