1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
22 module com
{ module sun
{ module star
{ module form
{ module component
{
25 /** specifies a model for a control which can display form data in a table-like way.
27 <p>In opposite to other form controls, grid controls do not only
28 display the single current value of a column they are bound to. Moreover, they do
29 display not only the current row of the form, but all rows (at least potentially, limited
30 by the control size, of course).</p>
32 <p>The table rows in a grid control correspond to the rows in the DataForm
33 the control belongs to, and the columns correspond to single columns of the form's row set.</p>
35 <p>Columns of a grid control are modeled by own objects, too. They are very similar to usual
36 com::sun::star::form::DataAwareControlModels modeling other "single-value" controls, but they are not described
37 as own services. Instead, they need to be created using the com::sun::star::form::XGridColumnFactory interface.</p>
39 published service GridControl
41 service com
::sun
::star
::form
::FormControlModel
;
43 /** provides basic functionality of a container of com::sun::star::form::FormComponents.
45 <p>All the container-related methods of this service related to control models,
46 this is what are the container elements for a GridControl.</p>
48 <p>As the com::sun::star::form::FormComponents service also specifies
49 the com::sun::star::script::XEventAttacherManager service, grid control
50 models also provide a scripting environment for their columns.</p>
52 service com
::sun
::star
::form
::FormComponents
;
54 /** allows to create column models to be inserted into the control model.
56 <p>Note that the object returned by the com::sun::star::form::XGridColumnFactory::createColumn()
57 method is not part of the grid control, yet. It needs to be inserted using any of the
58 container interfaces.</p>
60 <p>You always need to use this interface for creating columns for the grid control.
61 Column models not created this way will not be accepted when inserted later on.</p>
63 interface com
::sun
::star
::form
::XGridColumnFactory
;
65 /** gives access to the currently selection.
67 <p>In a grid control, single columns can be selected (at most one at a time).<br/>
68 For various unfortunate reasons, this selection is an aspect of the model, not of the
69 control as you would expect.</p>
71 <p>This interface is deprecated, new implementations should not use it anymore, as it is to
72 be superseded by a solution which is bound to the control, not the model.</p>
76 interface com
::sun
::star
::view
::XSelectionSupplier
;
78 /** resets the control.
80 <p>The reset of the control is forwarded to all its elements, means to all the column models.
81 As grid columns are very much like data-aware stand-alone controls, you can find a description
82 of the reset functionality in com::sun::star::form::DataAwareControlModel::XReset.
84 interface com
::sun
::star
::form
::XReset
;
87 /** returns the border style of the control.
95 [property
] short Border
;
98 /** specifies the color of the border, if present
100 <p>Not every border style (see #Border) may support coloring.
101 For instance, usually a border with 3D effect will ignore the BorderColor setting.</p>
105 [optional, property
] long BorderColor
;
108 /** determines whether the control is enabled or disabled.
110 [property
] boolean Enabled
;
113 /** contains the font attributes of the text in the control.
115 [property
] com
::sun
::star
::awt
::FontDescriptor FontDescriptor
;
118 /** specifies the height of a row of the grid.
120 <p>If the value is set to `NULL`, the height is determined automatically according
121 to the current font used.</p>
123 @see GridControl::FontDescriptor
125 [property
] long RowHeight
;
128 /** determines whether the control can be reached by the tabulator key.
130 [property
] boolean Tabstop
;
133 /** specifies the text color (RGB) of the control.
135 [property
] com
::sun
::star
::util
::Color TextColor
;
142 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */