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 28#ifndef __com_sun_star_form_control_GridControl_idl__ 29#define __com_sun_star_form_control_GridControl_idl__ 30 31#ifndef __com_sun_star_awt_UnoControl_idl__ 32#include <com/sun/star/awt/UnoControl.idl> 33#endif 34 35#ifndef __com_sun_star_form_XGrid_idl__ 36#include <com/sun/star/form/XGrid.idl> 37#endif 38 39#ifndef __com_sun_star_form_XBoundComponent_idl__ 40#include <com/sun/star/form/XBoundComponent.idl> 41#endif 42 43#ifndef __com_sun_star_form_XGridFieldDataSupplier_idl__ 44#include <com/sun/star/form/XGridFieldDataSupplier.idl> 45#endif 46 47#ifndef __com_sun_star_util_XModifyBroadcaster_idl__ 48#include <com/sun/star/util/XModifyBroadcaster.idl> 49#endif 50 51#ifndef __com_sun_star_util_XModeSelector_idl__ 52#include <com/sun/star/util/XModeSelector.idl> 53#endif 54 55#ifndef __com_sun_star_container_XIndexAccess_idl__ 56#include <com/sun/star/container/XIndexAccess.idl> 57#endif 58 59#ifndef __com_sun_star_container_XEnumerationAccess_idl__ 60#include <com/sun/star/container/XEnumerationAccess.idl> 61#endif 62 63#ifndef __com_sun_star_container_XContainer_idl__ 64#include <com/sun/star/container/XContainer.idl> 65#endif 66 67#ifndef __com_sun_star_frame_XDispatchProviderInterception_idl__ 68#include <com/sun/star/frame/XDispatchProviderInterception.idl> 69#endif 70 71#ifndef __com_sun_star_view_XSelectionSupplier_idl__ 72#include <com/sun/star/view/XSelectionSupplier.idl> 73#endif 74 75//============================================================================= 76 77module com { module sun { module star { module form { 78 79published interface XGridControl; 80 81module control { 82 83//============================================================================= 84 85/** describes a table-like control for displaying data. 86 87 <p>The model of the control has to support the <type scope="com::sun::star::form::component">GridControl</type> 88 service.</p> 89 90 @see com::sun::star::awt::UnoControl 91 @see com::sun::star::awt::UnoControlModel 92*/ 93published service GridControl 94{ 95 service com::sun::star::awt::UnoControl; 96 97 /** allows committing the content of the active cell of the control. 98 */ 99 interface com::sun::star::form::XBoundComponent; 100 101 /** allows access to the active cell within the grid. 102 103 <p>Only the column position can be modified using this interface, as the row position within 104 a table control bound to a data source is given implicitly (by the cursor position of the data source).</p> 105 */ 106 interface com::sun::star::form::XGrid; 107 108 [optional] interface com::sun::star::form::XGridControl; 109 110 /** used to broadcast modifications made by the user (within the active cell) 111 */ 112 interface com::sun::star::util::XModifyBroadcaster; 113 114 /** allows access to the field data of the grid's current row in different formats 115 */ 116 [optional] interface com::sun::star::form::XGridFieldDataSupplier; 117 118 /** allows access to objects wrapping a single column 119 */ 120 interface com::sun::star::container::XIndexAccess; 121 122 /** allows creation of an enumeration for the column objects 123 */ 124 interface com::sun::star::container::XEnumerationAccess; 125 126 /** is used to switch the operating modes of the control. 127 128 <p>Besides the normal opreration mode (which is used to display the database form's data) the control may 129 for instance support a filter mode.</p> 130 */ 131 [optional] interface com::sun::star::util::XModeSelector; 132 133 /** used to control the selection of rows in the grid control. 134 135 <p>The selection used with the methods <method scope="com::sun::star::view">XSelectionSupplier::getSelection</method> 136 and <method scope="com::sun::star::view">XSelectionSupplier::select</method> is a sequence of Any's.<br/> 137 Here the elements of the Sequence are the bookmarks (in the <type scope="com::sun::star::sdb">RowSet</type>) 138 of the (to-be-) selected rows.</p> 139 */ 140 [optional] interface com::sun::star::view::XSelectionSupplier; 141 142 /** allows external components to register dispatchers for some common form actions. 143 144 <p>A grid control can contain own UI elements for traveling within the database form it belongs to (This 145 concept seems to make sense, as a grid control - in opposite to other data aware controls - displayes 146 not only one record at a time, but a larger number of records of the database form.)<br/> 147 With the help of this interface, external components which wish to handle such travelings themself can 148 register interceptors for the actions in question.</p> 149 150 <p>Usual URLs to use include 151 <dl> 152 <dt>.uno:FormSlots/moveToFirst</dt><dd> move the cursor to the first record</dd> 153 <dt>.uno:FormSlots/moveToPrev</dt><dd> move the cursor to the previous record</dd> 154 <dt>.uno:FormSlots/moveToNext</dt><dd> move the cursor to the next record</dd> 155 <dt>.uno:FormSlots/moveToLast</dt><dd> move the cursor to the last record</dd> 156 <dt>.uno:FormSlots/moveToNew</dt><dd> move the cursor to the (one and only) <em>new</em> record</dd> 157 <dt>.uno:FormSlots/undoRecord</dt><dd> undo the changes done so far in the current record</dd> 158 </dl> 159 </p> 160 161 <p>A concrete implementation of this service may offer more or less URLs, but if it offers some of the URLs 162 above, it must stick to the meanings defined above.</p> 163 */ 164 [optional] interface com::sun::star::frame::XDispatchProviderInterception; 165}; 166 167//============================================================================= 168 169}; }; }; }; }; 170 171 172#endif 173