Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / accessibility / XAccessibleSelection.idl
blobcc10cca4417737847062b4957232c58ad347cdb8
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_XAccessibleSelection_idl__
21 #define __com_sun_star_accessibility_XAccessibleSelection_idl__
23 #include <com/sun/star/uno/XInterface.idl>
24 #include <com/sun/star/lang/IndexOutOfBoundsException.idl>
26 module com { module sun { module star { module accessibility {
28 interface XAccessible;
30 /** Implement this interface to represent a selection of accessible objects.
32 <p>This interface is the standard mechanism to obtain and modify the
33 currently selected children. Every object that has children that can be
34 selected should support this interface.</p>
36 <p>The XAccessibleSelection interface has to be implemented
37 in conjunction with the XAccessibleContext interface that
38 provides the children on which the first operates.</p>
40 <p>It depends on the class implementing this interface, whether it
41 supports single or multi selection.</p>
43 @since OOo 1.1.2
45 interface XAccessibleSelection : ::com::sun::star::uno::XInterface
47 /** Selects the specified Accessible child of the
48 object.
50 <p>Depending on the implementing class the child is added to the
51 current set a selected children (multi selection) or a previously
52 selected child is deselected first (single selection).</p>
54 @param nChildIndex
55 Index of the child which is to add to the selection. This index
56 refers to all the children of this object.
57 @throws ::com::sun::star::lang::IndexOutOfBoundsException
58 if the given index does not lie in the valid range of 0 up to
59 the result of
60 XAccessibleContext::getAccessibleChildCount()-1.
62 void selectAccessibleChild ([in] long nChildIndex)
63 raises (::com::sun::star::lang::IndexOutOfBoundsException);
65 /** Determines if the specified child of this object is selected.
67 @param nChildIndex
68 Index of the child for which to detect whether it is selected.
69 This index refers to all the children of this object.
71 @return
72 Returns `TRUE` if the specified child is selected and `FALSE`
73 if it is not selected.
74 @throws ::com::sun::star::lang::IndexOutOfBoundsException
75 if the given index does not lie in the valid range of 0 up to
76 the result of
77 XAccessibleContext::getAccessibleChildCount()-1.
79 boolean isAccessibleChildSelected ([in] long nChildIndex)
80 raises (::com::sun::star::lang::IndexOutOfBoundsException);
82 /** Clears the selection, so that no children of the
83 object are selected.
85 void clearAccessibleSelection ();
87 /** Select all children.
89 <p>Causes every child of the object to be selected if the object
90 supports multiple selections. If multiple selection is not
91 supported then the first child, if it exists, is selected and all
92 other children are deselected.</p>
94 void selectAllAccessibleChildren ();
96 /** Returns the number of Accessible children that are currently
97 selected.
99 <p>This number specifies the valid interval of indices that can be
100 used as arguments for the methods
101 XAccessibleSelection::getSelectedChild() and
102 XAccessibleSelection::deselectSelectedChild().</p>
104 @return
105 Returns the number of selected children of this object or 0 if
106 no child is selected.
108 long getSelectedAccessibleChildCount ();
110 /** Returns the specified selected Accessible child.
112 @param nSelectedChildIndex
113 This index refers only to the selected children, not to all the
114 children of this object. Even if all children are selected, the
115 indices enumerating the selected children need not be the same
116 as those enumerating all children. If only single selection is
117 supported the only valid value is 0.
119 @return
120 If the index is valid, i.e. not negative and lower than the
121 number of selected children, then a valid reference to the
122 corresponding XAccessible child is returned.
123 Otherwise an exception is thrown.
124 @throws ::com::sun::star::lang::IndexOutOfBoundsException
125 if the given index does not lie in the valid range of 0 up to
126 the result of
127 XAccessibleRelationSet::getAccessibleChildCount()-1.
129 XAccessible getSelectedAccessibleChild ([in] long nSelectedChildIndex)
130 raises (::com::sun::star::lang::IndexOutOfBoundsException);
132 /** Removes the specified child from the set of this object's
133 selected children. Note that not all applications support
134 deselection: calls to this method may be silently ignored.
136 @param nChildIndex
137 This index refers to all children not just the selected ones.
138 If the specified child is not selected or it can not be
139 deselected for any reason then the method call is silently
140 ignored.
141 @throws ::com::sun::star::lang::IndexOutOfBoundsException
142 if the given index does not lie in the valid range of 0 up to,
143 but not including, the result of
144 XAccessibleContext::getAccessibleChildCount().
146 void deselectAccessibleChild ([in] long nChildIndex)
147 raises (::com::sun::star::lang::IndexOutOfBoundsException);
150 }; }; }; };
152 #endif
154 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */