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