merge the formfield patch from ooo-build
[ooovba.git] / offapi / com / sun / star / form / component / GridControl.idl
blob0e31eee1420d4e14e8fe043f5646ae3b15f206b5
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: GridControl.idl,v $
10 * $Revision: 1.12 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_form_component_GridControl_idl__
31 #define __com_sun_star_form_component_GridControl_idl__
33 #ifndef __com_sun_star_util_Color_idl__
34 #include <com/sun/star/util/Color.idl>
35 #endif
37 #ifndef __com_sun_star_form_FormControlModel_idl__
38 #include <com/sun/star/form/FormControlModel.idl>
39 #endif
41 #ifndef __com_sun_star_form_XGridColumnFactory_idl__
42 #include <com/sun/star/form/XGridColumnFactory.idl>
43 #endif
45 #ifndef __com_sun_star_form_FormComponents_idl__
46 #include <com/sun/star/form/FormComponents.idl>
47 #endif
49 #ifndef __com_sun_star_container_XContainer_idl__
50 #include <com/sun/star/container/XContainer.idl>
51 #endif
53 #ifndef __com_sun_star_view_XSelectionSupplier_idl__
54 #include <com/sun/star/view/XSelectionSupplier.idl>
55 #endif
57 #ifndef __com_sun_star_container_XNameContainer_idl__
58 #include <com/sun/star/container/XNameContainer.idl>
59 #endif
61 #ifndef __com_sun_star_container_XIndexContainer_idl__
62 #include <com/sun/star/container/XIndexContainer.idl>
63 #endif
65 #ifndef __com_sun_star_container_XEnumerationAccess_idl__
66 #include <com/sun/star/container/XEnumerationAccess.idl>
67 #endif
69 #ifndef __com_sun_star_script_XEventAttacherManager_idl__
70 #include <com/sun/star/script/XEventAttacherManager.idl>
71 #endif
73 #ifndef __com_sun_star_form_XReset_idl__
74 #include <com/sun/star/form/XReset.idl>
75 #endif
77 #ifndef __com_sun_star_awt_FontDescriptor_idl__
78 #include <com/sun/star/awt/FontDescriptor.idl>
79 #endif
82 //=============================================================================
84 module com { module sun { module star { module form { module component {
86 //=============================================================================
88 /** specifies a model for a control which can display form data in a table-like way.
90 <p>In opposite to other form controls, grid controls do not only
91 display the single current value of a column they are bound to. Moreover, they do
92 display not only the current row of the form, but all rows (at least potentially, limited
93 by the control size, of course).</p>
95 <p>The table rows in a grid control correspond to the rows in the <type>DataForm</type>
96 the control belongs to, and the columns correspond to single columns of the form's row set.</p>
98 <p>Columns of a grid control are modeled by own objects, too. They are very similar to usual
99 <type scope="com::sun::star::form">DataAwareControlModel</type>s modeling other "single-value" controls, but they are not described
100 as own services. Instead, they need to be created using the <type scope="com::sun::star::form">XGridColumnFactory</type> interface.</p>
102 published service GridControl
104 service com::sun::star::form::FormControlModel;
106 /** provides basic functionality of a container of <type scope="com::sun::star::form">FormComponent</type>s.
108 <p>All the container-related methods of this service related to control models,
109 this is what are the container elements for a <type>GridControl</type>.</p>
111 <p>As the <type scope="com::sun::star::form">FormComponents</type> service also specifies
112 the <type scope"com::sun::star::script">XEventAttacherManager</type> service, grid control models
113 also provide a scripting environment for their columns.</p>
115 service com::sun::star::form::FormComponents;
117 /** allows to create column models to be inserted into the control model.
119 <p>Note that the object returned by the <membere scope="com::sun::star::form">XGridColumnFactory::createColumn</member>
120 method is not part of the grid control, yet. It needs to be inserted using any of the
121 container interfaces.</p>
123 <p>You always need to use this interface for creating columns for the grid control.
124 Column models not created this way will not be accepted when inserted later on.</p>
126 interface com::sun::star::form::XGridColumnFactory;
128 /** gives access to the currently selection.
130 <p>In a grid control, single columns can be selected (at most one at a time).<br/>
131 For various unfortunate reaons, this selection is an aspect of the model, not of the
132 control as you would expect.</p>
134 <p>This interface is deprecated, new implementations should not use it anymore, as it is to
135 be superseeded by a solution which is bound to the control, not the model.</p>
137 @deprecated
139 interface com::sun::star::view::XSelectionSupplier;
141 /** resets the control.
143 <p>The reset of the control is forwarded to all it's elements, means to all the column models.
144 As grid columns are very much like data-aware stand-alone controls, you can find a description
145 of the reset functionality in <member scope="com::sun::star::form">DataAwareControlModel::XReset</member>.
147 interface com::sun::star::form::XReset;
149 //-------------------------------------------------------------------------
151 /** returns the border style of the control.
153 <pre>
154 0: No border
155 1: 3D border
156 2: simple border
157 </pre>
159 [property] short Border;
161 //-------------------------------------------------------------------------
163 /** specifies the color of the border, if present
165 <p>Not every border style (see <member>Border</member>) may support coloring.
166 For instance, usually a border with 3D effect will ignore the BorderColor setting.</p>
168 @since OOo 2.0.0
170 [optional, property] long BorderColor;
172 //-------------------------------------------------------------------------
174 /** determines whether the control is enabled or disabled.
176 [property] boolean Enabled;
178 //-------------------------------------------------------------------------
180 /** contains the font attributes of the text in the control.
182 [property] com::sun::star::awt::FontDescriptor FontDescriptor;
184 //-------------------------------------------------------------------------
186 /** specifies the height of a row of the grid.
188 <p>If the value is set to <NULL/>, the height is determined automatically according
189 to the current font used.</p>
191 @see GridControl::FontDescriptor
193 [property] long RowHeight;
195 //-------------------------------------------------------------------------
197 /** determines whether the control can be reached by the tabulator key.
199 [property] boolean Tabstop;
201 //-------------------------------------------------------------------------
203 /** specifies the text color (RGB) of the control.
205 [property] com::sun::star::util::Color TextColor;
209 //=============================================================================
211 }; }; }; }; };
213 #endif