1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28#ifndef __com_sun_star_accessibility_XAccessibleRelationSet_idl__ 29#define __com_sun_star_accessibility_XAccessibleRelationSet_idl__ 30 31#ifndef __com_sun_star_accessibility_AccessibleRelation_idl__ 32#include <com/sun/star/accessibility/AccessibleRelation.idl> 33#endif 34 35#ifndef __com_sun_star_uno_XInterface_idl__ 36#include <com/sun/star/uno/XInterface.idl> 37#endif 38#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__ 39#include <com/sun/star/lang/IndexOutOfBoundsException.idl> 40#endif 41 42module com { module sun { module star { module accessibility { 43 44/** Implement this interface to give access to an object's set of relations. 45 46 <p>Such relation are modeled with the <type>AccessibleRelation</type> 47 structure. This interface is used for representing sets of relations 48 between <type>Accessible</type> objects. Most of the convenience 49 methods of the corresponding AccessibleRelationSet interface of the Java 50 Accessibility API have been removed from this interface in order to 51 clean it up. These methods are <member>add</member>, 52 <member>addAll</member>, <member>clear</member>, and 53 <member>remove</member>. The other methods have been renamed to achieve 54 a geater conformance with the other accessibility interfaces.</p> 55 56 @since OOo 1.1.2 57*/ 58published interface XAccessibleRelationSet : ::com::sun::star::uno::XInterface 59{ 60 /** Returns the number of relations in this relation set. 61 62 @return 63 Returns the number of relations or zero if there are none. 64 */ 65 long getRelationCount (); 66 67 /** Returns the relation of this relation set that is specified by 68 the given index. 69 70 @param nIndex 71 This index specifies the relatio to return. 72 73 @return 74 For a valid index, i.e. inside the range 0 to the number of 75 relations minus one, the returned value is the requested 76 relation. If the index is invalid then the returned relation 77 has the type INVALID. 78 79 */ 80 AccessibleRelation getRelation ([in] long nIndex) 81 raises (::com::sun::star::lang::IndexOutOfBoundsException); 82 83 /** Tests whether the relation set contains a relation matching the 84 specified key. 85 86 @param aRelationType 87 The type of relation to look for in this set of relations. This 88 has to be one of the constants of 89 <type>AccessibleRelationType</type>. 90 91 @return 92 Returns <TRUE/> if there is a (at least one) relation of the 93 given type and <FALSE/> if there is no such relation in the set. 94 */ 95 boolean containsRelation ([in] short aRelationType); 96 97 /** Retrieve and return the relation with the given relation type. 98 99 @param aRelationType 100 The type of the relation to return. This has to be one of the 101 constants of <type>AccessibleRelationType</type>. 102 103 @return 104 If a relation with the given type could be found than (a copy 105 of) this relation is returned. Otherwise a relation with the 106 type INVALID is returned. 107 */ 108 AccessibleRelation getRelationByType ([in] short aRelationType); 109}; 110 111}; }; }; }; 112 113#endif 114