gridsort: reworked the color model for grid controls. Now supporting more than two alternating colors,

having more reasonable defaults for the colors (VOID instead of some hard-coded values, which thus are unusable).
Also, introduced new property UseGridLines controlling whether or not to paint the table grid.
This commit is contained in:
Frank Schoenheit [fs] 2011-01-12 12:34:24 +01:00
parent 13d81b8e4d
commit edc807267c

View file

@ -130,26 +130,48 @@ service UnoControlGridModel
*/
[property] ::com::sun::star::view::SelectionType SelectionModel;
/** Specifies the background color of rows. If color for even rows is set, then specifies
the color of odd rows. Default value is white.
*/
[property] ::com::sun::star::util::Color RowBackgroundColor;
/** controls whether or not to paint horizontal and vertical lines between the grid cells.
/** Specifies the background color of even rows. Default value is white.
@see LineColor
*/
[property] ::com::sun::star::util::Color EvenRowBackgroundColor;
[property] boolean UseGridLines;
/** Specifies the background color of header. Default value is white.
*/
[property] ::com::sun::star::util::Color HeaderBackgroundColor;
/** specifies the color to be used when drawing lines between cells
/** Specifies the text color. Default value is black.
*/
[property] ::com::sun::star::util::Color TextColor;
<p>If this property has a value of <VOID/>, the grid control renderer will use some default color,
depending on the system's style settings.</p>
/** Specifies the line color. Default value is white.
@see UseGridLines
*/
[property] ::com::sun::star::util::Color LineColor;
[property, maybevoid] ::com::sun::star::util::Color GridLineColor;
/** specifies the color to be used when drawing the background of row or column headers
<p>If this property has a value of <VOID/>, the grid control renderer will use some default color,
depending on the system's style settings.</p>
*/
[property, maybevoid] ::com::sun::star::util::Color HeaderBackgroundColor;
/** specifies the color to be used when drawing the text within row or column headers
<p>If this property has a value of <VOID/>, the grid control renderer will use some default color,
depending on the system's style settings.</p>
*/
[property, maybevoid] ::com::sun::star::util::Color HeaderTextColor;
/** specifies the colors to be used as background for data rows.
<p>If this sequence is non-empty, the data rows will be rendered with alternating background colors: Assuming
the sequence has <code>n</code> elements, each row will use the background color as specified by its number's
remainder modulo <code>n</code>.</p>
<p>If this sequence is empty, all rows will use the same background color as the control as whole.</p>
<p>If this property does not exist at a particular implementation, or is <VOID/>, rows will be painted
in alternating background colors, every second row having a background color derived from the control's
selection color.</p>
*/
[property, maybevoid] sequence< ::com::sun::star::util::Color > RowBackgroundColors;
/** specifies the vertical alignment of the content in the control.
@ -165,6 +187,20 @@ service UnoControlGridModel
*/
[property] com::sun::star::awt::FontDescriptor FontDescriptor;
/** specifies the color to be used when drawing cell texts
<p>If this property has a value of <VOID/>, the grid control renderer will use some default color,
depending on the system's style settings.</p>
*/
[property, maybevoid] ::com::sun::star::util::Color TextColor;
/** specifies the color to be used when drawing text lines (underlining and strikethrough)
<p>If this property has a value of <VOID/>, the grid control renderer will use some default color,
depending on the system's style settings.</p>
*/
[property, maybevoid] com::sun::star::util::Color TextLineColor;
/** specifies the <type scope="com::sun::star::text">FontEmphasis</type>
value of the text in the control.
*/