LibreOffice Module vcl (master)  1
accessibletableprovider.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_VCL_ACCESSIBLETABLEPROVIDER_HXX
21 #define INCLUDED_VCL_ACCESSIBLETABLEPROVIDER_HXX
22 
24 #include <vcl/outdev.hxx>
25 
26 namespace com { namespace sun { namespace star { namespace accessibility { class XAccessible; } } } }
27 namespace utl { class AccessibleStateSetHelper; }
28 
29 namespace vcl
30 {
31 
32 #define OFFSET_DEFAULT (sal_Int32(-1))
33 #define OFFSET_NONE (sal_Int32(0))
34 
36 {
45 };
46 
47 
51 {
52 public:
54  virtual long GetRowCount() const = 0;
56  virtual sal_uInt16 GetColumnCount() const = 0;
57 
59  virtual sal_Int32 GetCurrRow() const = 0;
61  virtual sal_uInt16 GetCurrColumn() const = 0;
62 
65  virtual OUString GetRowDescription( sal_Int32 _nRow ) const = 0;
68  virtual OUString GetColumnDescription( sal_uInt16 _nColumnPos ) const = 0;
69 
71  virtual bool HasRowHeader() const = 0; //GetColumnId
72  virtual bool GoToCell( sal_Int32 _nRow, sal_uInt16 _nColumnPos ) = 0;
73 
74  virtual void SetNoSelection() = 0;
75  virtual void SelectAll() = 0;
76  virtual void SelectRow( long _nRow, bool _bSelect = true, bool bExpand = true ) = 0;
77  virtual void SelectColumn( sal_uInt16 _nColumnPos, bool _bSelect = true ) = 0;
78  virtual sal_Int32 GetSelectedRowCount() const = 0;
79  virtual sal_Int32 GetSelectedColumnCount() const = 0;
81  virtual bool IsRowSelected( long _nRow ) const = 0;
82  virtual bool IsColumnSelected( long _nColumnPos ) const = 0;
83  virtual void GetAllSelectedRows( css::uno::Sequence< sal_Int32 >& _rRows ) const = 0;
84  virtual void GetAllSelectedColumns( css::uno::Sequence< sal_Int32 >& _rColumns ) const = 0;
85 
87  virtual bool IsCellVisible( sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const = 0;
88  virtual OUString GetAccessibleCellText( long _nRow, sal_uInt16 _nColumnPos ) const = 0;
89 
90  virtual tools::Rectangle calcHeaderRect( bool _bIsColumnBar, bool _bOnScreen = true ) = 0;
91  virtual tools::Rectangle calcTableRect( bool _bOnScreen = true ) = 0;
92  virtual tools::Rectangle GetFieldRectPixelAbs( sal_Int32 _nRow, sal_uInt16 _nColumnPos, bool _bIsHeader, bool _bOnScreen = true ) = 0;
93 
94  virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleCell( sal_Int32 _nRow, sal_uInt16 _nColumnPos ) = 0;
95  virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleRowHeader( sal_Int32 _nRow ) = 0;
96  virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleColumnHeader( sal_uInt16 _nColumnPos ) = 0;
97 
98  virtual sal_Int32 GetAccessibleControlCount() const = 0;
99  virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleControl( sal_Int32 _nIndex ) = 0;
100  virtual bool ConvertPointToControlIndex( sal_Int32& _rnIndex, const Point& _rPoint ) = 0;
101 
102  virtual bool ConvertPointToCellAddress( sal_Int32& _rnRow, sal_uInt16& _rnColPos, const Point& _rPoint ) = 0;
103  virtual bool ConvertPointToRowHeader( sal_Int32& _rnRow, const Point& _rPoint ) = 0;
104  virtual bool ConvertPointToColumnHeader( sal_uInt16& _rnColPos, const Point& _rPoint ) = 0;
105 
106  virtual OUString GetAccessibleObjectName( ::vcl::AccessibleBrowseBoxObjType _eType, sal_Int32 _nPos = -1 ) const = 0;
107  virtual OUString GetAccessibleObjectDescription( ::vcl::AccessibleBrowseBoxObjType _eType, sal_Int32 _nPos = -1 ) const = 0;
108 
109  virtual void FillAccessibleStateSet( ::utl::AccessibleStateSetHelper& _rStateSet, ::vcl::AccessibleBrowseBoxObjType _eType ) const = 0;
110  virtual void FillAccessibleStateSetForCell( ::utl::AccessibleStateSetHelper& _rStateSet, sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const = 0;
111  virtual void GrabTableFocus() = 0;
112 
113  // OutputDevice
114  virtual bool GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex, int nLen, MetricVector& rVector ) = 0;
115 
116  // Window
117  virtual tools::Rectangle GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const = 0;
118  virtual void GrabFocus() = 0;
119  virtual css::uno::Reference< css::accessibility::XAccessible > GetAccessible() = 0;
120  virtual vcl::Window* GetAccessibleParentWindow() const = 0;
121  virtual vcl::Window* GetWindowInstance() = 0;
122 
123  virtual tools::Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) = 0;
124  virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint) = 0;
125 
126 protected:
128 };
129 
130 
134 {
135 public:
143  virtual css::uno::Reference< css::accessibility::XAccessible >
144  getMyself() = 0;
145 
148  virtual css::uno::Reference< css::accessibility::XAccessible >
149  getHeaderBar() = 0;
150 
151 protected:
153 };
154 
158 {
159 public:
167  virtual css::uno::Reference< css::accessibility::XAccessible >
168  getMyself() = 0;
169 
172  virtual void dispose() = 0;
173 
177  virtual bool isAlive() const = 0;
178 
181  virtual css::uno::Reference< css::accessibility::XAccessible >
183 
186  virtual css::uno::Reference< css::accessibility::XAccessible >
187  getTable() = 0;
188 
197  virtual void commitHeaderBarEvent(
198  sal_Int16 nEventId,
199  const css::uno::Any& rNewValue,
200  const css::uno::Any& rOldValue,
201  bool _bColumnHeaderBar
202  ) = 0;
203 
212  virtual void commitTableEvent(
213  sal_Int16 nEventId,
214  const css::uno::Any& rNewValue,
215  const css::uno::Any& rOldValue
216  ) = 0;
217 
219  virtual void commitEvent(
220  sal_Int16 nEventId,
221  const css::uno::Any& rNewValue,
222  const css::uno::Any& rOldValue
223  ) = 0;
224 
225 protected:
227 };
228 
229 } // namespace vcl
230 
231 #endif // INCLUDED_VCL_ACCESSIBLETABLEPROVIDER_HXX
232 
233 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleCell(sal_Int32 _nRow, sal_uInt16 _nColumnPos)=0
virtual bool ConvertPointToControlIndex(sal_Int32 &_rnIndex, const Point &_rPoint)=0
virtual sal_Int32 GetAccessibleControlCount() const =0
std::vector< tools::Rectangle > MetricVector
Definition: outdev.hxx:139
virtual void commitHeaderBarEvent(sal_Int16 nEventId, const css::uno::Any &rNewValue, const css::uno::Any &rOldValue, bool _bColumnHeaderBar)=0
commits the event at all listeners of the column/row header bar
virtual void GetAllSelectedColumns(css::uno::Sequence< sal_Int32 > &_rColumns) const =0
virtual bool HasRowHeader() const =0
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleColumnHeader(sal_uInt16 _nColumnPos)=0
virtual css::uno::Reference< css::accessibility::XAccessible > getTable()=0
returns the accessible object for the table representation
virtual bool ConvertPointToCellAddress(sal_Int32 &_rnRow, sal_uInt16 &_rnColPos, const Point &_rPoint)=0
virtual tools::Rectangle calcHeaderRect(bool _bIsColumnBar, bool _bOnScreen=true)=0
virtual void SetNoSelection()=0
This abstract class provides methods to implement an accessible table object.
virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow, sal_Int32 _nColumnPos, const Point &_rPoint)=0
virtual void SelectRow(long _nRow, bool _bSelect=true, bool bExpand=true)=0
virtual void commitEvent(sal_Int16 nEventId, const css::uno::Any &rNewValue, const css::uno::Any &rOldValue)=0
Commits an event to all listeners.
virtual void GetAllSelectedRows(css::uno::Sequence< sal_Int32 > &_rRows) const =0
Child index of the first additional control.
virtual tools::Rectangle GetFieldCharacterBounds(sal_Int32 _nRow, sal_Int32 _nColumnPos, sal_Int32 nIndex)=0
virtual sal_uInt16 GetCurrColumn() const =0
virtual void commitTableEvent(sal_Int16 nEventId, const css::uno::Any &rNewValue, const css::uno::Any &rOldValue)=0
commits the event at all listeners of the table
virtual bool isAlive() const =0
checks whether the accessible implementation, and its context, are still alive
virtual css::uno::Reference< css::accessibility::XAccessible > getHeaderBar(::vcl::AccessibleBrowseBoxObjType _eObjType)=0
returns the accessible object for the row or the column header bar
virtual vcl::Window * GetAccessibleParentWindow() const =0
virtual OUString GetColumnDescription(sal_uInt16 _nColumnPos) const =0
virtual bool ConvertPointToRowHeader(sal_Int32 &_rnRow, const Point &_rPoint)=0
virtual void FillAccessibleStateSetForCell(::utl::AccessibleStateSetHelper &_rStateSet, sal_Int32 _nRow, sal_uInt16 _nColumnPos) const =0
virtual bool ConvertPointToColumnHeader(sal_uInt16 &_rnColPos, const Point &_rPoint)=0
virtual tools::Rectangle GetWindowExtentsRelative(vcl::Window *pRelativeWindow) const =0
virtual bool IsColumnSelected(long _nColumnPos) const =0
virtual OUString GetAccessibleCellText(long _nRow, sal_uInt16 _nColumnPos) const =0
Child index of the data table.
virtual bool IsRowSelected(long _nRow) const =0
virtual long GetRowCount() const =0
virtual tools::Rectangle GetFieldRectPixelAbs(sal_Int32 _nRow, sal_uInt16 _nColumnPos, bool _bIsHeader, bool _bOnScreen=true)=0
virtual void SelectColumn(sal_uInt16 _nColumnPos, bool _bSelect=true)=0
virtual vcl::Window * GetWindowInstance()=0
virtual css::uno::Reference< css::accessibility::XAccessible > GetAccessible()=0
virtual css::uno::Reference< css::accessibility::XAccessible > getMyself()=0
returns the XAccessible object itself
virtual css::uno::Reference< css::accessibility::XAccessible > getMyself()=0
returns the XAccessible object itself
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleControl(sal_Int32 _nIndex)=0
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleRowHeader(sal_Int32 _nRow)=0
Child index of the column header bar (first row).
interface for an implementation of a table control's Accessible component
virtual void GrabTableFocus()=0
interface for an implementation of a browse box's Accessible component
virtual css::uno::Reference< css::accessibility::XAccessible > getHeaderBar()=0
returns the accessible object for the column header bar
Child index of the row header bar ("handle column").
AccessibleBrowseBoxObjType
This enumeration contains a constant for each kind of accessible object of a BrowseBox.
virtual sal_Int32 GetSelectedColumnCount() const =0
virtual OUString GetAccessibleObjectDescription(::vcl::AccessibleBrowseBoxObjType _eType, sal_Int32 _nPos=-1) const =0
virtual tools::Rectangle calcTableRect(bool _bOnScreen=true)=0
virtual OUString GetRowDescription(sal_Int32 _nRow) const =0
virtual sal_Int32 GetCurrRow() const =0
virtual bool GetGlyphBoundRects(const Point &rOrigin, const OUString &rStr, int nIndex, int nLen, MetricVector &rVector)=0
virtual bool GoToCell(sal_Int32 _nRow, sal_uInt16 _nColumnPos)=0
virtual void FillAccessibleStateSet(::utl::AccessibleStateSetHelper &_rStateSet,::vcl::AccessibleBrowseBoxObjType _eType) const =0
virtual sal_uInt16 GetColumnCount() const =0
virtual void dispose()=0
disposes the accessible implementation, so that it becomes defunc
virtual sal_Int32 GetSelectedRowCount() const =0
virtual bool IsCellVisible(sal_Int32 _nRow, sal_uInt16 _nColumnPos) const =0
virtual OUString GetAccessibleObjectName(::vcl::AccessibleBrowseBoxObjType _eType, sal_Int32 _nPos=-1) const =0