1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef __com_sun_star_accessibility_XAccessibleSelection_idl__
30 #define __com_sun_star_accessibility_XAccessibleSelection_idl__
32 #include
<com
/sun
/star
/uno
/XInterface.idl
>
33 #include
<com
/sun
/star
/lang
/IndexOutOfBoundsException.idl
>
35 module com
{ module sun
{ module star
{ module accessibility
{
37 published
interface XAccessible
;
39 /** Implement this interface to represent a selection of accessible objects.
41 <p>This interface is the standard mechanism to obtain and modify the
42 currently selected children. Every object that has children that can be
43 selected should support this interface.</p>
45 <p>The <type>XAccessibleSelection</type> interface has to be implemented
46 in conjunction with the <type>XAccessibleContext</type> interface that
47 provides the children on which the first operates.</p>
49 <p>It depends on the class implementing this interface, whether it
50 supports single or multi selection.</p>
54 published
interface XAccessibleSelection
: ::com
::sun
::star
::uno
::XInterface
56 /** Selects the specified <type>Accessible</type> child of the
59 <p>Depending on the implementing class the child is added to the
60 current set a selected children (multi selection) or a previously
61 selected child is deselected first (single selection).</p>
64 Index of the child which is to add to the selection. This index
65 refers to all the children of this object.
66 @throws ::com::sun::star::lang::IndexOutOfBoundsException
67 if the given index does not lie in the valid range of 0 up to
69 <member>XAccessibleContext::getAccessibleChildCount()</member>-1.
71 void selectAccessibleChild
([in] long nChildIndex
)
72 raises
(::com
::sun
::star
::lang
::IndexOutOfBoundsException
);
74 /** Determines if the specified child of this object is selected.
77 Index of the child for which to detect whether it is selected.
78 This index refers to all the children of this object.
81 Returns <TRUE/> if the specified child is selected and <FALSE/>
82 if it is not selected.
83 @throws ::com::sun::star::lang::IndexOutOfBoundsException
84 if the given index does not lie in the valid range of 0 up to
86 <member>XAccessibleContext::getAccessibleChildCount()</member>-1.
88 boolean isAccessibleChildSelected
([in] long nChildIndex
)
89 raises
(::com
::sun
::star
::lang
::IndexOutOfBoundsException
);
91 /** Clears the selection, so that no children of the
94 [oneway
] void clearAccessibleSelection
();
96 /** Select all children.
98 <p>Causes every child of the object to be selected if the object
99 supports multiple selections. If multiple selection is not
100 supported then the first child, if it exists, is selected and all
101 other children are deselected.</p>
103 [oneway
] void selectAllAccessibleChildren
();
105 /** Returns the number of Accessible children that are currently
108 <p>This number specifies the valid interval of indices that can be
109 used as arguments for the methods
110 <member>XAccessibleSelection::getSelectedChild</member> and
111 <member>XAccessibleSelection::deselectSelectedChild</member>.</p>
114 Returns the number of selected children of this object or 0 if
115 no child is selected.
117 long getSelectedAccessibleChildCount
();
119 /** Returns the specified selected Accessible child.
121 @param nSelectedChildIndex
122 This index refers only to the selected children, not to all the
123 children of this object. Even if all children are selected, the
124 indices enumerating the selected children need not be the same
125 as those enumerating all children. If only single selection is
126 supported the only valid value is 0.
129 If the index is valid, i.e. not negative and lower than the
130 number of selected children, then a valid reference to the
131 corresponding <type>XAccessible</type> child is returned.
132 Otherwise an exception is thrown.
133 @throws ::com::sun::star::lang::IndexOutOfBoundsException
134 if the given index does not lie in the valid range of 0 up to
136 <member>XAccessibleRelationSet::getAccessibleChildCount()</member>-1.
138 XAccessible getSelectedAccessibleChild
([in] long nSelectedChildIndex
)
139 raises
(::com
::sun
::star
::lang
::IndexOutOfBoundsException
);
141 /** Removes the specified child from the set of this object's
142 selected children. Note that not all applications support
143 deselection: calls to this method may be silently ignored.
146 This index refers to all children not just the selected ones.
147 If the specified child is not selected or it can not be
148 deselected for any reason then the method call is silently
150 @throws ::com::sun::star::lang::IndexOutOfBoundsException
151 if the given index does not lie in the valid range of 0 up to,
152 but not including, the result of
153 <member scope="XAccessibleContext">getAccessibleChildCount()</member>.
155 void deselectAccessibleChild
([in] long nChildIndex
)
156 raises
(::com
::sun
::star
::lang
::IndexOutOfBoundsException
);
163 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */