xref: /AOO41X/main/accessibility/inc/accessibility/standard/vclxaccessiblebutton.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 
24 #ifndef ACCESSIBILITY_STANDARD_VCLXACCESSIBLEBUTTON_HXX
25 #define ACCESSIBILITY_STANDARD_VCLXACCESSIBLEBUTTON_HXX
26 
27 #include <accessibility/standard/vclxaccessibletextcomponent.hxx>
28 
29 #ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_ACTION_HPP_
30 #include <com/sun/star/accessibility/XAccessibleAction.hpp>
31 #endif
32 #include <com/sun/star/accessibility/XAccessibleValue.hpp>
33 
34 #ifndef _CPPUHELPER_IMPLBASE2_HXX
35 #include <cppuhelper/implbase2.hxx>
36 #endif
37 
38 
39 //  ----------------------------------------------------
40 //  class VCLXAccessibleButton
41 //  ----------------------------------------------------
42 
43 typedef ::cppu::ImplHelper2<
44     ::com::sun::star::accessibility::XAccessibleAction,
45     ::com::sun::star::accessibility::XAccessibleValue > VCLXAccessibleButton_BASE;
46 
47 class VCLXAccessibleButton : public VCLXAccessibleTextComponent,
48                              public VCLXAccessibleButton_BASE
49 {
50 protected:
51     virtual ~VCLXAccessibleButton();
52 
53     virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent );
54     virtual void FillAccessibleStateSet( utl::AccessibleStateSetHelper& rStateSet );
55 
56 public:
57     VCLXAccessibleButton( VCLXWindow* pVCLXindow );
58 
59     // XInterface
60     DECLARE_XINTERFACE()
61 
62     // XTypeProvider
63     DECLARE_XTYPEPROVIDER()
64 
65     // XServiceInfo
66     virtual ::rtl::OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException);
67     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException);
68 
69     // XAccessibleContext
70     virtual ::rtl::OUString SAL_CALL getAccessibleName(  ) throw (::com::sun::star::uno::RuntimeException);
71 
72     // XAccessibleAction
73     virtual sal_Int32 SAL_CALL getAccessibleActionCount( ) throw (::com::sun::star::uno::RuntimeException);
74     virtual sal_Bool SAL_CALL doAccessibleAction ( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
75     virtual ::rtl::OUString SAL_CALL getAccessibleActionDescription ( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
76     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleKeyBinding > SAL_CALL getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
77 
78     // XAccessibleValue
79     virtual ::com::sun::star::uno::Any SAL_CALL getCurrentValue(  ) throw (::com::sun::star::uno::RuntimeException);
80     virtual sal_Bool SAL_CALL setCurrentValue( const ::com::sun::star::uno::Any& aNumber ) throw (::com::sun::star::uno::RuntimeException);
81     virtual ::com::sun::star::uno::Any SAL_CALL getMaximumValue(  ) throw (::com::sun::star::uno::RuntimeException);
82     virtual ::com::sun::star::uno::Any SAL_CALL getMinimumValue(  ) throw (::com::sun::star::uno::RuntimeException);
83 };
84 
85 #endif // ACCESSIBILITY_STANDARD_VCLXACCESSIBLEBUTTON_HXX
86 
87