xref: /AOO41X/main/accessibility/inc/accessibility/standard/vclxaccessiblemenu.hxx (revision ffad8df045fe8db79e3e50f731c1fa6ab6501c83)
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_VCLXACCESSIBLEMENU_HXX
25 #define ACCESSIBILITY_STANDARD_VCLXACCESSIBLEMENU_HXX
26 
27 #include <accessibility/standard/vclxaccessiblemenuitem.hxx>
28 #include <com/sun/star/accessibility/XAccessibleSelection.hpp>
29 
30 #ifndef _CPPUHELPER_IMPLBASE1_HXX
31 #include <cppuhelper/implbase1.hxx>
32 #endif
33 
34 
35 //  ----------------------------------------------------
36 //  class VCLXAccessibleMenu
37 //  ----------------------------------------------------
38 
39 typedef ::cppu::ImplHelper1 <
40     ::com::sun::star::accessibility::XAccessibleSelection > VCLXAccessibleMenu_BASE;
41 
42 class VCLXAccessibleMenu :  public VCLXAccessibleMenuItem,
43                             public VCLXAccessibleMenu_BASE
44 {
45 protected:
46     virtual sal_Bool        IsFocused();
47     virtual sal_Bool        IsPopupMenuOpen();
48 
49 public:
50     VCLXAccessibleMenu( Menu* pParent, sal_uInt16 nItemPos, Menu* pMenu );
51     virtual ~VCLXAccessibleMenu();
52 
53     // XInterface
54     DECLARE_XINTERFACE()
55 
56     // XTypeProvider
57     DECLARE_XTYPEPROVIDER()
58 
59     // XServiceInfo
60     virtual ::rtl::OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException);
61     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException);
62 
63     // XAccessibleContext
64     virtual sal_Int32 SAL_CALL getAccessibleChildCount(  ) throw (::com::sun::star::uno::RuntimeException);
65     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);
66     virtual sal_Int16 SAL_CALL getAccessibleRole(  ) throw (::com::sun::star::uno::RuntimeException);
67 
68     // XAccessibleComponent
69     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint ) throw (::com::sun::star::uno::RuntimeException);
70 
71     // XAccessibleSelection
72     virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
73     virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
74     virtual void SAL_CALL clearAccessibleSelection(  ) throw (::com::sun::star::uno::RuntimeException);
75     virtual void SAL_CALL selectAllAccessibleChildren(  ) throw (::com::sun::star::uno::RuntimeException);
76     virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount(  ) throw (::com::sun::star::uno::RuntimeException);
77     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
78     virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
79 
80     // XAccessibleAction
81     virtual ::rtl::OUString SAL_CALL getAccessibleActionDescription ( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
82 };
83 
84 #endif // ACCESSIBILITY_STANDARD_VCLXACCESSIBLEMENU_HXX
85 
86