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