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_XGridControl_idl__ 28#define __com_sun_star_awt_grid_XGridControl_idl__ 29 30#include <com/sun/star/uno/XInterface.idl> 31#include <com/sun/star/lang/IndexOutOfBoundsException.idl> 32#include <com/sun/star/util/VetoException.idl> 33 34//============================================================================= 35 36module com { module sun { module star { module awt { module grid { 37 38//============================================================================= 39 40/** An interface to a control that displays a tabular data. 41 42 @see UnoControlGrid 43 44 @since OOo 3.3 45 */ 46published interface XGridControl 47{ 48 /** retrieves the column which a given point belongs to 49 50 @param X 51 the ordinate of the point, in pixel coordinates. 52 @param Y 53 the abscissa of the point, in pixel coordinates. 54 @return 55 the index of the column which the point lies in, or -1 if no column is under the given point. 56 */ 57 long getColumnAtPoint( [in] long X, [in] long Y ); 58 59 /** retrieves the row which a given point belongs to 60 61 @param X 62 the ordinate of the point, in pixel coordinates. 63 @param Y 64 the abscissa of the point, in pixel coordinates. 65 @return 66 the index of the row which the point lies in, or -1 if no row is under the given point. 67 */ 68 long getRowAtPoint( [in] long X, [in] long Y ); 69 70 /** returns the column index of the currently active cell 71 72 <p>If the grid control's does not contain any cells (which happens if the grid column model does not contain any 73 columns, or if grid data model does not contain any rows), then <code>-1</code> is returned.</p> 74 */ 75 long getCurrentColumn(); 76 77 /** returns the row index of the currently active cell 78 79 <p>If the grid control's does not contain any cells (which happens if the grid column model does not contain any 80 columns, or if grid data model does not contain any rows), then <code>-1</code> is returned.</p> 81 */ 82 long getCurrentRow(); 83 84 /** moves the cursor to the given cell 85 @param ColumnIndex 86 the column index of the cell to activate. 87 @param RowIndex 88 the row index of the cell to activate. 89 @throws ::com::sun::star::lang::IndexOutOfBoundsException 90 if either <code>ColumnIndex</code> or <code>RowIndex</code> are out of range. 91 @throws ::com::sun::star::util::VetoException 92 if moving the cursor to another cell is vetoed. 93 */ 94 void goToCell( 95 [in] long ColumnIndex, 96 [in] long RowIndex 97 ) 98 raises ( ::com::sun::star::lang::IndexOutOfBoundsException 99 , ::com::sun::star::util::VetoException 100 ); 101}; 102 103//============================================================================= 104 105}; }; }; }; }; 106 107#endif 108