merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / accessibility / XAccessibleSelection.idl
blob15f5f8c920e7722bddfc684c0ff34b2e39a4fde7
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_XAccessibleSelection_idl__
29 #define __com_sun_star_accessibility_XAccessibleSelection_idl__
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
38 module com { module sun { module star { module accessibility {
40 published interface XAccessible;
42 /** Implement this interface to represent a selection of accessible objects.
44 <p>This interface is the standard mechanism to obtain and modify the
45 currently selected children. Every object that has children that can be
46 selected should support this interface.</p>
48 <p>The <type>XAccessibleSelection</type> interface has to be implemented
49 in conjunction with the <type>XAccessibleContext</type> interface that
50 provides the children on which the first operates.</p>
52 <p>It depends on the class implementing this interface, whether it
53 supports single or multi selection.</p>
55 @since OOo 1.1.2
57 published interface XAccessibleSelection : ::com::sun::star::uno::XInterface
59 /** Selects the specified <type>Accessible</type> child of the
60 object.
62 <p>Depending on the implementing class the child is added to the
63 current set a selected children (multi selection) or a previously
64 selected child is deselected first (single selection).</p>
66 @param nChildIndex
67 Index of the child which is to add to the selection. This index
68 referes to all the children of this object.
69 @throws ::com::sun::star::lang::IndexOutOfBoundsException
70 if the given index does not lie in the valid range of 0 up to
71 the result of
72 <member>XAccessibleContext::getAccessibleChildCount()</member>-1.
74 void selectAccessibleChild ([in] long nChildIndex)
75 raises (::com::sun::star::lang::IndexOutOfBoundsException);
77 /** Determines if the specified child of this object is selected.
79 @param nChildIndex
80 Index of the child for which to detect whether it is selected.
81 This index referes to all the children of this object.
83 @return
84 Returns <TRUE/> if the specified child is selected and <FALSE/>
85 if it is not selected.
86 @throws ::com::sun::star::lang::IndexOutOfBoundsException
87 if the given index does not lie in the valid range of 0 up to
88 the result of
89 <member>XAccessibleContext::getAccessibleChildCount()</member>-1.
91 boolean isAccessibleChildSelected ([in] long nChildIndex)
92 raises (::com::sun::star::lang::IndexOutOfBoundsException);
94 /** Clears the selection, so that no children of the
95 object are selected.
97 [oneway] void clearAccessibleSelection ();
99 /** Select all children.
101 <p>Causes every child of the object to be selected if the object
102 supports multiple selections. If multiple selection is not
103 supported then the first child, if it exists, is selected and all
104 other children are deselected.</p>
106 [oneway] void selectAllAccessibleChildren ();
108 /** Returns the number of Accessible children that are currently
109 selected.
111 <p>This number specifies the valid interval of indices that can be
112 used as arguments for the methods
113 <member>XAccessibleSelection::getSelectedChild</member> and
114 <member>XAccessibleSelection::deselectSelectedChild</member>.</p>
116 @return
117 Returns the number of selected children of this object or 0 if
118 no child is selected.
120 long getSelectedAccessibleChildCount ();
122 /** Returns the specified selected Accessible child.
124 @param nSelectedChildIndex
125 This index refers only to the selected children, not to all the
126 children of this object. Even if all children are selected, the
127 indices enumerating the selected children need not be the same
128 as those enumerating all children. If only single selection is
129 supported the only valid value is 0.
131 @return
132 If the index is valid, i.e. not negative and lower than the
133 number of selected children, then a valid reference to the
134 corresponding <type>XAccessible</type> child is returned.
135 Otherwise an exception is thrown.
136 @throws ::com::sun::star::lang::IndexOutOfBoundsException
137 if the given index does not lie in the valid range of 0 up to
138 the result of
139 <member>XAccessibleRelationSet::getAccessibleChildCount()</member>-1.
141 XAccessible getSelectedAccessibleChild ([in] long nSelectedChildIndex)
142 raises (::com::sun::star::lang::IndexOutOfBoundsException);
144 /** Removes the specified child from the set of this object's
145 selected children. Note that not all applications support
146 deselection: calls to this method may be silently ignored.
148 @param nChildIndex
149 This index refers to all children not just the selected ones.
150 If the specified child is not selected or it can not be
151 deselected for any reason then the method call is silently
152 ignored.
153 @throws ::com::sun::star::lang::IndexOutOfBoundsException
154 if the given index does not lie in the valid range of 0 up to,
155 but not including, the result of
156 <member scope="XAccessibleContext">getAccessibleChildCount()</member>.
158 void deselectAccessibleChild ([in] long nChildIndex)
159 raises (::com::sun::star::lang::IndexOutOfBoundsException);
162 }; }; }; };
164 #endif