Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qwindowsuiatextrangeprovider.h
Go to the documentation of this file.
1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QWINDOWSUIATEXTRANGEPROVIDER_H
5#define QWINDOWSUIATEXTRANGEPROVIDER_H
6
7#include <QtGui/qtguiglobal.h>
8#if QT_CONFIG(accessibility)
9
11
13
14// Implements the Text Range control pattern provider. Used for text controls.
15class QWindowsUiaTextRangeProvider : public QWindowsUiaBaseProvider,
16 public QComObject<ITextRangeProvider>
17{
18 Q_DISABLE_COPY_MOVE(QWindowsUiaTextRangeProvider)
19public:
20 explicit QWindowsUiaTextRangeProvider(QAccessible::Id id, int startOffset, int endOffset);
21 virtual ~QWindowsUiaTextRangeProvider();
22
23 // ITextRangeProvider
24 HRESULT STDMETHODCALLTYPE AddToSelection() override;
25 HRESULT STDMETHODCALLTYPE Clone(ITextRangeProvider **pRetVal) override;
26 HRESULT STDMETHODCALLTYPE Compare(ITextRangeProvider *range, BOOL *pRetVal) override;
27 HRESULT STDMETHODCALLTYPE CompareEndpoints(TextPatternRangeEndpoint endpoint, ITextRangeProvider *targetRange, TextPatternRangeEndpoint targetEndpoint, int *pRetVal) override;
28 HRESULT STDMETHODCALLTYPE ExpandToEnclosingUnit(TextUnit unit) override;
29 HRESULT STDMETHODCALLTYPE FindAttribute(TEXTATTRIBUTEID attributeId, VARIANT val, BOOL backward, ITextRangeProvider **pRetVal) override;
30 HRESULT STDMETHODCALLTYPE FindText(BSTR text, BOOL backward, BOOL ignoreCase, ITextRangeProvider **pRetVal) override;
31 HRESULT STDMETHODCALLTYPE GetAttributeValue(TEXTATTRIBUTEID attributeId, VARIANT *pRetVal) override;
32 HRESULT STDMETHODCALLTYPE GetBoundingRectangles(SAFEARRAY **pRetVal) override;
33 HRESULT STDMETHODCALLTYPE GetChildren(SAFEARRAY **pRetVal) override;
34 HRESULT STDMETHODCALLTYPE GetEnclosingElement(IRawElementProviderSimple **pRetVal) override;
35 HRESULT STDMETHODCALLTYPE GetText(int maxLength, BSTR *pRetVal) override;
36 HRESULT STDMETHODCALLTYPE Move(TextUnit unit, int count, int *pRetVal) override;
37 HRESULT STDMETHODCALLTYPE MoveEndpointByRange(TextPatternRangeEndpoint endpoint, ITextRangeProvider *targetRange, TextPatternRangeEndpoint targetEndpoint) override;
38 HRESULT STDMETHODCALLTYPE MoveEndpointByUnit(TextPatternRangeEndpoint endpoint, TextUnit unit, int count, int *pRetVal) override;
39 HRESULT STDMETHODCALLTYPE RemoveFromSelection() override;
40 HRESULT STDMETHODCALLTYPE ScrollIntoView(BOOL alignToTop) override;
41 HRESULT STDMETHODCALLTYPE Select() override;
42
43private:
44 HRESULT unselect();
45 QString valueForIA2Attribute(QAccessibleTextInterface *textInterface, const QString &key);
46 TextDecorationLineStyle uiaLineStyleForIA2LineStyle(const QString &ia2LineStyle);
47 int m_startOffset;
48 int m_endOffset;
49};
50
52
53#endif // QT_CONFIG(accessibility)
54
55#endif // QWINDOWSUIATEXTRANGEPROVIDER_H
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
QString text
constexpr uint8_t Select
Combined button and popup list for selecting options.
@ AddToSelection
GLuint64 key
GLenum GLenum GLsizei count
GLsizei range
GLuint GLfloat * val
GLsizei maxLength
long HRESULT