Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / accessibility / XAccessibleRelationSet.idl
blob95db6b1e5b41f00c8b071bfc06f0bd8896b3efff
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef __com_sun_star_accessibility_XAccessibleRelationSet_idl__
21 #define __com_sun_star_accessibility_XAccessibleRelationSet_idl__
23 #include <com/sun/star/accessibility/AccessibleRelation.idl>
24 #include <com/sun/star/uno/XInterface.idl>
25 #include <com/sun/star/lang/IndexOutOfBoundsException.idl>
27 module com { module sun { module star { module accessibility {
29 /** Implement this interface to give access to an object's set of relations.
31 <p>Such relation are modeled with the AccessibleRelation
32 structure. This interface is used for representing sets of relations
33 between Accessible objects. Most of the convenience
34 methods of the corresponding AccessibleRelationSet interface of the Java
35 Accessibility API have been removed from this interface in order to
36 clean it up. These methods are add(),
37 addAll(), clear(), and
38 remove(). The other methods have been renamed to achieve
39 a greater conformance with the other accessibility interfaces.</p>
41 @since OOo 1.1.2
43 interface XAccessibleRelationSet : ::com::sun::star::uno::XInterface
45 /** Returns the number of relations in this relation set.
47 @return
48 Returns the number of relations or zero if there are none.
50 long getRelationCount ();
52 /** Returns the relation of this relation set that is specified by
53 the given index.
55 @param nIndex
56 This index specifies the relation to return.
58 @return
59 For a valid index, i.e. inside the range 0 to the number of
60 relations minus one, the returned value is the requested
61 relation. If the index is invalid then the returned relation
62 has the type INVALID.
65 AccessibleRelation getRelation ([in] long nIndex)
66 raises (::com::sun::star::lang::IndexOutOfBoundsException);
68 /** Tests whether the relation set contains a relation matching the
69 specified key.
71 @param aRelationType
72 The type of relation to look for in this set of relations. This
73 has to be one of the constants of
74 AccessibleRelationType.
76 @return
77 Returns `TRUE` if there is a (at least one) relation of the
78 given type and `FALSE` if there is no such relation in the set.
80 boolean containsRelation ([in] short aRelationType);
82 /** Retrieve and return the relation with the given relation type.
84 @param aRelationType
85 The type of the relation to return. This has to be one of the
86 constants of AccessibleRelationType.
88 @return
89 If a relation with the given type could be found than (a copy
90 of) this relation is returned. Otherwise a relation with the
91 type INVALID is returned.
93 AccessibleRelation getRelationByType ([in] short aRelationType);
96 }; }; }; };
98 #endif
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */