merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / accessibility / XAccessibleRelationSet.idl
bloba5af46d8588c5cda4508e85cd17cdd7ccd7ef184
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
28 #ifndef __com_sun_star_accessibility_XAccessibleRelationSet_idl__
29 #define __com_sun_star_accessibility_XAccessibleRelationSet_idl__
31 #ifndef __com_sun_star_accessibility_AccessibleRelation_idl__
32 #include <com/sun/star/accessibility/AccessibleRelation.idl>
33 #endif
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
42 module com { module sun { module star { module accessibility {
44 /** Implement this interface to give access to an object's set of relations.
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>
56 @since OOo 1.1.2
58 published interface XAccessibleRelationSet : ::com::sun::star::uno::XInterface
60 /** Returns the number of relations in this relation set.
62 @return
63 Returns the number of relations or zero if there are none.
65 long getRelationCount ();
67 /** Returns the relation of this relation set that is specified by
68 the given index.
70 @param nIndex
71 This index specifies the relatio to return.
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.
80 AccessibleRelation getRelation ([in] long nIndex)
81 raises (::com::sun::star::lang::IndexOutOfBoundsException);
83 /** Tests whether the relation set contains a relation matching the
84 specified key.
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>.
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.
95 boolean containsRelation ([in] short aRelationType);
97 /** Retrieve and return the relation with the given relation type.
99 @param aRelationType
100 The type of the relation to return. This has to be one of the
101 constants of <type>AccessibleRelationType</type>.
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.
108 AccessibleRelation getRelationByType ([in] short aRelationType);
111 }; }; }; };
113 #endif