Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / form / component / GridControl.idl
blob0a8db09f2b2fd47c71e97876016e76ce389e8ce5
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_form_component_GridControl_idl__
20 #define __com_sun_star_form_component_GridControl_idl__
22 #include <com/sun/star/util/Color.idl>
23 #include <com/sun/star/form/FormControlModel.idl>
25 #include <com/sun/star/form/XGridColumnFactory.idl>
27 #include <com/sun/star/form/FormComponents.idl>
28 #include <com/sun/star/container/XContainer.idl>
30 #include <com/sun/star/view/XSelectionSupplier.idl>
32 #include <com/sun/star/container/XNameContainer.idl>
34 #include <com/sun/star/container/XIndexContainer.idl>
36 #include <com/sun/star/container/XEnumerationAccess.idl>
38 #include <com/sun/star/script/XEventAttacherManager.idl>
40 #include <com/sun/star/form/XReset.idl>
42 #include <com/sun/star/awt/FontDescriptor.idl>
46 module com { module sun { module star { module form { module component {
49 /** specifies a model for a control which can display form data in a table-like way.
51 <p>In opposite to other form controls, grid controls do not only
52 display the single current value of a column they are bound to. Moreover, they do
53 display not only the current row of the form, but all rows (at least potentially, limited
54 by the control size, of course).</p>
56 <p>The table rows in a grid control correspond to the rows in the DataForm
57 the control belongs to, and the columns correspond to single columns of the form's row set.</p>
59 <p>Columns of a grid control are modeled by own objects, too. They are very similar to usual
60 com::sun::star::form::DataAwareControlModels modeling other "single-value" controls, but they are not described
61 as own services. Instead, they need to be created using the com::sun::star::form::XGridColumnFactory interface.</p>
63 published service GridControl
65 service com::sun::star::form::FormControlModel;
67 /** provides basic functionality of a container of com::sun::star::form::FormComponents.
69 <p>All the container-related methods of this service related to control models,
70 this is what are the container elements for a GridControl.</p>
72 <p>As the com::sun::star::form::FormComponents service also specifies
73 the com::sun::star::script::XEventAttacherManager service, grid control
74 models also provide a scripting environment for their columns.</p>
76 service com::sun::star::form::FormComponents;
78 /** allows to create column models to be inserted into the control model.
80 <p>Note that the object returned by the com::sun::star::form::XGridColumnFactory::createColumn()
81 method is not part of the grid control, yet. It needs to be inserted using any of the
82 container interfaces.</p>
84 <p>You always need to use this interface for creating columns for the grid control.
85 Column models not created this way will not be accepted when inserted later on.</p>
87 interface com::sun::star::form::XGridColumnFactory;
89 /** gives access to the currently selection.
91 <p>In a grid control, single columns can be selected (at most one at a time).<br/>
92 For various unfortunate reasons, this selection is an aspect of the model, not of the
93 control as you would expect.</p>
95 <p>This interface is deprecated, new implementations should not use it anymore, as it is to
96 be superseded by a solution which is bound to the control, not the model.</p>
98 @deprecated
100 interface com::sun::star::view::XSelectionSupplier;
102 /** resets the control.
104 <p>The reset of the control is forwarded to all its elements, means to all the column models.
105 As grid columns are very much like data-aware stand-alone controls, you can find a description
106 of the reset functionality in com::sun::star::form::DataAwareControlModel::XReset.
108 interface com::sun::star::form::XReset;
111 /** returns the border style of the control.
113 <pre>
114 0: No border
115 1: 3D border
116 2: simple border
117 </pre>
119 [property] short Border;
122 /** specifies the color of the border, if present
124 <p>Not every border style (see #Border) may support coloring.
125 For instance, usually a border with 3D effect will ignore the BorderColor setting.</p>
127 @since OOo 2.0
129 [optional, property] long BorderColor;
132 /** determines whether the control is enabled or disabled.
134 [property] boolean Enabled;
137 /** contains the font attributes of the text in the control.
139 [property] com::sun::star::awt::FontDescriptor FontDescriptor;
142 /** specifies the height of a row of the grid.
144 <p>If the value is set to `NULL`, the height is determined automatically according
145 to the current font used.</p>
147 @see GridControl::FontDescriptor
149 [property] long RowHeight;
152 /** determines whether the control can be reached by the tabulator key.
154 [property] boolean Tabstop;
157 /** specifies the text color (RGB) of the control.
159 [property] com::sun::star::util::Color TextColor;
164 }; }; }; }; };
166 #endif
168 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */