xref: /trunk/main/sd/source/ui/inc/AccessibleOutlineView.hxx (revision 6c3f46008062a6f976c36b489e4ef55c817e828c)
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
10cdf0e10cSrcweir  *
11c45d927aSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
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.
19cdf0e10cSrcweir  *
20c45d927aSAndrew Rist  *************************************************************/
21c45d927aSAndrew Rist 
22cdf0e10cSrcweir #ifndef SD_ACCESSIBILITY_ACCESSIBLE_OUTLINE_VIEW_HXX
23cdf0e10cSrcweir #define SD_ACCESSIBILITY_ACCESSIBLE_OUTLINE_VIEW_HXX
24cdf0e10cSrcweir 
25cdf0e10cSrcweir #include "AccessibleDocumentViewBase.hxx"
26cdf0e10cSrcweir #include <svx/AccessibleTextHelper.hxx>
27cdf0e10cSrcweir 
28cdf0e10cSrcweir namespace sd {
29cdf0e10cSrcweir class OutlineViewShell;
30cdf0e10cSrcweir class Window;
31cdf0e10cSrcweir }
32cdf0e10cSrcweir 
33cdf0e10cSrcweir namespace accessibility {
34cdf0e10cSrcweir 
35cdf0e10cSrcweir /** This class makes the Impress outline view accessible.
36cdf0e10cSrcweir 
37cdf0e10cSrcweir     Please see the documentation of the base class for further
38cdf0e10cSrcweir     explanations of the individual methods. This class is a mere
39cdf0e10cSrcweir     wrapper around the AccessibleTextHelper class; as basically the
40cdf0e10cSrcweir     Outline View is a big Outliner.
41cdf0e10cSrcweir  */
42cdf0e10cSrcweir class AccessibleOutlineView
43cdf0e10cSrcweir     : public AccessibleDocumentViewBase
44cdf0e10cSrcweir {
45cdf0e10cSrcweir public:
46cdf0e10cSrcweir     AccessibleOutlineView (
47cdf0e10cSrcweir         ::sd::Window* pSdWindow,
48cdf0e10cSrcweir         ::sd::OutlineViewShell* pViewShell,
49cdf0e10cSrcweir         const ::com::sun::star::uno::Reference<
50cdf0e10cSrcweir         ::com::sun::star::frame::XController>& rxController,
51cdf0e10cSrcweir         const ::com::sun::star::uno::Reference<
52cdf0e10cSrcweir         ::com::sun::star::accessibility::XAccessible>& rxParent);
53cdf0e10cSrcweir 
54cdf0e10cSrcweir     virtual ~AccessibleOutlineView  (void);
55cdf0e10cSrcweir 
56cdf0e10cSrcweir     /** Complete the initialization begun in the constructor.
57cdf0e10cSrcweir     */
58cdf0e10cSrcweir     virtual void Init (void);
59cdf0e10cSrcweir 
60cdf0e10cSrcweir 
61cdf0e10cSrcweir     // ===== IAccessibleViewForwarderListener ================================
62cdf0e10cSrcweir 
63cdf0e10cSrcweir     virtual void ViewForwarderChanged (ChangeType aChangeType,
64cdf0e10cSrcweir         const IAccessibleViewForwarder* pViewForwarder);
65cdf0e10cSrcweir 
66cdf0e10cSrcweir     // ===== XAccessibleContext ==============================================
67cdf0e10cSrcweir 
68cdf0e10cSrcweir     virtual sal_Int32 SAL_CALL
69cdf0e10cSrcweir         getAccessibleChildCount (void)
70cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
71cdf0e10cSrcweir 
72cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL
73cdf0e10cSrcweir         getAccessibleChild (sal_Int32 nIndex)
74cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
750deba7fbSSteve Yin     virtual ::rtl::OUString SAL_CALL
760deba7fbSSteve Yin         getAccessibleName(void)
770deba7fbSSteve Yin         throw (::com::sun::star::uno::RuntimeException);
78cdf0e10cSrcweir     // ===== XAccessibleEventBroadcaster ========================================
79cdf0e10cSrcweir 
80cdf0e10cSrcweir     virtual void SAL_CALL
81cdf0e10cSrcweir         addEventListener (
82cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
83cdf0e10cSrcweir                 ::com::sun::star::accessibility::XAccessibleEventListener >& xListener)
84cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
85cdf0e10cSrcweir 
86cdf0e10cSrcweir     virtual void SAL_CALL
87cdf0e10cSrcweir         removeEventListener (
88cdf0e10cSrcweir             const ::com::sun::star::uno::Reference<
89cdf0e10cSrcweir                 ::com::sun::star::accessibility::XAccessibleEventListener >& xListener)
90cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
91cdf0e10cSrcweir 
92cdf0e10cSrcweir     using cppu::WeakComponentImplHelperBase::addEventListener;
93cdf0e10cSrcweir     using cppu::WeakComponentImplHelperBase::removeEventListener;
94cdf0e10cSrcweir 
95cdf0e10cSrcweir     // ===== XServiceInfo ====================================================
96cdf0e10cSrcweir 
97cdf0e10cSrcweir     /** Returns an identifier for the implementation of this object.
98cdf0e10cSrcweir      */
99cdf0e10cSrcweir     virtual ::rtl::OUString SAL_CALL
100cdf0e10cSrcweir         getImplementationName (void)
101cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
102cdf0e10cSrcweir 
103cdf0e10cSrcweir     // ===== lang::XEventListener ============================================
104cdf0e10cSrcweir 
105cdf0e10cSrcweir     virtual void SAL_CALL
106cdf0e10cSrcweir         disposing (const ::com::sun::star::lang::EventObject& rEventObject)
107cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
108cdf0e10cSrcweir 
109cdf0e10cSrcweir     // ===== XPropertyChangeListener =========================================
110cdf0e10cSrcweir 
111cdf0e10cSrcweir     virtual void SAL_CALL
112cdf0e10cSrcweir         propertyChange (const ::com::sun::star::beans::PropertyChangeEvent& rEventObject)
113cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
114cdf0e10cSrcweir 
115cdf0e10cSrcweir 
116cdf0e10cSrcweir protected:
117cdf0e10cSrcweir 
118cdf0e10cSrcweir     // overridden, as we hold the listeners ourselves
119cdf0e10cSrcweir     virtual void FireEvent (const ::com::sun::star::accessibility::AccessibleEventObject& aEvent);
120cdf0e10cSrcweir 
121cdf0e10cSrcweir     // overridden to detect focus changes
122cdf0e10cSrcweir     virtual void Activated (void);
123cdf0e10cSrcweir 
124cdf0e10cSrcweir     // overridden to detect focus changes
125cdf0e10cSrcweir     virtual void Deactivated (void);
126cdf0e10cSrcweir 
127cdf0e10cSrcweir     // declared, but not defined
128cdf0e10cSrcweir     AccessibleOutlineView( const AccessibleOutlineView& );
129cdf0e10cSrcweir     AccessibleOutlineView& operator= ( const AccessibleOutlineView& );
130cdf0e10cSrcweir 
131cdf0e10cSrcweir     // This method is called from the component helper base class while disposing.
132cdf0e10cSrcweir     virtual void SAL_CALL disposing (void);
133cdf0e10cSrcweir 
134*6c3f4600Smseidel     //  Create an accessible name that contains the current view mode.
135cdf0e10cSrcweir     virtual ::rtl::OUString
136cdf0e10cSrcweir         CreateAccessibleName ()
137cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
138cdf0e10cSrcweir 
139*6c3f4600Smseidel     //  Create an accessible description that contains the current
140*6c3f4600Smseidel     //  view mode.
141cdf0e10cSrcweir     virtual ::rtl::OUString
142cdf0e10cSrcweir         CreateAccessibleDescription ()
143cdf0e10cSrcweir         throw (::com::sun::star::uno::RuntimeException);
144cdf0e10cSrcweir 
145cdf0e10cSrcweir private:
146cdf0e10cSrcweir 
147*6c3f4600Smseidel     // Invalidate text helper, updates visible children
148cdf0e10cSrcweir     void UpdateChildren();
149cdf0e10cSrcweir 
150cdf0e10cSrcweir     AccessibleTextHelper maTextHelper;
151cdf0e10cSrcweir 
152cdf0e10cSrcweir };
153cdf0e10cSrcweir 
154cdf0e10cSrcweir } // end of namespace accessibility
155cdf0e10cSrcweir 
156cdf0e10cSrcweir #endif
157*6c3f4600Smseidel 
158*6c3f4600Smseidel /* vim: set noet sw=4 ts=4: */
159