LibreOffice Module svx (master) 1
AccessibleTextHelper.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_ACCESSIBLETEXTHELPER_HXX
21#define INCLUDED_SVX_ACCESSIBLETEXTHELPER_HXX
22
23#include <memory>
24#include <vector>
25
26#include <com/sun/star/uno/Reference.hxx>
27#include <sal/types.h>
28#include <svx/svxdllapi.h>
29
30namespace com::sun::star
31{
32namespace accessibility
33{
34class XAccessible;
35}
36namespace accessibility
37{
38class XAccessibleEventListener;
39}
40namespace awt
41{
42struct Point;
43}
44}
45
46class Point;
47class SvxEditSource;
48
49namespace accessibility
50{
51class AccessibleTextHelper_Impl;
52
120{
121public:
122 typedef ::std::vector<sal_Int16> VectorOfStates;
123
134 explicit AccessibleTextHelper(::std::unique_ptr<SvxEditSource>&& pEditSource);
135
137
140
149 const SvxEditSource& GetEditSource() const;
150
191 void SetEditSource(::std::unique_ptr<SvxEditSource>&& pEditSource);
192
209 void SetEventSource(const css::uno::Reference<css::accessibility::XAccessible>& rInterface);
210
225 void SetOffset(const Point& rPoint);
226
244 void SetStartIndex(sal_Int32 nOffset);
245
250 sal_Int32 GetStartIndex() const;
251
261 void SetAdditionalChildStates(sal_Int64 rChildStates);
262
277 void UpdateChildren();
278
287 void Dispose();
288
312 void SetFocus(bool bHaveFocus = true);
313
324 bool HaveFocus();
325
326 // XAccessibleContext child handling methods
327
333 sal_Int64 GetChildCount() const;
339 css::uno::Reference<css::accessibility::XAccessible> GetChild(sal_Int64 i);
340
341 // XAccessibleEventBroadcaster child related methods
342
347 void AddEventListener(
348 const css::uno::Reference<css::accessibility::XAccessibleEventListener>& xListener);
353 void RemoveEventListener(
354 const css::uno::Reference<css::accessibility::XAccessibleEventListener>& xListener);
355
356 // XAccessibleComponent child related methods
357
363 css::uno::Reference<css::accessibility::XAccessible> GetAt(const css::awt::Point& aPoint);
364
365private:
367 const std::unique_ptr<AccessibleTextHelper_Impl> mpImpl;
368};
369
370} // end of namespace accessibility
371
372#endif // INCLUDED_SVX_ACCESSIBLETEXTHELPER_HXX
373
374/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Helper class for objects containing EditEngine/Outliner text.
const std::unique_ptr< AccessibleTextHelper_Impl > mpImpl
@dyn
AccessibleTextHelper & operator=(const AccessibleTextHelper &)=delete
AccessibleTextHelper(const AccessibleTextHelper &)=delete
::std::vector< sal_Int16 > VectorOfStates
void Dispose(const T &xInterface)
#define SVX_DLLPUBLIC
Definition: svxdllapi.h:28