1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27#ifndef __com_sun_star_awt_grid_XGridSelection_idl__ 28#define __com_sun_star_awt_grid_XGridSelection_idl__ 29 30#include <com/sun/star/awt/grid/XGridSelectionListener.idl> 31#include <com/sun/star/lang/IndexOutOfBoundsException.idl> 32 33//============================================================================= 34 35module com { module sun { module star { module awt { module grid { 36 37//============================================================================= 38 39/** This interfaces provides access to the selection of row for <type>UnoControlGrid</type>. 40 41 @since OpenOffice.org 3.4 42 */ 43published interface XGridRowSelection 44{ 45 /** Selects all rows. 46 */ 47 void selectAllRows(); 48 49 /** selects a given row 50 51 @param RowIndex 52 denotes the index of the row to select 53 54 @raises ::com::sun::star::lang::IndexOutOfBoundsException 55 if <code>RowIndex</code> does not denote a valid row index 56 */ 57 void selectRow( [in] long RowIndex ) 58 raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); 59 60 /** Deselects all selected rows. 61 */ 62 void deselectAllRows(); 63 64 /** removes the selection for a given row 65 66 @param RowIndex 67 denotes the index of the row to deselect 68 */ 69 void deselectRow( [in] long RowIndex ) 70 raises ( ::com::sun::star::lang::IndexOutOfBoundsException ); 71 72 /** Returns the indicies of all selected rows. 73 @returns 74 a sequence of indicies. 75 */ 76 sequence< long > getSelectedRows(); 77 78 /** Returns whether rows are selected. 79 @returns 80 <true/> if and only if at least one row is selected. 81 */ 82 boolean hasSelectedRows(); 83 84 /** Returns whether a specific row is selected. 85 86 @param RowIndex 87 the index of a row. If the value does not denote a valid row index, i.e. is smaller than <code>0</code> 88 or greater than the number of rows, this is silently ignored, and <false/> is returned. 89 90 @returns 91 <true/> if and only if there is a row with the given index, and it is selected currently. 92 */ 93 boolean isRowSelected( [in] long RowIndex ); 94 95 /** Adds a listener for the <type>GridSelectionEvent</type> posted after the grid changes. 96 @param listener 97 the listener to add. 98 */ 99 void addSelectionListener( [in] XGridSelectionListener listener); 100 101 /** Removes a listener previously added with <method>addSelectionListener()</method>. 102 @param listener 103 the listener to remove. 104 */ 105 void removeSelectionListener( [in] XGridSelectionListener listener); 106}; 107 108//============================================================================= 109 110}; }; }; }; }; 111 112#endif 113