summaryrefslogtreecommitdiff
path: root/offapi/com/sun/star/form/component/GridControl.idl
blob: b39dc67e9fefd63d0cb76d4a676c1565da0d5f60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
/*************************************************************************
 *
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * Copyright 2000, 2010 Oracle and/or its affiliates.
 *
 * OpenOffice.org - a multi-platform office productivity suite
 *
 * This file is part of OpenOffice.org.
 *
 * OpenOffice.org is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License version 3
 * only, as published by the Free Software Foundation.
 *
 * OpenOffice.org is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License version 3 for more details
 * (a copy is included in the LICENSE file that accompanied this code).
 *
 * You should have received a copy of the GNU Lesser General Public License
 * version 3 along with OpenOffice.org.  If not, see
 * <http://www.openoffice.org/license.html>
 * for a copy of the LGPLv3 License.
 *
 ************************************************************************/
#ifndef __com_sun_star_form_component_GridControl_idl__
#define __com_sun_star_form_component_GridControl_idl__

#ifndef __com_sun_star_util_Color_idl__
#include <com/sun/star/util/Color.idl>
#endif

#ifndef __com_sun_star_form_FormControlModel_idl__
#include <com/sun/star/form/FormControlModel.idl>
#endif

#ifndef __com_sun_star_form_XGridColumnFactory_idl__
#include <com/sun/star/form/XGridColumnFactory.idl>
#endif

#ifndef __com_sun_star_form_FormComponents_idl__
#include <com/sun/star/form/FormComponents.idl>
#endif

#ifndef __com_sun_star_container_XContainer_idl__
#include <com/sun/star/container/XContainer.idl>
#endif

#ifndef __com_sun_star_view_XSelectionSupplier_idl__
#include <com/sun/star/view/XSelectionSupplier.idl>
#endif

#ifndef __com_sun_star_container_XNameContainer_idl__
#include <com/sun/star/container/XNameContainer.idl>
#endif

#ifndef __com_sun_star_container_XIndexContainer_idl__
#include <com/sun/star/container/XIndexContainer.idl>
#endif

#ifndef __com_sun_star_container_XEnumerationAccess_idl__
#include <com/sun/star/container/XEnumerationAccess.idl>
#endif

#ifndef __com_sun_star_script_XEventAttacherManager_idl__
#include <com/sun/star/script/XEventAttacherManager.idl>
#endif

#ifndef __com_sun_star_form_XReset_idl__
#include <com/sun/star/form/XReset.idl>
#endif

#ifndef __com_sun_star_awt_FontDescriptor_idl__
#include <com/sun/star/awt/FontDescriptor.idl>
#endif


//=============================================================================

 module com {  module sun {  module star {  module form {  module component {

//=============================================================================

/** specifies a model for a control which can display form data in a table-like way.

    <p>In opposite to other form controls, grid controls do not only
    display the single current value of a column they are bound to. Moreover, they do
    display not only the current row of the form, but all rows (at least potentially, limited
    by the control size, of course).</p>

    <p>The table rows in a grid control correspond to the rows in the <type>DataForm</type>
    the control belongs to, and the columns correspond to single columns of the form's row set.</p>

    <p>Columns of a grid control are modeled by own objects, too. They are very similar to usual
    <type scope="com::sun::star::form">DataAwareControlModel</type>s modeling other "single-value" controls, but they are not described
    as own services. Instead, they need to be created using the <type scope="com::sun::star::form">XGridColumnFactory</type> interface.</p>
 */
published service GridControl
{
    service com::sun::star::form::FormControlModel;

    /** provides basic functionality of a container of <type scope="com::sun::star::form">FormComponent</type>s.

        <p>All the container-related methods of this service related to control models,
        this is what are the container elements for a <type>GridControl</type>.</p>

        <p>As the <type scope="com::sun::star::form">FormComponents</type> service also specifies
        the <type scope"com::sun::star::script">XEventAttacherManager</type> service, grid control models
        also provide a scripting environment for their columns.</p>
    */
    service com::sun::star::form::FormComponents;

    /** allows to create column models to be inserted into the control model.

        <p>Note that the object returned by the <membere scope="com::sun::star::form">XGridColumnFactory::createColumn</member>
        method is not part of the grid control, yet. It needs to be inserted using any of the
        container interfaces.</p>

        <p>You always need to use this interface for creating columns for the grid control.
        Column models not created this way will not be accepted when inserted later on.</p>
    */
    interface com::sun::star::form::XGridColumnFactory;

    /** gives access to the currently selection.

        <p>In a grid control, single columns can be selected (at most one at a time).<br/>
        For various unfortunate reaons, this selection is an aspect of the model, not of the
        control as you would expect.</p>

        <p>This interface is deprecated, new implementations should not use it anymore, as it is to
        be superseeded by a solution which is bound to the control, not the model.</p>

        @deprecated
    */
    interface com::sun::star::view::XSelectionSupplier;

    /** resets the control.

        <p>The reset of the control is forwarded to all it's elements, means to all the column models.
        As grid columns are very much like data-aware stand-alone controls, you can find a description
        of the reset functionality in <member scope="com::sun::star::form">DataAwareControlModel::XReset</member>.
    */
    interface com::sun::star::form::XReset;

    //-------------------------------------------------------------------------

    /** returns the border style of the control.

        <pre>
        0: No border
        1: 3D border
        2: simple border
        </pre>
     */
    [property] short Border;

    //-------------------------------------------------------------------------

    /** specifies the color of the border, if present

        <p>Not every border style (see <member>Border</member>) may support coloring.
        For instance, usually a border with 3D effect will ignore the BorderColor setting.</p>

        @since OOo 2.0
     */
    [optional, property] long BorderColor;

    //-------------------------------------------------------------------------

    /** determines whether the control is enabled or disabled.
     */
    [property] boolean Enabled;

    //-------------------------------------------------------------------------

    /** contains the font attributes of the text in the control.
     */
    [property] com::sun::star::awt::FontDescriptor FontDescriptor;

    //-------------------------------------------------------------------------

    /** specifies the height of a row of the grid.

        <p>If the value is set to <NULL/>, the height is determined automatically according
        to the current font used.</p>

        @see GridControl::FontDescriptor
     */
    [property] long RowHeight;

    //-------------------------------------------------------------------------

    /** determines whether the control can be reached by the tabulator key.
     */
    [property] boolean Tabstop;

    //-------------------------------------------------------------------------

    /** specifies the text color (RGB) of the control.
     */
    [property] com::sun::star::util::Color TextColor;

};

//=============================================================================

}; }; }; }; };

#endif