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_form_component_GridControl_idl__
24#define __com_sun_star_form_component_GridControl_idl__
25
26#ifndef __com_sun_star_util_Color_idl__
27#include <com/sun/star/util/Color.idl>
28#endif
29
30#ifndef __com_sun_star_form_FormControlModel_idl__
31#include <com/sun/star/form/FormControlModel.idl>
32#endif
33
34#ifndef __com_sun_star_form_XGridColumnFactory_idl__
35#include <com/sun/star/form/XGridColumnFactory.idl>
36#endif
37
38#ifndef __com_sun_star_form_FormComponents_idl__
39#include <com/sun/star/form/FormComponents.idl>
40#endif
41
42#ifndef __com_sun_star_container_XContainer_idl__
43#include <com/sun/star/container/XContainer.idl>
44#endif
45
46#ifndef __com_sun_star_view_XSelectionSupplier_idl__
47#include <com/sun/star/view/XSelectionSupplier.idl>
48#endif
49
50#ifndef __com_sun_star_container_XNameContainer_idl__
51#include <com/sun/star/container/XNameContainer.idl>
52#endif
53
54#ifndef __com_sun_star_container_XIndexContainer_idl__
55#include <com/sun/star/container/XIndexContainer.idl>
56#endif
57
58#ifndef __com_sun_star_container_XEnumerationAccess_idl__
59#include <com/sun/star/container/XEnumerationAccess.idl>
60#endif
61
62#ifndef __com_sun_star_script_XEventAttacherManager_idl__
63#include <com/sun/star/script/XEventAttacherManager.idl>
64#endif
65
66#ifndef __com_sun_star_form_XReset_idl__
67#include <com/sun/star/form/XReset.idl>
68#endif
69
70#ifndef __com_sun_star_awt_FontDescriptor_idl__
71#include <com/sun/star/awt/FontDescriptor.idl>
72#endif
73
74
75//=============================================================================
76
77 module com {  module sun {  module star {  module form {  module component {
78
79//=============================================================================
80
81/** specifies a model for a control which can display form data in a table-like way.
82
83	<p>In opposite to other form controls, grid controls do not only
84	display the single current value of a column they are bound to. Moreover, they do
85	display not only the current row of the form, but all rows (at least potentially, limited
86	by the control size, of course).</p>
87
88	<p>The table rows in a grid control correspond to the rows in the <type>DataForm</type>
89	the control belongs to, and the columns correspond to single columns of the form's row set.</p>
90
91	<p>Columns of a grid control are modeled by own objects, too. They are very similar to usual
92	<type scope="com::sun::star::form">DataAwareControlModel</type>s modeling other "single-value" controls, but they are not described
93	as own services. Instead, they need to be created using the <type scope="com::sun::star::form">XGridColumnFactory</type> interface.</p>
94 */
95published service GridControl
96{
97	service com::sun::star::form::FormControlModel;
98
99	/** provides basic functionality of a container of <type scope="com::sun::star::form">FormComponent</type>s.
100
101		<p>All the container-related methods of this service related to control models,
102		this is what are the container elements for a <type>GridControl</type>.</p>
103
104		<p>As the <type scope="com::sun::star::form">FormComponents</type> service also specifies
105		the <type scope"com::sun::star::script">XEventAttacherManager</type> service, grid control models
106		also provide a scripting environment for their columns.</p>
107	*/
108	service com::sun::star::form::FormComponents;
109
110	/** allows to create column models to be inserted into the control model.
111
112		<p>Note that the object returned by the <membere scope="com::sun::star::form">XGridColumnFactory::createColumn</member>
113		method is not part of the grid control, yet. It needs to be inserted using any of the
114		container interfaces.</p>
115
116		<p>You always need to use this interface for creating columns for the grid control.
117		Column models not created this way will not be accepted when inserted later on.</p>
118	*/
119	interface com::sun::star::form::XGridColumnFactory;
120
121	/** gives access to the currently selection.
122
123		<p>In a grid control, single columns can be selected (at most one at a time).<br/>
124		For various unfortunate reaons, this selection is an aspect of the model, not of the
125		control as you would expect.</p>
126
127		<p>This interface is deprecated, new implementations should not use it anymore, as it is to
128		be superseeded by a solution which is bound to the control, not the model.</p>
129
130		@deprecated
131	*/
132	interface com::sun::star::view::XSelectionSupplier;
133
134	/** resets the control.
135
136		<p>The reset of the control is forwarded to all it's elements, means to all the column models.
137		As grid columns are very much like data-aware stand-alone controls, you can find a description
138		of the reset functionality in <member scope="com::sun::star::form">DataAwareControlModel::XReset</member>.
139	*/
140	interface com::sun::star::form::XReset;
141
142	//-------------------------------------------------------------------------
143
144	/** returns the border style of the control.
145
146		<pre>
147		0: No border
148		1: 3D border
149		2: simple border
150		</pre>
151	 */
152	[property] short Border;
153
154    //-------------------------------------------------------------------------
155
156    /** specifies the color of the border, if present
157
158        <p>Not every border style (see <member>Border</member>) may support coloring.
159        For instance, usually a border with 3D effect will ignore the BorderColor setting.</p>
160
161        @since OpenOffice 2.0
162     */
163    [optional, property] long BorderColor;
164
165	//-------------------------------------------------------------------------
166
167	/** determines whether the control is enabled or disabled.
168	 */
169	[property] boolean Enabled;
170
171	//-------------------------------------------------------------------------
172
173	/** contains the font attributes of the text in the control.
174	 */
175	[property] com::sun::star::awt::FontDescriptor FontDescriptor;
176
177	//-------------------------------------------------------------------------
178
179	/** specifies the height of a row of the grid.
180
181		<p>If the value is set to <NULL/>, the height is determined automatically according
182		to the current font used.</p>
183
184		@see GridControl::FontDescriptor
185	 */
186	[property] long RowHeight;
187
188	//-------------------------------------------------------------------------
189
190	/** determines whether the control can be reached by the tabulator key.
191	 */
192	[property] boolean Tabstop;
193
194	//-------------------------------------------------------------------------
195
196	/** specifies the text color (RGB) of the control.
197	 */
198	[property] com::sun::star::util::Color TextColor;
199
200};
201
202//=============================================================================
203
204}; }; }; }; };
205
206#endif
207