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: IAccessibleParent.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 _SVX_ACCESSIBILITY_IACCESSIBLE_PARENT_HXX
32 #define _SVX_ACCESSIBILITY_IACCESSIBLE_PARENT_HXX
34 #ifndef _COM_SUN_STAR_DRAWING_XSHAPE_HPP_
35 #include <com/sun/star/drawing/XShape.hpp>
38 #include <sal/types.h>
42 namespace accessibility
{
44 class AccessibleShape
;
45 class AccessibleShapeTreeInfo
;
47 /** This interface contains methods missing from the
48 <type>XAccessibleContext</type> interface that allow the modification of
49 parent/child relationship.
51 class IAccessibleParent
54 /** Allow for a virtual destructor.
56 virtual ~IAccessibleParent (void){};
58 /** A call to this method requests the implementor to replace one child
59 with another and send the appropriate notifications. That are two
60 child events: One notifying the removal of the current child and one
61 about the existence of the new child. The index of the new child is
62 implementation dependent, i.e. it is not garanteed that the
63 replacement has the same index as the current child has.
65 <p>A default implementation can just use the ShapeTypeHandler::CreateAccessibleObject
66 to let a factory create the new instance with the parameters given, and then
67 place the new shape into the own structures.</p>
70 This child is about to be replaced.
73 The UNO shape which the old and new child represent
76 The IndexInParent of the old child. Note that the index in
77 parent of the replacement is not necessarily the same as
78 that of the current child.
80 @param _rShapeTreeInfo
81 The TreeInfo for the old child.
84 If the replacement has taken place successfully <TRUE/> is
85 returned. If the replacement can not be carried out or an error
86 occurs that does not result in an exception then <FALSE/> is
89 @raises RuntimeException
90 in case something went heavily wrong
92 virtual sal_Bool
ReplaceChild (
93 AccessibleShape
* pCurrentChild
,
94 const ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
>& _rxShape
,
96 const AccessibleShapeTreeInfo
& _rShapeTreeInfo
97 ) throw (::com::sun::star::uno::RuntimeException
) = 0;
100 } // end of namespace accessibility
102 }//end of namespace binfilter