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