1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: AccessibleDrawDocumentView.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _SD_ACCESSIBILITY_ACCESSIBLE_DRAW_DOCUMENT_VIEW_HXX
32 #define _SD_ACCESSIBILITY_ACCESSIBLE_DRAW_DOCUMENT_VIEW_HXX
34 #include "AccessibleDocumentViewBase.hxx"
37 namespace accessibility
{
40 /** This class makes draw documents in the general view modes
41 accessible. It passes all shapes on the current draw page to a
42 children manager and additionally creates a new shape that
43 represents the actual draw page.
45 Please see the documentation of the base class for further
46 explanations of the individual methods.
48 class AccessibleDrawDocumentView
:
49 public AccessibleDocumentViewBase
52 //===== internal ========================================================
54 AccessibleDrawDocumentView (::sd::Window
* pSdWindow
,
55 ::sd::ViewShell
* pViewShell
,
56 const ::com::sun::star::uno::Reference
<
57 ::com::sun::star::frame::XController
>& rxController
,
58 const ::com::sun::star::uno::Reference
<
59 ::com::sun::star::accessibility::XAccessible
>& rxParent
);
61 virtual ~AccessibleDrawDocumentView (void);
63 /** Complete the initialization begun in the constructor.
65 virtual void Init (void);
68 //===== IAccessibleViewForwarderListener ================================
70 virtual void ViewForwarderChanged (ChangeType aChangeType
,
71 const IAccessibleViewForwarder
* pViewForwarder
);
73 //===== XAccessibleContext ==============================================
75 virtual sal_Int32 SAL_CALL
76 getAccessibleChildCount (void)
77 throw (::com::sun::star::uno::RuntimeException
);
79 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
> SAL_CALL
80 getAccessibleChild (sal_Int32 nIndex
)
81 throw (::com::sun::star::uno::RuntimeException
);
84 //===== lang::XEventListener ============================================
87 disposing (const ::com::sun::star::lang::EventObject
& rEventObject
)
88 throw (::com::sun::star::uno::RuntimeException
);
91 //===== XPropertyChangeListener =========================================
94 propertyChange (const ::com::sun::star::beans::PropertyChangeEvent
& rEventObject
)
95 throw (::com::sun::star::uno::RuntimeException
);
99 //===== XServiceInfo ====================================================
101 virtual ::rtl::OUString SAL_CALL
102 getImplementationName (void)
103 throw (::com::sun::star::uno::RuntimeException
);
105 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
106 getSupportedServiceNames (void)
107 throw (::com::sun::star::uno::RuntimeException
);
111 implIsSelected( sal_Int32 nAccessibleChildIndex
)
112 throw (::com::sun::star::uno::RuntimeException
);
114 /** Select or deselect the specified child or all children if the given
115 index has the special value ACCESSIBLE_SELECTION_CHILD_ALL.
116 Selecting or deselecting a child sets or resets the
117 <const>SELECTED</const> state and selects or deslects the UNO shape
118 beeing made accessible by the child.
119 @param nAccessibleChildIndex
120 Index of the child to select or deselect. If the parameter has
121 the value ACCESSIBLE_SELECTION_CHILD_ALL then all children are
122 selected or deslected.
124 Indicates whether to select or deselect the specified child
128 implSelect( sal_Int32 nAccessibleChildIndex
, sal_Bool bSelect
)
129 throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
);
132 /** This object manages the shapes of the represented draw page. It is
133 responsible to determine the visible shapes and create on demand the
134 accessible objects representing them.
136 ChildrenManager
* mpChildrenManager
;
138 // This method is called from the component helper base class while
140 virtual void SAL_CALL
disposing (void);
142 /** Create a shape the represents the page as seen on the screen.
144 AccessiblePageShape
* CreateDrawPageShape (void);
146 /// Create an accessible name that contains the current view mode.
147 virtual ::rtl::OUString
148 CreateAccessibleName ()
149 throw (::com::sun::star::uno::RuntimeException
);
151 /** Create an accessible description that contains the current
154 virtual ::rtl::OUString
155 CreateAccessibleDescription ()
156 throw (::com::sun::star::uno::RuntimeException
);
158 /** Make sure that the currently focused shape sends a FOCUSED state
159 change event indicating that it has (regained) the focus.
161 virtual void Activated (void);
163 /** Make sure that the currently focused shape sends a FOCUSED state
164 change event indicating that it has lost the focus.
166 virtual void Deactivated (void);
168 virtual void impl_dispose (void);
171 } // end of namespace accessibility