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