GogStyledObject

GogStyledObject — Base class for all styled objects of graph model

Synopsis


#include <goffice/graph/gog-styled-object.h>


                    GogStyledObject;
GogStyle*           gog_styled_object_get_style         (GogStyledObject *gso);
GogStyle*           gog_styled_object_get_auto_style    (GogStyledObject *gso);
gboolean            gog_styled_object_set_style         (GogStyledObject *gso,
                                                         GogStyle *style);
void                gog_styled_object_apply_theme       (GogStyledObject *gso,
                                                         GogStyle *style);
void                gog_styled_object_style_changed     (GogStyledObject *gso);


Object Hierarchy


  GObject
   +----GogObject
         +----GogStyledObject
               +----GogOutlinedObject
               +----GogAxisBase
               +----GogGrid
               +----GogGridLine
               +----GogSeries
               +----GogSeriesElement
               +----GogSeriesLines
               +----GogTrendLine

Properties


  "style"                    GogStyle              : Read / Write

Signals


  "style-changed"                                  : Run Last

Description

GogStyledObject provides a base class derived from GogObject, which adds style functionnalities used for drawing object on graph canvas.

Details

GogStyledObject

typedef struct _GogStyledObject GogStyledObject;


gog_styled_object_get_style ()

GogStyle*           gog_styled_object_get_style         (GogStyledObject *gso);

Simply an accessor function that returns gso->style, without referencing it.

gso : a GogStyledObject
Returns : the styled object's GogStyle

gog_styled_object_get_auto_style ()

GogStyle*           gog_styled_object_get_auto_style    (GogStyledObject *gso);

This function returns a new style that is initialized with the auto values for gso. Caller is responsible for the result.

gso : a GogStyledObject
Returns : a new GogStyle

gog_styled_object_set_style ()

gboolean            gog_styled_object_set_style         (GogStyledObject *gso,
                                                         GogStyle *style);

Sets a new style for gso, and emits "style-changed" signal. This function does not take ownership of style.

gso : a GogStyledObject
style : a GogStyle
Returns : TRUE if new style may lead to change of object size, which happens when changing font size for example.

gog_styled_object_apply_theme ()

void                gog_styled_object_apply_theme       (GogStyledObject *gso,
                                                         GogStyle *style);

Apply theme of gso's parent graph to style, i.e. properties with auto flag set to TRUE are changed to default theme value.

gso : a GogStyledObject
style : a GogStyle that will be themed

gog_styled_object_style_changed ()

void                gog_styled_object_style_changed     (GogStyledObject *gso);

Emits the "style-changed" signal.

gso : a GogStyledObject

Property Details

The "style" property

  "style"                    GogStyle              : Read / Write

A pointer to the GogStyle object.

Signal Details

The "style-changed" signal

void                user_function                      (GogStyledObject *gogstyledobject,
                                                        GObject         *arg1,
                                                        gpointer         user_data)            : Run Last

gogstyledobject : the object which received the signal.
arg1 :
user_data : user data set when the signal handler was connected.