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