## GogStyledObject

GogStyledObject — Base class for all styled objects of graph model

## Synopsis

                        GogStyledObject;
    #define             GOG_STYLED_OBJECT_TYPE
    #define             GOG_STYLED_OBJECT                   (o)
    #define             IS_GOG_STYLED_OBJECT                (o)
    #define             GOG_STYLED_OBJECT_GET_CLASS         (o)
    GType               gog_styled_object_get_type          (void);
    gboolean            gog_styled_object_set_style         (GogStyledObject *gso,
                                                             GogStyle *style);
    GogStyle*           gog_styled_object_get_style         (GogStyledObject *gso);
    GogStyle*           gog_styled_object_get_auto_style    (GogStyledObject *gso);
    void                gog_styled_object_style_changed     (GogStyledObject *gso);
    void                gog_styled_object_apply_theme       (GogStyledObject *gso,
                                                             GogStyle *style);

## Object Hierarchy

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

## 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_TYPE

    #define GOG_STYLED_OBJECT_TYPE	(gog_styled_object_get_type ())

### GOG_STYLED_OBJECT()

    #define GOG_STYLED_OBJECT(o)	(G_TYPE_CHECK_INSTANCE_CAST ((o), GOG_STYLED_OBJECT_TYPE, GogStyledObject))

`o` : |

### IS_GOG_STYLED_OBJECT()

    #define IS_GOG_STYLED_OBJECT(o)	(G_TYPE_CHECK_INSTANCE_TYPE ((o), GOG_STYLED_OBJECT_TYPE))

`o` : |

### GOG_STYLED_OBJECT_GET_CLASS()

    #define GOG_STYLED_OBJECT_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), GOG_STYLED_OBJECT_TYPE, GogStyledObjectClass))

`o` : |

### gog_styled_object_get_type ()

    GType               gog_styled_object_get_type          (void);

Returns : |

### 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_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_style_changed ()

    void                gog_styled_object_style_changed     (GogStyledObject *gso);

Emits the "style-changed" signal.

`gso` : | a GogStyledObject

### 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

## 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.