1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef _SD_ACCESSIBILITY_ACCESSIBLE_DRAW_DOCUMENT_VIEW_HXX
21 #define _SD_ACCESSIBILITY_ACCESSIBLE_DRAW_DOCUMENT_VIEW_HXX
23 #include "AccessibleDocumentViewBase.hxx"
25 namespace accessibility
{
28 /** This class makes draw documents in the general view modes
29 accessible. It passes all shapes on the current draw page to a
30 children manager and additionally creates a new shape that
31 represents the actual draw page.
33 Please see the documentation of the base class for further
34 explanations of the individual methods.
36 class AccessibleDrawDocumentView
:
37 public AccessibleDocumentViewBase
40 //===== internal ========================================================
42 AccessibleDrawDocumentView (::sd::Window
* pSdWindow
,
43 ::sd::ViewShell
* pViewShell
,
44 const ::com::sun::star::uno::Reference
<
45 ::com::sun::star::frame::XController
>& rxController
,
46 const ::com::sun::star::uno::Reference
<
47 ::com::sun::star::accessibility::XAccessible
>& rxParent
);
49 virtual ~AccessibleDrawDocumentView (void);
51 /** Complete the initialization begun in the constructor.
53 virtual void Init (void);
56 //===== IAccessibleViewForwarderListener ================================
58 virtual void ViewForwarderChanged (ChangeType aChangeType
,
59 const IAccessibleViewForwarder
* pViewForwarder
);
61 //===== XAccessibleContext ==============================================
63 virtual sal_Int32 SAL_CALL
64 getAccessibleChildCount (void)
65 throw (::com::sun::star::uno::RuntimeException
);
67 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::accessibility::XAccessible
> SAL_CALL
68 getAccessibleChild (sal_Int32 nIndex
)
69 throw (::com::sun::star::uno::RuntimeException
,
70 ::com::sun::star::lang::IndexOutOfBoundsException
);
73 //===== lang::XEventListener ============================================
76 disposing (const ::com::sun::star::lang::EventObject
& rEventObject
)
77 throw (::com::sun::star::uno::RuntimeException
);
80 //===== XPropertyChangeListener =========================================
83 propertyChange (const ::com::sun::star::beans::PropertyChangeEvent
& rEventObject
)
84 throw (::com::sun::star::uno::RuntimeException
);
88 //===== XServiceInfo ====================================================
90 virtual OUString SAL_CALL
91 getImplementationName (void)
92 throw (::com::sun::star::uno::RuntimeException
);
94 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
95 getSupportedServiceNames (void)
96 throw (::com::sun::star::uno::RuntimeException
);
100 implIsSelected( sal_Int32 nAccessibleChildIndex
)
101 throw (::com::sun::star::uno::RuntimeException
);
103 /** Select or deselect the specified child or all children if the given
104 index has the special value ACCESSIBLE_SELECTION_CHILD_ALL.
105 Selecting or deselecting a child sets or resets the
106 <const>SELECTED</const> state and selects or deslects the UNO shape
107 beeing made accessible by the child.
108 @param nAccessibleChildIndex
109 Index of the child to select or deselect. If the parameter has
110 the value ACCESSIBLE_SELECTION_CHILD_ALL then all children are
111 selected or deslected.
113 Indicates whether to select or deselect the specified child
117 implSelect( sal_Int32 nAccessibleChildIndex
, sal_Bool bSelect
)
118 throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
);
121 /** This object manages the shapes of the represented draw page. It is
122 responsible to determine the visible shapes and create on demand the
123 accessible objects representing them.
125 ChildrenManager
* mpChildrenManager
;
127 // This method is called from the component helper base class while
129 virtual void SAL_CALL
disposing (void);
131 /** Create a shape the represents the page as seen on the screen.
133 AccessiblePageShape
* CreateDrawPageShape (void);
135 /// Create an accessible name that contains the current view mode.
137 CreateAccessibleName ()
138 throw (::com::sun::star::uno::RuntimeException
);
140 /** Create an accessible description that contains the current
144 CreateAccessibleDescription ()
145 throw (::com::sun::star::uno::RuntimeException
);
147 /** Make sure that the currently focused shape sends a FOCUSED state
148 change event indicating that it has (regained) the focus.
150 virtual void Activated (void);
152 /** Make sure that the currently focused shape sends a FOCUSED state
153 change event indicating that it has lost the focus.
155 virtual void Deactivated (void);
157 virtual void impl_dispose (void);
160 void UpdateAccessibleName (void);
163 } // end of namespace accessibility
167 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */