LibreOffice Module accessibility (master) 1
accessibletablistboxtable.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
23#include <comphelper/uno3.hxx>
25#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
26
28
29
30namespace accessibility {
31
32typedef ::cppu::ImplHelper1< css::accessibility::XAccessibleSelection >
34
36{
37private:
39
40 css::uno::Reference< css::accessibility::XAccessible > m_xCurChild;
41
42 void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent );
43 DECL_LINK( WindowEventListener, VclWindowEvent&, void );
44
45 // helpers ----------------------------------------------------------------
46
48 void ensureValidIndex( sal_Int64 _nIndex ) const;
49
51 void implSelectRow( sal_Int32 _nRow, bool _bSelect );
52
54 sal_Int32 implGetRowCount() const override;
56 sal_Int32 implGetColumnCount() const override;
58 sal_Int32 implGetSelRowCount() const;
59
61 sal_Int32 implGetRow( sal_Int64 _nIndex ) const
62 {
63 auto nColCount = implGetColumnCount();
64 assert(nColCount != 0);
65 return _nIndex / nColCount;
66 }
67
69 sal_Int32 implGetSelRow( sal_Int32 _nSelRow ) const;
70
71public:
76 const css::uno::Reference< css::accessibility::XAccessible >& rxParent,
77 SvHeaderTabListBox& rBox );
78
79private:
81 virtual ~AccessibleTabListBoxTable() override;
82
83public:
84 // XInterface
86
87 // XTypeProvider
88 DECLARE_XTYPEPROVIDER( )
89
90 // XServiceInfo
91 virtual OUString SAL_CALL getImplementationName() override;
92
93 // XAccessibleSelection
94 void SAL_CALL selectAccessibleChild( sal_Int64 nChildIndex ) override;
95 sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int64 nChildIndex ) override;
96 void SAL_CALL clearAccessibleSelection( ) override;
97 void SAL_CALL selectAllAccessibleChildren( ) override;
98 sal_Int64 SAL_CALL getSelectedAccessibleChildCount( ) override;
99 css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int64 nSelectedChildIndex ) override;
100 void SAL_CALL deselectAccessibleChild( sal_Int64 nSelectedChildIndex ) override;
101};
102
103
104} // namespace accessibility
105
106
107
108/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This class represents the accessible object of the data table of a BrowseBox control.
sal_Int64 SAL_CALL getSelectedAccessibleChildCount() override
AccessibleTabListBoxTable(const css::uno::Reference< css::accessibility::XAccessible > &rxParent, SvHeaderTabListBox &rBox)
ctor()
sal_Int32 implGetSelRow(sal_Int32 _nSelRow) const
Returns the absolute row index of the nSelRow-th selected row.
css::uno::Reference< css::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild(sal_Int64 nSelectedChildIndex) override
void SAL_CALL deselectAccessibleChild(sal_Int64 nSelectedChildIndex) override
sal_Int32 implGetSelRowCount() const
Returns the count of selected rows in the table.
sal_Int32 implGetColumnCount() const override
Returns the total column count in the table.
void SAL_CALL selectAccessibleChild(sal_Int64 nChildIndex) override
virtual OUString SAL_CALL getImplementationName() override
sal_Bool SAL_CALL isAccessibleChildSelected(sal_Int64 nChildIndex) override
void implSelectRow(sal_Int32 _nRow, bool _bSelect)
Selects the specified row.
sal_Int32 implGetRowCount() const override
Returns the count of rows in the table.
DECL_LINK(WindowEventListener, VclWindowEvent &, void)
void ProcessWindowEvent(const VclWindowEvent &rVclWindowEvent)
css::uno::Reference< css::accessibility::XAccessible > m_xCurChild
void ensureValidIndex(sal_Int64 _nIndex) const
Throws an exception, if nIndex is not a valid child index.
sal_Int32 implGetRow(sal_Int64 _nIndex) const
Returns the row index from cell index.
::cppu::ImplHelper1< css::accessibility::XAccessibleSelection > AccessibleTabListBoxTableImplHelper
unsigned char sal_Bool
#define DECLARE_XINTERFACE()