1c45d927aSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3c45d927aSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4c45d927aSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5c45d927aSAndrew Rist  * distributed with this work for additional information
6c45d927aSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7c45d927aSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8c45d927aSAndrew Rist  * "License"); you may not use this file except in compliance
9c45d927aSAndrew Rist  * with the License.  You may obtain a copy of the License at
10c45d927aSAndrew Rist  *
11c45d927aSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12c45d927aSAndrew Rist  *
13c45d927aSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14c45d927aSAndrew Rist  * software distributed under the License is distributed on an
15c45d927aSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16c45d927aSAndrew Rist  * KIND, either express or implied.  See the License for the
17c45d927aSAndrew Rist  * specific language governing permissions and limitations
18c45d927aSAndrew Rist  * under the License.
19c45d927aSAndrew Rist  *
20c45d927aSAndrew Rist  *************************************************************/
21c45d927aSAndrew Rist 
22c45d927aSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef SD_ACCESSIBILITY_ACCESSIBLE_OUTLINE_VIEW_HXX
25cdf0e10cSrcweir #define SD_ACCESSIBILITY_ACCESSIBLE_OUTLINE_VIEW_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include "AccessibleDocumentViewBase.hxx"
28cdf0e10cSrcweir #include <svx/AccessibleTextHelper.hxx>
29cdf0e10cSrcweir 
30cdf0e10cSrcweir namespace sd {
31cdf0e10cSrcweir class OutlineViewShell;
32cdf0e10cSrcweir class Window;
33cdf0e10cSrcweir }
34cdf0e10cSrcweir 
35cdf0e10cSrcweir namespace accessibility {
36cdf0e10cSrcweir 
37cdf0e10cSrcweir 
38cdf0e10cSrcweir /** This class makes the Impress outline view accessible.
39cdf0e10cSrcweir 
40cdf0e10cSrcweir     Please see the documentation of the base class for further
41cdf0e10cSrcweir     explanations of the individual methods. This class is a mere
42cdf0e10cSrcweir     wrapper around the AccessibleTextHelper class; as basically the
43cdf0e10cSrcweir     Outline View is a big Outliner.
44cdf0e10cSrcweir */
45cdf0e10cSrcweir class AccessibleOutlineView
46cdf0e10cSrcweir     : public AccessibleDocumentViewBase
47cdf0e10cSrcweir {
48cdf0e10cSrcweir public:
49cdf0e10cSrcweir     AccessibleOutlineView (
50cdf0e10cSrcweir         ::sd::Window* pSdWindow,
51cdf0e10cSrcweir         ::sd::OutlineViewShell* pViewShell,
52cdf0e10cSrcweir         const ::com::sun::star::uno::Reference<
53cdf0e10cSrcweir         ::com::sun::star::frame::XController>& rxController,
54cdf0e10cSrcweir         const ::com::sun::star::uno::Reference<
55cdf0e10cSrcweir         ::com::sun::star::accessibility::XAccessible>& rxParent);
56cdf0e10cSrcweir 
57cdf0e10cSrcweir     virtual ~AccessibleOutlineView	(void);
58cdf0e10cSrcweir 
59cdf0e10cSrcweir     /** Complete the initialization begun in the constructor.
60cdf0e10cSrcweir     */
61cdf0e10cSrcweir     virtual void Init (void);
62cdf0e10cSrcweir 
63cdf0e10cSrcweir 
64cdf0e10cSrcweir     //=====  IAccessibleViewForwarderListener  ================================
65cdf0e10cSrcweir 
66cdf0e10cSrcweir     virtual void ViewForwarderChanged (ChangeType aChangeType,
67cdf0e10cSrcweir         const IAccessibleViewForwarder* pViewForwarder);
68cdf0e10cSrcweir 
69cdf0e10cSrcweir     //=====  XAccessibleContext  ==============================================
70cdf0e10cSrcweir 
71cdf0e10cSrcweir     virtual sal_Int32 SAL_CALL
72cdf0e10cSrcweir         getAccessibleChildCount (void)
73cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
74cdf0e10cSrcweir 
75cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
76cdf0e10cSrcweir         getAccessibleChild (sal_Int32 nIndex)
77cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
78*0deba7fbSSteve Yin     virtual ::rtl::OUString SAL_CALL
79*0deba7fbSSteve Yin         getAccessibleName(void)
80*0deba7fbSSteve Yin         throw (::com::sun::star::uno::RuntimeException);
81cdf0e10cSrcweir     //=====  XAccessibleEventBroadcaster  ========================================
82cdf0e10cSrcweir 
83cdf0e10cSrcweir     virtual void SAL_CALL
84cdf0e10cSrcweir         addEventListener (
85cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
86cdf0e10cSrcweir                 ::com::sun::star::accessibility::XAccessibleEventListener >& xListener)
87cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
88cdf0e10cSrcweir 
89cdf0e10cSrcweir     virtual void SAL_CALL
90cdf0e10cSrcweir         removeEventListener (
91cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
92cdf0e10cSrcweir                 ::com::sun::star::accessibility::XAccessibleEventListener >& xListener)
93cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
94cdf0e10cSrcweir 
95cdf0e10cSrcweir 	using cppu::WeakComponentImplHelperBase::addEventListener;
96cdf0e10cSrcweir 	using cppu::WeakComponentImplHelperBase::removeEventListener;
97cdf0e10cSrcweir 
98cdf0e10cSrcweir     //=====  XServiceInfo  ====================================================
99cdf0e10cSrcweir 
100cdf0e10cSrcweir     /**	Returns an identifier for the implementation of this object.
101cdf0e10cSrcweir     */
102cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL
103cdf0e10cSrcweir     	getImplementationName (void)
104cdf0e10cSrcweir 	    throw (::com::sun::star::uno::RuntimeException);
105cdf0e10cSrcweir 
106cdf0e10cSrcweir     //=====  lang::XEventListener  ============================================
107cdf0e10cSrcweir 
108cdf0e10cSrcweir 	virtual void SAL_CALL
109cdf0e10cSrcweir 		disposing (const ::com::sun::star::lang::EventObject& rEventObject)
110cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
111cdf0e10cSrcweir 
112cdf0e10cSrcweir     //=====  XPropertyChangeListener  =========================================
113cdf0e10cSrcweir 
114cdf0e10cSrcweir 	virtual void SAL_CALL
115cdf0e10cSrcweir 		propertyChange (const ::com::sun::star::beans::PropertyChangeEvent& rEventObject)
116cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
117cdf0e10cSrcweir 
118cdf0e10cSrcweir 
119cdf0e10cSrcweir protected:
120cdf0e10cSrcweir 
121cdf0e10cSrcweir     // overridden, as we hold the listeners ourselves
122cdf0e10cSrcweir     virtual void FireEvent (const ::com::sun::star::accessibility::AccessibleEventObject& aEvent);
123cdf0e10cSrcweir 
124cdf0e10cSrcweir     // overridden to detect focus changes
125cdf0e10cSrcweir     virtual void Activated (void);
126cdf0e10cSrcweir 
127cdf0e10cSrcweir     // overridden to detect focus changes
128cdf0e10cSrcweir     virtual void Deactivated (void);
129cdf0e10cSrcweir 
130cdf0e10cSrcweir     // declared, but not defined
131cdf0e10cSrcweir     AccessibleOutlineView( const AccessibleOutlineView& );
132cdf0e10cSrcweir     AccessibleOutlineView& operator= ( const AccessibleOutlineView& );
133cdf0e10cSrcweir 
134cdf0e10cSrcweir     // This method is called from the component helper base class while disposing.
135cdf0e10cSrcweir     virtual void SAL_CALL disposing (void);
136cdf0e10cSrcweir 
137cdf0e10cSrcweir     ///	Create an accessible name that contains the current view mode.
138cdf0e10cSrcweir     virtual ::rtl::OUString
139cdf0e10cSrcweir     	CreateAccessibleName ()
140cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
141cdf0e10cSrcweir 
142cdf0e10cSrcweir     ///	Create an accessible description that contains the current
143cdf0e10cSrcweir     ///	view mode.
144cdf0e10cSrcweir     virtual ::rtl::OUString
145cdf0e10cSrcweir     	CreateAccessibleDescription ()
146cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
147cdf0e10cSrcweir 
148cdf0e10cSrcweir private:
149cdf0e10cSrcweir 
150cdf0e10cSrcweir     /// Invalidate text helper, updates visible children
151cdf0e10cSrcweir     void UpdateChildren();
152cdf0e10cSrcweir 
153cdf0e10cSrcweir     AccessibleTextHelper maTextHelper;
154cdf0e10cSrcweir 
155cdf0e10cSrcweir };
156cdf0e10cSrcweir 
157cdf0e10cSrcweir } // end of namespace accessibility
158cdf0e10cSrcweir 
159cdf0e10cSrcweir #endif
160