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 SD_ACCESSIBILITY_ACCESSIBLE_SCROLL_PANEL_HXX
25 #define SD_ACCESSIBILITY_ACCESSIBLE_SCROLL_PANEL_HXX
26 
27 #include "AccessibleTreeNode.hxx"
28 
29 namespace sd { namespace toolpanel {
30 class ScrollPanel;
31 } }
32 
33 
34 namespace accessibility {
35 
36 /** This derived class handles the accessible children different from its
37     base class.  It adds the scroll bars as children when they are visible.
38 */
39 class AccessibleScrollPanel
40     : public AccessibleTreeNode
41 {
42 public:
43     AccessibleScrollPanel (
44         ::sd::toolpanel::ScrollPanel& rScrollPanel,
45         const ::rtl::OUString& rsName,
46         const ::rtl::OUString& rsDescription);
47     ~AccessibleScrollPanel (void);
48 
49 	//=====  XAccessibleContext  ==============================================
50 
51     ///	Return the number of currently visible children.
52     virtual sal_Int32 SAL_CALL
53     	getAccessibleChildCount (void) throw (::com::sun::star::uno::RuntimeException);
54 
55     ///	Return the specified child or throw exception.
56     virtual ::com::sun::star::uno::Reference<
57         ::com::sun::star::accessibility::XAccessible> SAL_CALL
58     	getAccessibleChild (sal_Int32 nIndex)
59         throw (::com::sun::star::lang::IndexOutOfBoundsException,
60             ::com::sun::star::uno::RuntimeException);
61 
62 	//=====  XServiceInfo  ====================================================
63 
64     /**	Returns an identifier for the implementation of this object.
65     */
66 	virtual ::rtl::OUString SAL_CALL
67     	getImplementationName (void)
68         throw (::com::sun::star::uno::RuntimeException);
69 
70 private:
71     ::sd::toolpanel::ScrollPanel& GetScrollPanel (void) const;
72 };
73 
74 } // end of namespace accessibility
75 
76 #endif
77