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