![]() |
![]() |
![]() |
Goffice Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Known Implementations |
#include <goffice/utils/go-styled-object.h> GOStyledObject; GOStyledObjectClass; GOStyle * go_styled_object_get_style (GOStyledObject *gso); GOStyle * go_styled_object_get_auto_style (GOStyledObject *gso); gboolean go_styled_object_set_style (GOStyledObject *gso, GOStyle *style); void go_styled_object_apply_theme (GOStyledObject *gso, GOStyle *style); void go_styled_object_style_changed (GOStyledObject *gso); GODoc * go_styled_object_get_document (GOStyledObject *gso); gboolean go_styled_object_set_cairo_fill (GOStyledObject const *so, cairo_t *cr); gboolean go_styled_object_set_cairo_line (GOStyledObject const *so, cairo_t *cr);
GOStyledObject is implemented by GocPolygon, GogAxisBase, GogOutlinedObject, GogSeriesLines, GogRegEqn, GogRegCurve, GogChart, GogAxis, GogTrendLine, GogLegend, GocPolyline, GocStyledItem, GogStyledObject, GocCircle, GocText, GocLine, GogLabel, GogGraph, GogGridLine, GogSeries, GocEllipse, GocRectangle, GogSmoothedCurve, GogText, GogAxisLine and GogGrid.
typedef struct { GTypeInterface base; gboolean (*set_style) (GOStyledObject *gso, GOStyle *style); GOStyle *(*get_style) (GOStyledObject *gso); GOStyle *(*get_auto_style) (GOStyledObject *gso); void (*style_changed) (GOStyledObject *gso); void (*apply_theme) (GOStyledObject *gso, GOStyle *style); GODoc *(*get_document) (GOStyledObject *gso); } GOStyledObjectClass;
GOStyle * go_styled_object_get_style (GOStyledObject *gso);
Simply an accessor function that returns gso->style
, without referencing it.
|
a GOStyledObject |
Returns : |
the styled object's GOStyle |
GOStyle * go_styled_object_get_auto_style (GOStyledObject *gso);
This function returns a new style that is initialized with the auto values for gso
.
Caller is responsible for the result.
|
a GOStyledObject |
Returns : |
a new GOStyle |
gboolean go_styled_object_set_style (GOStyledObject *gso, GOStyle *style);
Sets a new style for gso
, and emits "style-changed" signal. This function
does not take ownership of style
.
|
a GOStyledObject |
|
a GOStyle |
Returns : |
TRUE if new style may lead to change of object size, which
happens when changing font size for example.
|
void go_styled_object_apply_theme (GOStyledObject *gso, GOStyle *style);
Apply appropriate theme style
if meaningful, i.e. properties with
auto flag set to TRUE
should be changed to default theme value.
|
a GOStyledObject |
|
a GOStyle that will be themed |
void go_styled_object_style_changed (GOStyledObject *gso);
Called when the style changed. Might emit a signal if meaningful.
|
a GOStyledObject |
GODoc * go_styled_object_get_document (GOStyledObject *gso);
|
|
Returns : |
gboolean go_styled_object_set_cairo_fill (GOStyledObject const *so, cairo_t *cr);
|
|
|
|
Returns : |
gboolean go_styled_object_set_cairo_line (GOStyledObject const *so, cairo_t *cr);
|
|
|
|
Returns : |