1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_awt_grid_UnoControlGridModel_idl__
24#define __com_sun_star_awt_grid_UnoControlGridModel_idl__
25
26#include <com/sun/star/awt/grid/XGridColumnModel.idl>
27#include <com/sun/star/awt/grid/XGridDataModel.idl>
28#include <com/sun/star/awt/UnoControlModel.idl>
29#include <com/sun/star/view/SelectionType.idl>
30#include <com/sun/star/awt/FontDescriptor.idl>
31#include <com/sun/star/style/VerticalAlignment.idl>
32#include <com/sun/star/util/Color.idl>
33
34//=============================================================================
35
36module com {  module sun {  module star {  module awt { module grid {
37
38//=============================================================================
39
40/** specifies the standard model of a <type>UnoControlGrid</type> control.
41
42	@since OpenOffice 3.3
43 */
44published service UnoControlGridModel
45{
46	/** specifies the standard model of an <type scope="com::sun::star::awt">UnoControl</type>. */
47	service com::sun::star::awt::UnoControlModel;
48
49	/** Specifies whether the grid control should display a special header column.
50
51    <p>The default value is <FALSE/></p>
52	*/
53	[property] boolean ShowRowHeader;
54
55    /** specifies the width of the row header column, if applicable.
56
57        <p>The width is specified in application font units - see <type scope="com::sun::star::util">MeasureUnit</type>.</p>
58
59        <p>The value given here is ignored if <member>ShowRowHeader</member> is <FALSE/>.</p>
60    */
61    [property] long RowHeaderWidth;
62
63	/** Specifies whether the grid control should display a title row.
64
65    <p>The default value is <TRUE/></p>
66	*/
67	[property] boolean ShowColumnHeader;
68
69    /** specifies the height of the column header row, if applicable.
70
71        <p>The height is specified in application font units - see <type scope="com::sun::star::util">MeasureUnit</type>.</p>
72
73        <p>The value given here is ignored if <member>ShowColumnHeader</member> is <FALSE/>.</p>
74
75        <p>If the property is <void/>, the grid control shall automatically determine a height which conveniently allows,
76        according to the used font, to display one line of text.</p>
77    */
78    [property, maybevoid] long ColumnHeaderHeight;
79
80	/** Specifies the height of rows in the grid control.
81
82        <p>The height is specified in application font units - see <type scope="com::sun::star::util">MeasureUnit</type>.</p>
83	*/
84	[property, maybevoid] long RowHeight;
85
86	/**	Specifies the <type>XGridColumnModel</type> that is providing the column structure.
87
88		<p>You can implement your own instance of <type>XGridColumnModel</type> or use
89		the <type>DefaultGridColumnModel</type>.
90
91        <p>The column model is in the ownership of the grid model: When you set a new column model, or dispose
92        the grid model, then the (old) column model is disposed, too.</p>
93
94        <p>The default for this property is an empty instance of the <type>DefaultGridColumnModel</type>.</p>
95	*/
96	[property] XGridColumnModel ColumnModel;
97
98	/**	Specifies the <type>XGridDataModel</type> that is providing the hierarchical data.
99
100		<p>You can implement your own instance of <type>XGridDataModel</type> or use
101		the <type>DefaultGridDataModel</type>.
102
103        <p>The data model is in the ownership of the grid model: When you set a new data model, or dispose
104        the grid model, then the (old) data model is disposed, too.</p>
105
106        <p>The default for this property is an empty instance of the <type>DefaultGridDataModel</type>.</p>
107	*/
108	[property] XGridDataModel GridDataModel;
109
110	/** Specifies the vertical scrollbar mode.
111		<p>The default value is <FALSE/></p>
112	*/
113	[property] boolean HScroll;
114
115	/** Specifies the horizontal scrollbar mode.
116		<p>The default value is <FALSE/></p>
117	*/
118	[property] boolean VScroll;
119
120	/** Specifies that the control can be reached with the TAB key.
121	 */
122	[property] boolean Tabstop;
123
124	/** Specifies the selection mode that is enabled for this grid control.
125		<p>The default value is <member scope="com::sun::star::view">SelectionType::SINGLE</member></p>
126	*/
127	[property] ::com::sun::star::view::SelectionType SelectionModel;
128
129    /** controls whether or not to paint horizontal and vertical lines between the grid cells.
130
131        @see GridLineColor
132    */
133    [property] boolean UseGridLines;
134
135    /** specifies the color to be used when drawing lines between cells
136
137        <p>If this property has a value of <VOID/>, the grid control renderer will use some default color,
138        depending on the control's style settings.</p>
139
140        @see UseGridLines
141    */
142    [property, maybevoid] ::com::sun::star::util::Color             GridLineColor;
143
144    /** specifies the color to be used when drawing the background of row or column headers
145
146        <p>If this property has a value of <VOID/>, the grid control renderer will use some default color,
147        depending on the control's style settings.</p>
148    */
149    [property, maybevoid] ::com::sun::star::util::Color             HeaderBackgroundColor;
150
151    /** specifies the color to be used when drawing the text within row or column headers
152
153        <p>If this property has a value of <VOID/>, the grid control renderer will use some default color,
154        depending on the control's style settings.</p>
155    */
156    [property, maybevoid] ::com::sun::star::util::Color             HeaderTextColor;
157
158    /** specifies the color to be used when drawing the background of selected cells, while the control has the focus.
159
160        <p>If this property has a value of <VOID/>, the grid control renderer will use some default color,
161        depending on the control's style settings.</p>
162    */
163    [property, maybevoid] ::com::sun::star::util::Color             ActiveSelectionBackgroundColor;
164
165    /** specifies the color to be used when drawing the background of selected cells, while the control does not have
166        the focus.
167
168        <p>If this property has a value of <VOID/>, the grid control renderer will use some default color,
169        depending on the control's style settings.</p>
170    */
171    [property, maybevoid] ::com::sun::star::util::Color             InactiveSelectionBackgroundColor;
172
173    /** specifies the color to be used when drawing the text of selected cells, while the control has the focus.
174
175        <p>If this property has a value of <VOID/>, the grid control renderer will use some default color,
176        depending on the control's style settings.</p>
177    */
178    [property, maybevoid] ::com::sun::star::util::Color             ActiveSelectionTextColor;
179
180    /** specifies the color to be used when drawing the text of selected cells, while the control does not have
181        the focus.
182
183        <p>If this property has a value of <VOID/>, the grid control renderer will use some default color,
184        depending on the control's style settings.</p>
185    */
186    [property, maybevoid] ::com::sun::star::util::Color             InactiveSelectionTextColor;
187
188    /** specifies the colors to be used as background for data rows.
189
190        <p>If this sequence is non-empty, the data rows will be rendered with alternating background colors: Assuming
191        the sequence has <code>n</code> elements, each row will use the background color as specified by its number's
192        remainder modulo <code>n</code>.</p>
193
194        <p>If this sequence is empty, all rows will use the same background color as the control as whole.</p>
195
196        <p>If this property has a value of <VOID/>, rows will be painted
197        in alternating background colors, every second row having a background color derived from the control's
198        selection color.</p>
199    */
200    [property, maybevoid] sequence< ::com::sun::star::util::Color > RowBackgroundColors;
201
202    /** specifies the vertical alignment of the content in the control.
203	 */
204	[property] com::sun::star::style::VerticalAlignment VerticalAlign;
205
206	/** specifies the font attributes of the text in the control.
207	 */
208	[property] com::sun::star::awt::FontDescriptor FontDescriptor;
209
210    /** specifies the color to be used when drawing cell texts
211
212        <p>If this property has a value of <VOID/>, the grid control renderer will use some default color,
213        depending on the control's style settings.</p>
214    */
215    [property, maybevoid] ::com::sun::star::util::Color             TextColor;
216
217	/** specifies the color to be used when drawing text lines (underlining and strikethrough)
218
219        <p>If this property has a value of <VOID/>, the grid control renderer will use some default color,
220        depending on the control's style settings.</p>
221	 */
222	[property, maybevoid] com::sun::star::util::Color               TextLineColor;
223
224	/** specifies the <type scope="com::sun::star::text">FontEmphasis</type>
225        value of the text in the control.
226	 */
227	[property] short FontEmphasisMark;
228
229	/** specifies the <type scope="com::sun::star::text">FontRelief</type>
230        value of the text in the control.
231	 */
232	[property] short FontRelief;
233
234	/** specifies the help text of the control.
235	 */
236	[property] string HelpText;
237
238	/** specifies the help URL of the control.
239	 */
240	[property] string HelpURL;
241
242};
243
244//=============================================================================
245
246}; }; }; }; };
247
248#endif
249