Update ooo320-m1
[ooovba.git] / binfilter / inc / bf_svx / IAccessibleParent.hxx
blob2f2a16ff0478af79d4ff415de4fd3db380b5c434
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: IAccessibleParent.hxx,v $
10 * $Revision: 1.6 $
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>
36 #endif
37 #ifndef _SAL_TYPES_H_
38 #include <sal/types.h>
39 #endif
40 namespace binfilter {
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
53 public:
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>
69 @param pCurrentChild
70 This child is about to be replaced.
72 @param _rxShape
73 The UNO shape which the old and new child represent
75 @param _nIndex
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.
83 @return
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
87 returned.
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,
95 const long _nIndex,
96 const AccessibleShapeTreeInfo& _rShapeTreeInfo
97 ) throw (::com::sun::star::uno::RuntimeException) = 0;
100 } // end of namespace accessibility
102 }//end of namespace binfilter
103 #endif