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