LibreOffice Module vcl (master)  1
accessibletable.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_ACCESSIBLETABLE_HXX
21 #define INCLUDED_VCL_ACCESSIBLETABLE_HXX
22 
23 #include <tools/gen.hxx>
24 
25 #include <com/sun/star/uno/Reference.hxx>
26 
27 namespace com { namespace sun { namespace star { namespace accessibility { class XAccessible; } } } }
28 namespace utl { class AccessibleStateSetHelper; }
29 namespace vcl { class Window; }
30 
31 namespace vcl { namespace table
32 {
33 
34 typedef sal_Int32 RowPos;
35 
37 {
45 };
46 
47 
51 {
52 public:
54  virtual sal_Int32 GetCurrentRow() const = 0;
56  virtual sal_Int32 GetCurrentColumn() const = 0;
57  virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleControl( sal_Int32 _nIndex )= 0;
58  virtual OUString GetAccessibleObjectName(AccessibleTableControlObjType eObjType, sal_Int32 _nRow, sal_Int32 _nCol) const= 0;
59  virtual void GoToCell( sal_Int32 _nColumnPos, sal_Int32 _nRow )= 0;
60  virtual bool HasColHeader() = 0;
61  virtual bool HasRowHeader() = 0;
62 
69  virtual OUString GetAccessibleObjectDescription(AccessibleTableControlObjType eObjType) const= 0;
70 
73  virtual void FillAccessibleStateSet( ::utl::AccessibleStateSetHelper& rStateSet,
74  AccessibleTableControlObjType eObjType ) const= 0;
75 
76  // Window
77  virtual tools::Rectangle GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const = 0;
78  virtual void GrabFocus()= 0;
79  virtual css::uno::Reference< css::accessibility::XAccessible > GetAccessible()= 0;
80  virtual vcl::Window* GetAccessibleParentWindow() const= 0;
81  virtual vcl::Window* GetWindowInstance()= 0;
82  virtual sal_Int32 GetAccessibleControlCount() const = 0;
83  virtual bool ConvertPointToControlIndex( sal_Int32& _rnIndex, const Point& _rPoint )= 0;
84  virtual long GetRowCount() const= 0;
85  virtual long GetColumnCount() const= 0;
86  virtual bool ConvertPointToCellAddress( sal_Int32& _rnRow, sal_Int32& _rnColPos, const Point& _rPoint )= 0;
87  virtual tools::Rectangle calcHeaderRect( bool _bIsColumnBar ) = 0;
88  virtual tools::Rectangle calcHeaderCellRect( bool _bColHeader, sal_Int32 _nPos ) = 0;
89  virtual tools::Rectangle calcTableRect() = 0;
90  virtual tools::Rectangle calcCellRect( sal_Int32 _nRowPos, sal_Int32 _nColPos ) = 0;
91  virtual tools::Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex)= 0;
92  virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint)= 0;
93  virtual void FillAccessibleStateSetForCell( ::utl::AccessibleStateSetHelper& _rStateSet, sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const= 0;
94  virtual OUString GetRowName(sal_Int32 _nIndex) const = 0;
95  virtual OUString GetColumnName( sal_Int32 _nIndex ) const = 0;
96  virtual OUString GetAccessibleCellText(sal_Int32 _nRowPos, sal_Int32 _nColPos) const = 0;
97 
98  virtual sal_Int32 GetSelectedRowCount() const = 0;
99  virtual sal_Int32 GetSelectedRowIndex( sal_Int32 const i_selectionIndex ) const = 0;
100  virtual bool IsRowSelected( sal_Int32 const i_rowIndex ) const = 0;
101  virtual void SelectRow( sal_Int32 const i_rowIndex, bool const i_select ) = 0;
102  virtual void SelectAllRows( bool const i_select ) = 0;
103 
104 protected:
106 };
107 
108 
112 {
113 public:
121  virtual css::uno::Reference< css::accessibility::XAccessible >
122  getMyself() = 0;
123 
126  virtual void DisposeAccessImpl() = 0;
127 
131  virtual bool isAlive() const = 0;
132 
141  virtual void commitCellEvent(
142  sal_Int16 nEventId,
143  const css::uno::Any& rNewValue,
144  const css::uno::Any& rOldValue
145  ) = 0;
154  virtual void commitTableEvent(
155  sal_Int16 nEventId,
156  const css::uno::Any& rNewValue,
157  const css::uno::Any& rOldValue
158  ) = 0;
159 
161  virtual void commitEvent(
162  sal_Int16 nEventId,
163  const css::uno::Any& rNewValue
164  ) = 0;
165 
166 protected:
168 };
169 
170 } // namespace table
171 } // namespace vcl
172 
173 #endif // INCLUDED_VCL_ACCESSIBLETABLE_HXX
174 
175 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual tools::Rectangle calcHeaderRect(bool _bIsColumnBar)=0
This abstract class provides methods to implement an accessible table object.
virtual long GetRowCount() const =0
virtual OUString GetRowName(sal_Int32 _nIndex) const =0
virtual bool HasRowHeader()=0
virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow, sal_Int32 _nColumnPos, const Point &_rPoint)=0
virtual tools::Rectangle GetWindowExtentsRelative(vcl::Window *pRelativeWindow) const =0
virtual bool isAlive() const =0
checks whether the accessible implementation, and its context, are still alive
virtual void FillAccessibleStateSet(::utl::AccessibleStateSetHelper &rStateSet, AccessibleTableControlObjType eObjType) const =0
Fills the StateSet with all states (except DEFUNC and SHOWING, done by the accessible object)...
interface for an implementation of a table control's Accessible component
virtual css::uno::Reference< css::accessibility::XAccessible > getMyself()=0
returns the XAccessible object itself
virtual css::uno::Reference< css::accessibility::XAccessible > GetAccessible()=0
virtual void GoToCell(sal_Int32 _nColumnPos, sal_Int32 _nRow)=0
virtual bool IsRowSelected(sal_Int32 const i_rowIndex) const =0
virtual OUString GetAccessibleObjectDescription(AccessibleTableControlObjType eObjType) const =0
return the description of the specified object.
virtual void SelectRow(sal_Int32 const i_rowIndex, bool const i_select)=0
virtual vcl::Window * GetAccessibleParentWindow() const =0
virtual bool ConvertPointToCellAddress(sal_Int32 &_rnRow, sal_Int32 &_rnColPos, const Point &_rPoint)=0
virtual void commitEvent(sal_Int16 nEventId, const css::uno::Any &rNewValue)=0
Commits an event to all listeners.
The GridControl itself.
virtual bool ConvertPointToControlIndex(sal_Int32 &_rnIndex, const Point &_rPoint)=0
virtual tools::Rectangle GetFieldCharacterBounds(sal_Int32 _nRow, sal_Int32 _nColumnPos, sal_Int32 nIndex)=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 sal_Int32 GetSelectedRowCount() const =0
virtual sal_Int32 GetAccessibleControlCount() const =0
virtual vcl::Window * GetWindowInstance()=0
virtual tools::Rectangle calcTableRect()=0
virtual OUString GetAccessibleCellText(sal_Int32 _nRowPos, sal_Int32 _nColPos) const =0
The horizontal column header bar.
virtual OUString GetColumnName(sal_Int32 _nIndex) const =0
virtual tools::Rectangle calcHeaderCellRect(bool _bColHeader, sal_Int32 _nPos)=0
A cell of the data table.
virtual sal_Int32 GetSelectedRowIndex(sal_Int32 const i_selectionIndex) const =0
virtual sal_Int32 GetCurrentColumn() const =0
virtual OUString GetAccessibleObjectName(AccessibleTableControlObjType eObjType, sal_Int32 _nRow, sal_Int32 _nCol) const =0
virtual void DisposeAccessImpl()=0
disposes the accessible implementation, so that it becomes defunc
virtual sal_Int32 GetCurrentRow() const =0
virtual void GrabFocus()=0
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleControl(sal_Int32 _nIndex)=0
virtual bool HasColHeader()=0
virtual void SelectAllRows(bool const i_select)=0
virtual long GetColumnCount() const =0
virtual void FillAccessibleStateSetForCell(::utl::AccessibleStateSetHelper &_rStateSet, sal_Int32 _nRow, sal_uInt16 _nColumnPos) const =0
A cell of the row header bar.
virtual void commitCellEvent(sal_Int16 nEventId, const css::uno::Any &rNewValue, const css::uno::Any &rOldValue)=0
commits the event at all listeners of the cell
virtual tools::Rectangle calcCellRect(sal_Int32 _nRowPos, sal_Int32 _nColPos)=0
sal_Int32 RowPos