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 SC_ACCESSIBLEFILTERTOPWINDOW_HXX
25 #define SC_ACCESSIBLEFILTERTOPWINDOW_HXX
26 
27 //#include "AccessibleContextBase.hxx"
28 #include "AccessibleFilterMenu.hxx"
29 #include "cppuhelper/implbase1.hxx"
30 
31 class ScDPFieldPopupWindow;
32 class ScDocument;
33 
34 class ScAccessibleFilterTopWindow : public ScAccessibleFilterMenu
35 {
36 public:
37     ScAccessibleFilterTopWindow(
38         const ::com::sun::star::uno::Reference<
39             ::com::sun::star::accessibility::XAccessible>& rxParent,
40             ScDPFieldPopupWindow* pWin, const ::rtl::OUString& rName, ScDocument* pDoc);
41     virtual ~ScAccessibleFilterTopWindow();
42 
43 	// XAccessibleContext
44 
45     virtual sal_Int32 SAL_CALL getAccessibleChildCount()
46         throw (::com::sun::star::uno::RuntimeException);
47 
48     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
49     	getAccessibleChild(sal_Int32 nIndex)
50             throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IndexOutOfBoundsException);
51 
52 	virtual ::rtl::OUString SAL_CALL getImplementationName()
53         throw (::com::sun::star::uno::RuntimeException);
54 
55     // Non-UNO Methods
56 
57     enum ChildControlType {
58         LISTBOX, TOGGLE_ALL, SINGLE_ON_BTN, SINGLE_OFF_BTN, OK_BTN, CANCEL_BTN
59     };
60     void setAccessibleChild(
61         const ::com::sun::star::uno::Reference<
62             ::com::sun::star::accessibility::XAccessible >& rAccessible,
63         ChildControlType eType);
64 
65 private:
66     /** The top menu part */
67     ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
68         mxAccMenu;
69 
70     /** check list box for field member visibility */
71     ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
72         mxAccListBox;
73 
74     /** check box for toggling all field member's visibility. */
75     ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
76         mxAccToggleAll;
77 
78     ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
79         mxAccSingleOnBtn;
80 
81     ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
82         mxAccSingleOffBtn;
83 
84     ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
85         mxAccOkBtn;
86 
87     ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >
88         mxAccCancelBtn;
89 
90     ScDPFieldPopupWindow* mpWindow;
91     ScDocument* mpDoc;
92 };
93 
94 #endif
95