xref: /aoo41x/main/svx/inc/svx/IAccessibleParent.hxx (revision 4d7c9de0)
13334a7e6SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
33334a7e6SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
43334a7e6SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
53334a7e6SAndrew Rist  * distributed with this work for additional information
63334a7e6SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
73334a7e6SAndrew Rist  * to you under the Apache License, Version 2.0 (the
83334a7e6SAndrew Rist  * "License"); you may not use this file except in compliance
93334a7e6SAndrew Rist  * with the License.  You may obtain a copy of the License at
103334a7e6SAndrew Rist  *
113334a7e6SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
123334a7e6SAndrew Rist  *
133334a7e6SAndrew Rist  * Unless required by applicable law or agreed to in writing,
143334a7e6SAndrew Rist  * software distributed under the License is distributed on an
153334a7e6SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
163334a7e6SAndrew Rist  * KIND, either express or implied.  See the License for the
173334a7e6SAndrew Rist  * specific language governing permissions and limitations
183334a7e6SAndrew Rist  * under the License.
193334a7e6SAndrew Rist  *
203334a7e6SAndrew Rist  *************************************************************/
213334a7e6SAndrew Rist 
223334a7e6SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _SVX_ACCESSIBILITY_IACCESSIBLE_PARENT_HXX
25cdf0e10cSrcweir #define _SVX_ACCESSIBILITY_IACCESSIBLE_PARENT_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <com/sun/star/uno/RuntimeException.hpp>
28cdf0e10cSrcweir #include <com/sun/star/drawing/XShape.hpp>
29cdf0e10cSrcweir #include <sal/types.h>
30*9b8096d0SSteve Yin #ifndef _SVX_ACCESSIBILITY_ACCESSIBLE_SHAPE_MANAGER_HXX
31*9b8096d0SSteve Yin #include "AccessibleControlShape.hxx"
32*9b8096d0SSteve Yin #endif
33cdf0e10cSrcweir namespace accessibility {
34cdf0e10cSrcweir 
35cdf0e10cSrcweir class AccessibleShape;
36cdf0e10cSrcweir class AccessibleShapeTreeInfo;
37cdf0e10cSrcweir 
38cdf0e10cSrcweir /** This interface contains methods missing from the
39cdf0e10cSrcweir     <type>XAccessibleContext</type> interface that allow the modification of
40cdf0e10cSrcweir     parent/child relationship.
41cdf0e10cSrcweir */
42cdf0e10cSrcweir class IAccessibleParent
43cdf0e10cSrcweir {
44cdf0e10cSrcweir public:
45cdf0e10cSrcweir     /** Allow for a virtual destructor.
46cdf0e10cSrcweir     */
~IAccessibleParent(void)47cdf0e10cSrcweir 	virtual ~IAccessibleParent (void){};
48cdf0e10cSrcweir 
49cdf0e10cSrcweir     /** A call to this method requests the implementor to replace one child
50cdf0e10cSrcweir         with another and send the appropriate notifications.  That are two
51cdf0e10cSrcweir         child events: One notifying the removal of the current child and one
52cdf0e10cSrcweir         about the existence of the new child.  The index of the new child is
53cdf0e10cSrcweir         implementation dependent, i.e. it is not garanteed that the
54cdf0e10cSrcweir         replacement has the same index as the current child has.
55cdf0e10cSrcweir 
56cdf0e10cSrcweir 		<p>A default implementation can just use the ShapeTypeHandler::CreateAccessibleObject
57cdf0e10cSrcweir 		to let a factory create the new instance with the parameters given, and then
58cdf0e10cSrcweir 		place the new shape into the own structures.</p>
59cdf0e10cSrcweir 
60cdf0e10cSrcweir 		@param pCurrentChild
61cdf0e10cSrcweir 			This child is about to be replaced.
62cdf0e10cSrcweir 
63cdf0e10cSrcweir 		@param _rxShape
64cdf0e10cSrcweir 			The UNO shape which the old and new child represent
65cdf0e10cSrcweir 
66cdf0e10cSrcweir 		@param _nIndex
67cdf0e10cSrcweir 			The IndexInParent of the old child. Note that the index in
68cdf0e10cSrcweir 			parent of the replacement is not necessarily the same as
69cdf0e10cSrcweir 			that of the current child.
70cdf0e10cSrcweir 
71cdf0e10cSrcweir 		@param _rShapeTreeInfo
72cdf0e10cSrcweir 			The TreeInfo for the old child.
73cdf0e10cSrcweir 
74cdf0e10cSrcweir 		@return
75cdf0e10cSrcweir            If the replacement has taken place successfully <TRUE/> is
76cdf0e10cSrcweir            returned.  If the replacement can not be carried out or an error
77cdf0e10cSrcweir            occurs that does not result in an exception then <FALSE/> is
78cdf0e10cSrcweir            returned.
79cdf0e10cSrcweir 
80cdf0e10cSrcweir 		@raises RuntimeException
81cdf0e10cSrcweir            in case something went heavily wrong
82cdf0e10cSrcweir     */
83cdf0e10cSrcweir     virtual sal_Bool ReplaceChild (
84cdf0e10cSrcweir         AccessibleShape* pCurrentChild,
85cdf0e10cSrcweir 		const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& _rxShape,
86cdf0e10cSrcweir 		const long _nIndex,
87cdf0e10cSrcweir 		const AccessibleShapeTreeInfo& _rShapeTreeInfo
88cdf0e10cSrcweir 	)	throw (::com::sun::star::uno::RuntimeException) = 0;
89*9b8096d0SSteve Yin 	//Add this method to support Form Controls
GetAccControlShapeFromModel(::com::sun::star::beans::XPropertySet *)90*9b8096d0SSteve Yin 	virtual AccessibleControlShape* GetAccControlShapeFromModel
91*9b8096d0SSteve Yin 		(::com::sun::star::beans::XPropertySet*)
92*9b8096d0SSteve Yin 		throw (::com::sun::star::uno::RuntimeException){return NULL;};
93*9b8096d0SSteve Yin 	virtual  ::com::sun::star::uno::Reference<
94*9b8096d0SSteve Yin             ::com::sun::star::accessibility::XAccessible>
GetAccessibleCaption(const::com::sun::star::uno::Reference<::com::sun::star::drawing::XShape> &)95*9b8096d0SSteve Yin         GetAccessibleCaption (const ::com::sun::star::uno::Reference<
96*9b8096d0SSteve Yin             ::com::sun::star::drawing::XShape>&)
97*9b8096d0SSteve Yin 			throw (::com::sun::star::uno::RuntimeException){return NULL;};
IsDocumentSelAll()98*9b8096d0SSteve Yin 	virtual sal_Bool IsDocumentSelAll(){ return sal_False; }
99cdf0e10cSrcweir };
100cdf0e10cSrcweir 
101cdf0e10cSrcweir } // end of namespace accessibility
102cdf0e10cSrcweir 
103cdf0e10cSrcweir #endif
104