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_VCLXACCESSIBLETEXTFIELD_HXX
21 #define INCLUDED_ACCESSIBILITY_INC_STANDARD_VCLXACCESSIBLETEXTFIELD_HXX
23 #include <standard/vclxaccessibletextcomponent.hxx>
25 #include <cppuhelper/implbase1.hxx>
27 typedef ::cppu::ImplHelper1
< css::accessibility::XAccessible
> VCLXAccessible_BASE
;
30 /** This class represents non editable text fields. The object passed to
31 the constructor is expected to be a list (a ListBox to be
32 more specific). From this always the selected item is token to be made
33 accessible by this class. When the selected item changes then also the
34 exported text changes.
36 class VCLXAccessibleTextField
:
37 public VCLXAccessibleTextComponent
,
38 public VCLXAccessible_BASE
41 VCLXAccessibleTextField (VCLXWindow
* pVCLXindow
,
42 const css::uno::Reference
< css::accessibility::XAccessible
>& _xParent
);
48 DECLARE_XTYPEPROVIDER()
51 css::uno::Reference
< css::accessibility::XAccessibleContext
> SAL_CALL
52 getAccessibleContext() override
;
55 sal_Int32 SAL_CALL
getAccessibleChildCount() override
;
56 css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
57 getAccessibleChild (sal_Int32 i
) override
;
58 sal_Int16 SAL_CALL
getAccessibleRole() override
;
59 css::uno::Reference
< css::accessibility::XAccessible
> SAL_CALL
60 getAccessibleParent( ) override
;
63 virtual OUString SAL_CALL
getImplementationName() override
;
64 // Return text field specific services.
65 virtual css::uno::Sequence
< OUString
> SAL_CALL
66 getSupportedServiceNames() override
;
69 virtual ~VCLXAccessibleTextField() override
= default;
71 /** With this method the text of the currently selected item is made
72 available to the VCLXAccessibleTextComponent base class.
74 OUString
implGetText() override
;
77 /** We need to save the accessible parent to return it in getAccessibleParent(),
78 because this method of the base class returns the wrong parent.
80 css::uno::Reference
< css::accessibility::XAccessible
> m_xParent
;
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */