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