xref: /AOO42X/main/accessibility/inc/accessibility/extended/accessiblebrowseboxcell.hxx (revision 9bce9b0d387299c68bd81d539e1478357a103de5)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef ACCESSIBILITY_ACCESSIBLE_BROWSE_BOX_CELL_HXX
25 #define ACCESSIBILITY_ACCESSIBLE_BROWSE_BOX_CELL_HXX
26 
27 #include "accessibility/extended/AccessibleBrowseBoxBase.hxx"
28 #include <svtools/AccessibleBrowseBoxObjType.hxx>
29 
30 // .................................................................................
31 namespace accessibility
32 {
33 // .................................................................................
34 
35     // =============================================================================
36     // = AccessibleBrowseBoxCell
37     // =============================================================================
38     /** common accessibility-functionality for browse box elements which occupy a cell
39     */
40     class AccessibleBrowseBoxCell : public AccessibleBrowseBoxBase
41     {
42     private:
43         sal_Int32               m_nRowPos;      // the row number of the table cell
44         sal_uInt16              m_nColPos;      // the column id of the table cell
45 
46     protected:
47         // attribute access
getRowPos() const48         inline sal_Int32    getRowPos( ) const { return m_nRowPos; }
getColumnPos() const49         inline sal_Int32    getColumnPos( ) const { return m_nColPos; }
50 
51     protected:
52         // AccessibleBrowseBoxBase overridables
53         virtual Rectangle implGetBoundingBox();
54         virtual Rectangle implGetBoundingBoxOnScreen();
55 
56         // XAccessibleComponent
57         virtual void SAL_CALL grabFocus() throw ( ::com::sun::star::uno::RuntimeException );
58 
59     protected:
60         AccessibleBrowseBoxCell(
61             const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
62             ::svt::IAccessibleTableProvider& _rBrowseBox,
63             const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xFocusWindow,
64             sal_Int32 _nRowPos,
65             sal_uInt16 _nColPos,
66             ::svt::AccessibleBrowseBoxObjType _eType = ::svt::BBTYPE_TABLECELL
67         );
68 
69         virtual ~AccessibleBrowseBoxCell();
70 
71     private:
72         AccessibleBrowseBoxCell();                                                  // never implemented
73         AccessibleBrowseBoxCell( const AccessibleBrowseBoxCell& );              // never implemented
74         AccessibleBrowseBoxCell& operator=( const AccessibleBrowseBoxCell& );   // never implemented
75     };
76 
77 // .................................................................................
78 }   // namespace accessibility
79 // .................................................................................
80 
81 
82 #endif // ACCESSIBILITY_ACCESSIBLE_BROWSE_BOX_CELL_HXX
83