xref: /AOO41X/main/accessibility/inc/accessibility/extended/AccessibleBrowseBoxCheckBoxCell.hxx (revision a462bbb78c0111848099221503583b85b642c10e)
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 #ifndef ACCESSIBILITY_EXT_ACCESSIBLEBROWSEBOXCHECKBOXCELL_HXX
24 #define ACCESSIBILITY_EXT_ACCESSIBLEBROWSEBOXCHECKBOXCELL_HXX
25 
26 #include <com/sun/star/accessibility/XAccessibleValue.hpp>
27 #include <com/sun/star/accessibility/XAccessible.hpp>
28 #include <com/sun/star/lang/XTypeProvider.hpp>
29 #ifndef ACCESSIBILITY_EXT_BROWSE_BOX_CELL_HXX
30 #include "accessibility/extended/accessiblebrowseboxcell.hxx"
31 #endif
32 #include <cppuhelper/implbase2.hxx>
33 #include <tools/wintypes.hxx>
34 // ============================================================================
35 namespace accessibility
36 {
37 // ============================================================================
38     typedef ::cppu::ImplHelper2 <   ::com::sun::star::accessibility::XAccessible,
39                                     ::com::sun::star::accessibility::XAccessibleValue
40                                 >   AccessibleCheckBoxCell_BASE;
41 
42     class AccessibleCheckBoxCell :   public AccessibleBrowseBoxCell
43                                     ,public AccessibleCheckBoxCell_BASE
44     {
45     private:
46         TriState m_eState;
47         sal_Bool m_bEnabled;
48         sal_Bool m_bIsTriState;
49 
50     protected:
~AccessibleCheckBoxCell()51         virtual ~AccessibleCheckBoxCell() {}
52 
53         virtual ::utl::AccessibleStateSetHelper* implCreateStateSetHelper();
54 
55     public:
56         AccessibleCheckBoxCell(const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& _rxParent,
57                                 ::svt::IAccessibleTableProvider& _rBrowseBox,
58                                 const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& _xFocusWindow,
59                                 sal_Int32 _nRowPos,
60                                 sal_uInt16 _nColPos,
61                                 const TriState& _eState,
62                                 sal_Bool _bEnabled,
63                                 sal_Bool _bIsTriState = sal_True);
64 
65         // XInterface
66         DECLARE_XINTERFACE( )
67         // XTypeProvider
68         DECLARE_XTYPEPROVIDER( )
69 
70         // XAccessible
71         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext(  ) throw (::com::sun::star::uno::RuntimeException);
72 
73         // XAccessibleContext
74         virtual sal_Int32 SAL_CALL getAccessibleChildCount(  ) throw (::com::sun::star::uno::RuntimeException);
75         virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild( sal_Int32 i ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
76         virtual ::rtl::OUString SAL_CALL getImplementationName() throw ( ::com::sun::star::uno::RuntimeException );
77         virtual ::sal_Int32 SAL_CALL getAccessibleIndexInParent(  ) throw (::com::sun::star::uno::RuntimeException);
78 
79 
80         // XAccessibleValue
81         virtual ::com::sun::star::uno::Any SAL_CALL getCurrentValue(  ) throw (::com::sun::star::uno::RuntimeException);
82         virtual sal_Bool SAL_CALL setCurrentValue( const ::com::sun::star::uno::Any& aNumber ) throw (::com::sun::star::uno::RuntimeException);
83         virtual ::com::sun::star::uno::Any SAL_CALL getMaximumValue(  ) throw (::com::sun::star::uno::RuntimeException);
84         virtual ::com::sun::star::uno::Any SAL_CALL getMinimumValue(  ) throw (::com::sun::star::uno::RuntimeException);
85 
86         // internal
87         void        SetChecked( sal_Bool _bChecked );
88     };
89 }
90 #endif // ACCESSIBILITY_EXT_ACCESSIBLEBROWSEBOXCHECKBOXCELL_HXX
91 
92