1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XAccessibleSelection.idl,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef __com_sun_star_accessibility_XAccessibleSelection_idl__
32 #define __com_sun_star_accessibility_XAccessibleSelection_idl__
34 #ifndef __com_sun_star_uno_XInterface_idl__
35 #include
<com
/sun
/star
/uno
/XInterface.idl
>
37 #ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__
38 #include
<com
/sun
/star
/lang
/IndexOutOfBoundsException.idl
>
41 module com
{ module sun
{ module star
{ module accessibility
{
43 published
interface XAccessible
;
45 /** Implement this interface to represent a selection of accessible objects.
47 <p>This interface is the standard mechanism to obtain and modify the
48 currently selected children. Every object that has children that can be
49 selected should support this interface.</p>
51 <p>The <type>XAccessibleSelection</type> interface has to be implemented
52 in conjunction with the <type>XAccessibleContext</type> interface that
53 provides the children on which the first operates.</p>
55 <p>It depends on the class implementing this interface, whether it
56 supports single or multi selection.</p>
60 published
interface XAccessibleSelection
: ::com
::sun
::star
::uno
::XInterface
62 /** Selects the specified <type>Accessible</type> child of the
65 <p>Depending on the implementing class the child is added to the
66 current set a selected children (multi selection) or a previously
67 selected child is deselected first (single selection).</p>
70 Index of the child which is to add to the selection. This index
71 referes to all the children of this object.
72 @throws ::com::sun::star::lang::IndexOutOfBoundsException
73 if the given index does not lie in the valid range of 0 up to
75 <member>XAccessibleContext::getAccessibleChildCount()</member>-1.
77 void selectAccessibleChild
([in] long nChildIndex
)
78 raises
(::com
::sun
::star
::lang
::IndexOutOfBoundsException
);
80 /** Determines if the specified child of this object is selected.
83 Index of the child for which to detect whether it is selected.
84 This index referes to all the children of this object.
87 Returns <TRUE/> if the specified child is selected and <FALSE/>
88 if it is not selected.
89 @throws ::com::sun::star::lang::IndexOutOfBoundsException
90 if the given index does not lie in the valid range of 0 up to
92 <member>XAccessibleContext::getAccessibleChildCount()</member>-1.
94 boolean isAccessibleChildSelected
([in] long nChildIndex
)
95 raises
(::com
::sun
::star
::lang
::IndexOutOfBoundsException
);
97 /** Clears the selection, so that no children of the
100 [oneway
] void clearAccessibleSelection
();
102 /** Select all children.
104 <p>Causes every child of the object to be selected if the object
105 supports multiple selections. If multiple selection is not
106 supported then the first child, if it exists, is selected and all
107 other children are deselected.</p>
109 [oneway
] void selectAllAccessibleChildren
();
111 /** Returns the number of Accessible children that are currently
114 <p>This number specifies the valid interval of indices that can be
115 used as arguments for the methods
116 <member>XAccessibleSelection::getSelectedChild</member> and
117 <member>XAccessibleSelection::deselectSelectedChild</member>.</p>
120 Returns the number of selected children of this object or 0 if
121 no child is selected.
123 long getSelectedAccessibleChildCount
();
125 /** Returns the specified selected Accessible child.
127 @param nSelectedChildIndex
128 This index refers only to the selected children, not to all the
129 children of this object. Even if all children are selected, the
130 indices enumerating the selected children need not be the same
131 as those enumerating all children. If only single selection is
132 supported the only valid value is 0.
135 If the index is valid, i.e. not negative and lower than the
136 number of selected children, then a valid reference to the
137 corresponding <type>XAccessible</type> child is returned.
138 Otherwise an exception is thrown.
139 @throws ::com::sun::star::lang::IndexOutOfBoundsException
140 if the given index does not lie in the valid range of 0 up to
142 <member>XAccessibleRelationSet::getAccessibleChildCount()</member>-1.
144 XAccessible getSelectedAccessibleChild
([in] long nSelectedChildIndex
)
145 raises
(::com
::sun
::star
::lang
::IndexOutOfBoundsException
);
147 /** Removes the specified child from the set of this object's
148 selected children. Note that not all applications support
149 deselection: calls to this method may be silently ignored.
152 This index refers to all children not just the selected ones.
153 If the specified child is not selected or it can not be
154 deselected for any reason then the method call is silently
156 @throws ::com::sun::star::lang::IndexOutOfBoundsException
157 if the given index does not lie in the valid range of 0 up to,
158 but not including, the result of
159 <member scope="XAccessibleContext">getAccessibleChildCount()</member>.
161 void deselectAccessibleChild
([in] long nChildIndex
)
162 raises
(::com
::sun
::star
::lang
::IndexOutOfBoundsException
);