AdgTableStyle

AdgTableStyle — Customization of table rendering

Synopsis

struct              AdgTableStyle;
struct              AdgTableStyleClass;
const AdgPair *     adg_table_style_get_cell_padding    (AdgTableStyle *table_style);
const AdgPair *     adg_table_style_get_cell_spacing    (AdgTableStyle *table_style);
AdgDress            adg_table_style_get_color_dress     (AdgTableStyle *table_style);
AdgDress            adg_table_style_get_frame_dress     (AdgTableStyle *table_style);
AdgDress            adg_table_style_get_grid_dress      (AdgTableStyle *table_style);
gdouble             adg_table_style_get_row_height      (AdgTableStyle *table_style);
AdgDress            adg_table_style_get_title_dress     (AdgTableStyle *table_style);
AdgDress            adg_table_style_get_value_dress     (AdgTableStyle *table_style);
AdgTableStyle *     adg_table_style_new                 (void);
void                adg_table_style_set_cell_padding    (AdgTableStyle *table_style,
                                                         const AdgPair *padding);
void                adg_table_style_set_cell_spacing    (AdgTableStyle *table_style,
                                                         const AdgPair *spacing);
void                adg_table_style_set_color_dress     (AdgTableStyle *table_style,
                                                         AdgDress dress);
void                adg_table_style_set_frame_dress     (AdgTableStyle *table_style,
                                                         AdgDress dress);
void                adg_table_style_set_grid_dress      (AdgTableStyle *table_style,
                                                         AdgDress dress);
void                adg_table_style_set_row_height      (AdgTableStyle *table_style,
                                                         gdouble height);
void                adg_table_style_set_title_dress     (AdgTableStyle *table_style,
                                                         AdgDress dress);
void                adg_table_style_set_value_dress     (AdgTableStyle *table_style,
                                                         AdgDress dress);

Object Hierarchy

  GObject
   +----AdgStyle
         +----AdgTableStyle

Properties

  "cell-padding"             AdgPair*              : Read / Write
  "cell-spacing"             AdgPair*              : Read / Write
  "color-dress"              AdgDress              : Read / Write
  "frame-dress"              AdgDress              : Read / Write
  "grid-dress"               AdgDress              : Read / Write
  "row-height"               gdouble               : Read / Write
  "title-dress"              AdgDress              : Read / Write
  "value-dress"              AdgDress              : Read / Write

Description

Contains parameters on how to build tables such as the lines to use for frames and grids and the font dresses for titles or values.

Details

struct AdgTableStyle

struct AdgTableStyle;

All fields are private and should not be used directly. Use its public methods instead.

Since 1.0


struct AdgTableStyleClass

struct AdgTableStyleClass {
};

adg_table_style_get_cell_padding ()

const AdgPair *     adg_table_style_get_cell_padding    (AdgTableStyle *table_style);

Gets the padding values in x and y to be left clear inside the cells. The returned pointer refers to an internal allocated struct and must not be modified or freed.

The cell padding is a symmetric value, that is the padding on the left will always be equal to the padding on the right and the top will always be equal to the bottom.

table_style :

an AdgTableStyle object

Returns :

the cell padding values or NULL on errors. [transfer none]

Since 1.0


adg_table_style_get_cell_spacing ()

const AdgPair *     adg_table_style_get_cell_spacing    (AdgTableStyle *table_style);

Gets the spacing values in x and y to be left between the cell boundary boxes. The returned pointer refers to an internal allocated struct and must not be modified or freed.

The cell spacing is a symmetric value, that is the spacing on the left will always be equal to the spacing on the right and the top will always be equal to the bottom.

table_style :

an AdgTableStyle object

Returns :

the cell spacing values or NULL on errors. [transfer none]

Since 1.0


adg_table_style_get_color_dress ()

AdgDress            adg_table_style_get_color_dress     (AdgTableStyle *table_style);

Gets the table_style color dress to be used. This dress should be intended as a fallback color as it could be overriden by more specific dresses, such as a color explicitely specified on the "value-dress".

table_style :

an AdgTableStyle object

Returns :

the color dress. [transfer none]

Since 1.0


adg_table_style_get_frame_dress ()

AdgDress            adg_table_style_get_frame_dress     (AdgTableStyle *table_style);

Gets the line dress to be used for rendering the frames with table_style.

table_style :

an AdgTableStyle object

Returns :

the line dress. [transfer none]

Since 1.0


adg_table_style_get_grid_dress ()

AdgDress            adg_table_style_get_grid_dress      (AdgTableStyle *table_style);

Gets the line dress to be used for rendering the grids with table_style.

table_style :

an AdgTableStyle object

Returns :

the line dress. [transfer none]

Since 1.0


adg_table_style_get_row_height ()

gdouble             adg_table_style_get_row_height      (AdgTableStyle *table_style);

Gets the row height fallback value.

table_style :

an AdgTableStyle object

Returns :

the fallback row height or 0 on errors.

Since 1.0


adg_table_style_get_title_dress ()

AdgDress            adg_table_style_get_title_dress     (AdgTableStyle *table_style);

Gets the font dress to be used for rendering cell titles with table_style.

table_style :

an AdgTableStyle object

Returns :

the font dress. [transfer none]

Since 1.0


adg_table_style_get_value_dress ()

AdgDress            adg_table_style_get_value_dress     (AdgTableStyle *table_style);

Gets the font dress to be used for rendering cell values with table_style.

table_style :

an AdgTableStyle object

Returns :

the font dress. [transfer none]

Since 1.0


adg_table_style_new ()

AdgTableStyle *     adg_table_style_new                 (void);

Constructs a new empty table style initialized with default params.

Returns :

a new table style. [transfer full]

Since 1.0


adg_table_style_set_cell_padding ()

void                adg_table_style_set_cell_padding    (AdgTableStyle *table_style,
                                                         const AdgPair *padding);

Sets new "cell-padding" values.

table_style :

an AdgTableStyle object

padding :

the new padding values

Since 1.0


adg_table_style_set_cell_spacing ()

void                adg_table_style_set_cell_spacing    (AdgTableStyle *table_style,
                                                         const AdgPair *spacing);

Sets new "cell-spacing" values.

table_style :

an AdgTableStyle object

spacing :

the new spacing values

Since 1.0


adg_table_style_set_color_dress ()

void                adg_table_style_set_color_dress     (AdgTableStyle *table_style,
                                                         AdgDress dress);

Sets a new color dress on table_style.

table_style :

an AdgTableStyle object

dress :

the new color dress

Since 1.0


adg_table_style_set_frame_dress ()

void                adg_table_style_set_frame_dress     (AdgTableStyle *table_style,
                                                         AdgDress dress);

Sets a new line dress on table_style for rendering the frames.

table_style :

an AdgTableStyle object

dress :

the new line dress

Since 1.0


adg_table_style_set_grid_dress ()

void                adg_table_style_set_grid_dress      (AdgTableStyle *table_style,
                                                         AdgDress dress);

Sets a new line dress on table_style for rendering the grids.

table_style :

an AdgTableStyle object

dress :

the new line dress

Since 1.0


adg_table_style_set_row_height ()

void                adg_table_style_set_row_height      (AdgTableStyle *table_style,
                                                         gdouble height);

Sets a new "row-height" fallback. height must be a valid row height greather than 0 or a warning will be raised and this function will fail.

table_style :

an AdgTableStyle object

height :

the new row heigth fallback

Since 1.0


adg_table_style_set_title_dress ()

void                adg_table_style_set_title_dress     (AdgTableStyle *table_style,
                                                         AdgDress dress);

Sets a new font dress on table_style for rendering cell titles.

table_style :

an AdgTableStyle object

dress :

the new font dress

Since 1.0


adg_table_style_set_value_dress ()

void                adg_table_style_set_value_dress     (AdgTableStyle *table_style,
                                                         AdgDress dress);

Sets a new font dress on table_style for rendering cell values.

table_style :

an AdgTableStyle object

dress :

the new font dress

Since 1.0

Property Details

The "cell-padding" property

  "cell-padding"             AdgPair*              : Read / Write

How much space from the bounding box must left inside every cell.


The "cell-spacing" property

  "cell-spacing"             AdgPair*              : Read / Write

How much space to left between the cells.


The "color-dress" property

  "color-dress"              AdgDress              : Read / Write

Fallback color dress, used when no specific dresses are selected.

Allowed values: [G_MAXINT,G_MININT]

Default value: 0


The "frame-dress" property

  "frame-dress"              AdgDress              : Read / Write

Line dress to use while drawing the table frame.

Allowed values: [G_MAXINT,G_MININT]

Default value: 0


The "grid-dress" property

  "grid-dress"               AdgDress              : Read / Write

Line dress to use while rendering the grid of the table.

Allowed values: [G_MAXINT,G_MININT]

Default value: 0


The "row-height" property

  "row-height"               gdouble               : Read / Write

The fallback row height when not explicitely specified while creating a new row.

Allowed values: >= 0

Default value: 30


The "title-dress" property

  "title-dress"              AdgDress              : Read / Write

Font dress to use for titles.

Allowed values: [G_MAXINT,G_MININT]

Default value: 0


The "value-dress" property

  "value-dress"              AdgDress              : Read / Write

Font dress to use for values inside the cells.

Allowed values: [G_MAXINT,G_MININT]

Default value: 0