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 __com_sun_star_accessibility_XAccessibleRelationSet_idl__ 25#define __com_sun_star_accessibility_XAccessibleRelationSet_idl__ 26 27#ifndef __com_sun_star_accessibility_AccessibleRelation_idl__ 28#include <com/sun/star/accessibility/AccessibleRelation.idl> 29#endif 30 31#ifndef __com_sun_star_uno_XInterface_idl__ 32#include <com/sun/star/uno/XInterface.idl> 33#endif 34#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__ 35#include <com/sun/star/lang/IndexOutOfBoundsException.idl> 36#endif 37 38module com { module sun { module star { module accessibility { 39 40/** Implement this interface to give access to an object's set of relations. 41 42 <p>Such relation are modeled with the <type>AccessibleRelation</type> 43 structure. This interface is used for representing sets of relations 44 between <type>Accessible</type> objects. Most of the convenience 45 methods of the corresponding AccessibleRelationSet interface of the Java 46 Accessibility API have been removed from this interface in order to 47 clean it up. These methods are <member>add</member>, 48 <member>addAll</member>, <member>clear</member>, and 49 <member>remove</member>. The other methods have been renamed to achieve 50 a geater conformance with the other accessibility interfaces.</p> 51 52 @since OpenOffice 1.1.2 53*/ 54published interface XAccessibleRelationSet : ::com::sun::star::uno::XInterface 55{ 56 /** Returns the number of relations in this relation set. 57 58 @return 59 Returns the number of relations or zero if there are none. 60 */ 61 long getRelationCount (); 62 63 /** Returns the relation of this relation set that is specified by 64 the given index. 65 66 @param nIndex 67 This index specifies the relatio to return. 68 69 @return 70 For a valid index, i.e. inside the range 0 to the number of 71 relations minus one, the returned value is the requested 72 relation. If the index is invalid then the returned relation 73 has the type INVALID. 74 75 */ 76 AccessibleRelation getRelation ([in] long nIndex) 77 raises (::com::sun::star::lang::IndexOutOfBoundsException); 78 79 /** Tests whether the relation set contains a relation matching the 80 specified key. 81 82 @param aRelationType 83 The type of relation to look for in this set of relations. This 84 has to be one of the constants of 85 <type>AccessibleRelationType</type>. 86 87 @return 88 Returns <TRUE/> if there is a (at least one) relation of the 89 given type and <FALSE/> if there is no such relation in the set. 90 */ 91 boolean containsRelation ([in] short aRelationType); 92 93 /** Retrieve and return the relation with the given relation type. 94 95 @param aRelationType 96 The type of the relation to return. This has to be one of the 97 constants of <type>AccessibleRelationType</type>. 98 99 @return 100 If a relation with the given type could be found than (a copy 101 of) this relation is returned. Otherwise a relation with the 102 type INVALID is returned. 103 */ 104 AccessibleRelation getRelationByType ([in] short aRelationType); 105}; 106 107}; }; }; }; 108 109#endif 110