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
qwindowsuiaselectionprovider.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 QWINDOWSUIASELECTIONPROVIDER_H
5#define QWINDOWSUIASELECTIONPROVIDER_H
6
7#include <QtGui/qtguiglobal.h>
8#if QT_CONFIG(accessibility)
9
11
13
14namespace QtPrivate {
15
16template <>
17struct QComObjectTraits<ISelectionProvider2>
18{
19 static constexpr bool isGuidOf(REFIID riid) noexcept
20 {
21 return QComObjectTraits<ISelectionProvider2, ISelectionProvider>::isGuidOf(riid);
22 }
23};
24
25} // namespace QtPrivate
26
27// Implements the Selection control pattern provider. Used for Lists.
28class QWindowsUiaSelectionProvider : public QWindowsUiaBaseProvider,
29 public QComObject<ISelectionProvider2>
30{
31 Q_DISABLE_COPY_MOVE(QWindowsUiaSelectionProvider)
32public:
33 explicit QWindowsUiaSelectionProvider(QAccessible::Id id);
34 virtual ~QWindowsUiaSelectionProvider();
35
36 // ISelectionProvider
37 HRESULT STDMETHODCALLTYPE GetSelection(SAFEARRAY **pRetVal) override;
38 HRESULT STDMETHODCALLTYPE get_CanSelectMultiple(BOOL *pRetVal) override;
39 HRESULT STDMETHODCALLTYPE get_IsSelectionRequired(BOOL *pRetVal) override;
40
41 // ISelectionProvider2
42 HRESULT STDMETHODCALLTYPE get_FirstSelectedItem(__RPC__deref_out_opt IRawElementProviderSimple **pRetVal) override;
43 HRESULT STDMETHODCALLTYPE get_LastSelectedItem(__RPC__deref_out_opt IRawElementProviderSimple **pRetVal) override;
44 HRESULT STDMETHODCALLTYPE get_CurrentSelectedItem(__RPC__deref_out_opt IRawElementProviderSimple **pRetVal) override;
45 HRESULT STDMETHODCALLTYPE get_ItemCount(__RPC__out int *pRetVal) override;
46};
47
49
50#endif // QT_CONFIG(accessibility)
51
52#endif // QWINDOWSUIASELECTIONPROVIDER_H
Combined button and popup list for selecting options.
\macro QT_NO_KEYWORDS >
IUIViewSettingsInterop __RPC__in REFIID riid
long HRESULT