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