1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24#ifndef __com_sun_star_accessibility_XAccessibleSelection_idl__ 25#define __com_sun_star_accessibility_XAccessibleSelection_idl__ 26 27#ifndef __com_sun_star_uno_XInterface_idl__ 28#include <com/sun/star/uno/XInterface.idl> 29#endif 30#ifndef __com_sun_star_lang_IndexOutOfBoundsException_idl__ 31#include <com/sun/star/lang/IndexOutOfBoundsException.idl> 32#endif 33 34module com { module sun { module star { module accessibility { 35 36 published interface XAccessible; 37 38/** Implement this interface to represent a selection of accessible objects. 39 40 <p>This interface is the standard mechanism to obtain and modify the 41 currently selected children. Every object that has children that can be 42 selected should support this interface.</p> 43 44 <p>The <type>XAccessibleSelection</type> interface has to be implemented 45 in conjunction with the <type>XAccessibleContext</type> interface that 46 provides the children on which the first operates.</p> 47 48 <p>It depends on the class implementing this interface, whether it 49 supports single or multi selection.</p> 50 51 @since OpenOffice 1.1.2 52*/ 53published interface XAccessibleSelection : ::com::sun::star::uno::XInterface 54{ 55 /** Selects the specified <type>Accessible</type> child of the 56 object. 57 58 <p>Depending on the implementing class the child is added to the 59 current set a selected children (multi selection) or a previously 60 selected child is deselected first (single selection).</p> 61 62 @param nChildIndex 63 Index of the child which is to add to the selection. This index 64 referes to all the children of this object. 65 @throws ::com::sun::star::lang::IndexOutOfBoundsException 66 if the given index does not lie in the valid range of 0 up to 67 the result of 68 <member>XAccessibleContext::getAccessibleChildCount()</member>-1. 69 */ 70 void selectAccessibleChild ([in] long nChildIndex) 71 raises (::com::sun::star::lang::IndexOutOfBoundsException); 72 73 /** Determines if the specified child of this object is selected. 74 75 @param nChildIndex 76 Index of the child for which to detect whether it is selected. 77 This index referes to all the children of this object. 78 79 @return 80 Returns <TRUE/> if the specified child is selected and <FALSE/> 81 if it is not selected. 82 @throws ::com::sun::star::lang::IndexOutOfBoundsException 83 if the given index does not lie in the valid range of 0 up to 84 the result of 85 <member>XAccessibleContext::getAccessibleChildCount()</member>-1. 86 */ 87 boolean isAccessibleChildSelected ([in] long nChildIndex) 88 raises (::com::sun::star::lang::IndexOutOfBoundsException); 89 90 /** Clears the selection, so that no children of the 91 object are selected. 92 */ 93 [oneway] void clearAccessibleSelection (); 94 95 /** Select all children. 96 97 <p>Causes every child of the object to be selected if the object 98 supports multiple selections. If multiple selection is not 99 supported then the first child, if it exists, is selected and all 100 other children are deselected.</p> 101 */ 102 [oneway] void selectAllAccessibleChildren (); 103 104 /** Returns the number of Accessible children that are currently 105 selected. 106 107 <p>This number specifies the valid interval of indices that can be 108 used as arguments for the methods 109 <member>XAccessibleSelection::getSelectedChild</member> and 110 <member>XAccessibleSelection::deselectSelectedChild</member>.</p> 111 112 @return 113 Returns the number of selected children of this object or 0 if 114 no child is selected. 115 */ 116 long getSelectedAccessibleChildCount (); 117 118 /** Returns the specified selected Accessible child. 119 120 @param nSelectedChildIndex 121 This index refers only to the selected children, not to all the 122 children of this object. Even if all children are selected, the 123 indices enumerating the selected children need not be the same 124 as those enumerating all children. If only single selection is 125 supported the only valid value is 0. 126 127 @return 128 If the index is valid, i.e. not negative and lower than the 129 number of selected children, then a valid reference to the 130 corresponding <type>XAccessible</type> child is returned. 131 Otherwise an exception is thrown. 132 @throws ::com::sun::star::lang::IndexOutOfBoundsException 133 if the given index does not lie in the valid range of 0 up to 134 the result of 135 <member>XAccessibleRelationSet::getAccessibleChildCount()</member>-1. 136 */ 137 XAccessible getSelectedAccessibleChild ([in] long nSelectedChildIndex) 138 raises (::com::sun::star::lang::IndexOutOfBoundsException); 139 140 /** Removes the specified child from the set of this object's 141 selected children. Note that not all applications support 142 deselection: calls to this method may be silently ignored. 143 144 @param nChildIndex 145 This index refers to all children not just the selected ones. 146 If the specified child is not selected or it can not be 147 deselected for any reason then the method call is silently 148 ignored. 149 @throws ::com::sun::star::lang::IndexOutOfBoundsException 150 if the given index does not lie in the valid range of 0 up to, 151 but not including, the result of 152 <member scope="XAccessibleContext">getAccessibleChildCount()</member>. 153 */ 154 void deselectAccessibleChild ([in] long nChildIndex) 155 raises (::com::sun::star::lang::IndexOutOfBoundsException); 156}; 157 158}; }; }; }; 159 160#endif 161