merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / form / component / GridControl.idl
blobf3077ec037ac2f7799e28fd19fc3c6f053de74d4
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
27 #ifndef __com_sun_star_form_component_GridControl_idl__
28 #define __com_sun_star_form_component_GridControl_idl__
30 #ifndef __com_sun_star_util_Color_idl__
31 #include <com/sun/star/util/Color.idl>
32 #endif
34 #ifndef __com_sun_star_form_FormControlModel_idl__
35 #include <com/sun/star/form/FormControlModel.idl>
36 #endif
38 #ifndef __com_sun_star_form_XGridColumnFactory_idl__
39 #include <com/sun/star/form/XGridColumnFactory.idl>
40 #endif
42 #ifndef __com_sun_star_form_FormComponents_idl__
43 #include <com/sun/star/form/FormComponents.idl>
44 #endif
46 #ifndef __com_sun_star_container_XContainer_idl__
47 #include <com/sun/star/container/XContainer.idl>
48 #endif
50 #ifndef __com_sun_star_view_XSelectionSupplier_idl__
51 #include <com/sun/star/view/XSelectionSupplier.idl>
52 #endif
54 #ifndef __com_sun_star_container_XNameContainer_idl__
55 #include <com/sun/star/container/XNameContainer.idl>
56 #endif
58 #ifndef __com_sun_star_container_XIndexContainer_idl__
59 #include <com/sun/star/container/XIndexContainer.idl>
60 #endif
62 #ifndef __com_sun_star_container_XEnumerationAccess_idl__
63 #include <com/sun/star/container/XEnumerationAccess.idl>
64 #endif
66 #ifndef __com_sun_star_script_XEventAttacherManager_idl__
67 #include <com/sun/star/script/XEventAttacherManager.idl>
68 #endif
70 #ifndef __com_sun_star_form_XReset_idl__
71 #include <com/sun/star/form/XReset.idl>
72 #endif
74 #ifndef __com_sun_star_awt_FontDescriptor_idl__
75 #include <com/sun/star/awt/FontDescriptor.idl>
76 #endif
79 //=============================================================================
81 module com { module sun { module star { module form { module component {
83 //=============================================================================
85 /** specifies a model for a control which can display form data in a table-like way.
87 <p>In opposite to other form controls, grid controls do not only
88 display the single current value of a column they are bound to. Moreover, they do
89 display not only the current row of the form, but all rows (at least potentially, limited
90 by the control size, of course).</p>
92 <p>The table rows in a grid control correspond to the rows in the <type>DataForm</type>
93 the control belongs to, and the columns correspond to single columns of the form's row set.</p>
95 <p>Columns of a grid control are modeled by own objects, too. They are very similar to usual
96 <type scope="com::sun::star::form">DataAwareControlModel</type>s modeling other "single-value" controls, but they are not described
97 as own services. Instead, they need to be created using the <type scope="com::sun::star::form">XGridColumnFactory</type> interface.</p>
99 published service GridControl
101 service com::sun::star::form::FormControlModel;
103 /** provides basic functionality of a container of <type scope="com::sun::star::form">FormComponent</type>s.
105 <p>All the container-related methods of this service related to control models,
106 this is what are the container elements for a <type>GridControl</type>.</p>
108 <p>As the <type scope="com::sun::star::form">FormComponents</type> service also specifies
109 the <type scope"com::sun::star::script">XEventAttacherManager</type> service, grid control models
110 also provide a scripting environment for their columns.</p>
112 service com::sun::star::form::FormComponents;
114 /** allows to create column models to be inserted into the control model.
116 <p>Note that the object returned by the <membere scope="com::sun::star::form">XGridColumnFactory::createColumn</member>
117 method is not part of the grid control, yet. It needs to be inserted using any of the
118 container interfaces.</p>
120 <p>You always need to use this interface for creating columns for the grid control.
121 Column models not created this way will not be accepted when inserted later on.</p>
123 interface com::sun::star::form::XGridColumnFactory;
125 /** gives access to the currently selection.
127 <p>In a grid control, single columns can be selected (at most one at a time).<br/>
128 For various unfortunate reaons, this selection is an aspect of the model, not of the
129 control as you would expect.</p>
131 <p>This interface is deprecated, new implementations should not use it anymore, as it is to
132 be superseeded by a solution which is bound to the control, not the model.</p>
134 @deprecated
136 interface com::sun::star::view::XSelectionSupplier;
138 /** resets the control.
140 <p>The reset of the control is forwarded to all it's elements, means to all the column models.
141 As grid columns are very much like data-aware stand-alone controls, you can find a description
142 of the reset functionality in <member scope="com::sun::star::form">DataAwareControlModel::XReset</member>.
144 interface com::sun::star::form::XReset;
146 //-------------------------------------------------------------------------
148 /** returns the border style of the control.
150 <pre>
151 0: No border
152 1: 3D border
153 2: simple border
154 </pre>
156 [property] short Border;
158 //-------------------------------------------------------------------------
160 /** specifies the color of the border, if present
162 <p>Not every border style (see <member>Border</member>) may support coloring.
163 For instance, usually a border with 3D effect will ignore the BorderColor setting.</p>
165 @since OOo 2.0.0
167 [optional, property] long BorderColor;
169 //-------------------------------------------------------------------------
171 /** determines whether the control is enabled or disabled.
173 [property] boolean Enabled;
175 //-------------------------------------------------------------------------
177 /** contains the font attributes of the text in the control.
179 [property] com::sun::star::awt::FontDescriptor FontDescriptor;
181 //-------------------------------------------------------------------------
183 /** specifies the height of a row of the grid.
185 <p>If the value is set to <NULL/>, the height is determined automatically according
186 to the current font used.</p>
188 @see GridControl::FontDescriptor
190 [property] long RowHeight;
192 //-------------------------------------------------------------------------
194 /** determines whether the control can be reached by the tabulator key.
196 [property] boolean Tabstop;
198 //-------------------------------------------------------------------------
200 /** specifies the text color (RGB) of the control.
202 [property] com::sun::star::util::Color TextColor;
206 //=============================================================================
208 }; }; }; }; };
210 #endif