# Goocanvas::Style Class Reference

Inheritance diagram for Goocanvas::Style:
[legend]

List of all members.

## Public Member Functions
virtual | ~Style ()
GooCanvasStyle* | gobj ()
| Provides access to the underlying C GObject.
const GooCanvasStyle* | gobj () const
| Provides access to the underlying C GObject.
GooCanvasStyle* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
template<typename PropertyType >
void | get_property (GQuark property_id, PropertyType&value) const
template<typename PropertyType >
void | set_property (GQuark property_id, const PropertyType&value)
Glib::RefPtr< Style > | copy () const
| Copies the given Goo::CanvasStyle, by copying all of its properties.
Glib::RefPtr< Style > | get_parent () const
| Gets the parent of the style.
void | set_parent (const Glib::RefPtr< Style >& style)
| Sets the parent of the style.
bool | set_stroke_options (const Cairo::RefPtr< Cairo::Context >& context)
| Sets the standard cairo stroke options using the given style.
bool | set_fill_options (const Cairo::RefPtr< Cairo::Context >& context)
| Sets the standard cairo fill options using the given style.
## Static Public Member Functions
static Glib::RefPtr< Style > | create ()
## Protected Member Functions
| Style ()
## Related Functions
(Note that these are not member functions.)
Glib::RefPtr< Goocanvas::Style > | wrap (GooCanvasStyle* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Constructor & Destructor Documentation

virtual Goocanvas::Style::~Style | ( |  | ) | `[virtual]`

Goocanvas::Style::Style | ( |  | ) | `[protected]`

## Member Function Documentation

Glib::RefPtr<Style> Goocanvas::Style::copy | ( |  | ) | const

Copies the given Goo::CanvasStyle, by copying all of its properties.

Though the parent of the new style is left unset.

Returns:
  A copy of the given Goo::CanvasStyle.

static Glib::RefPtr<Style> Goocanvas::Style::create | ( |  | ) | `[static]`

Glib::RefPtr<Style> Goocanvas::Style::get_parent | ( |  | ) | const

Gets the parent of the style.

Returns:
  The parent of the given style, or `0`.

template <typename PropertyType >

void Goocanvas::Style::get_property | ( | GQuark | property_id,
|  | PropertyType & | value |
| ) |  |  | const`[inline]`

const GooCanvasStyle* Goocanvas::Style::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GObject.

Reimplemented from Glib::ObjectBase.

GooCanvasStyle* Goocanvas::Style::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GObject.

Reimplemented from Glib::ObjectBase.

GooCanvasStyle* Goocanvas::Style::gobj_copy | ( |  | ) |

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

bool Goocanvas::Style::set_fill_options | ( | const Cairo::RefPtr< Cairo::Context > & | context | ) |

Sets the standard cairo fill options using the given style.

Parameters:

  | cr | A cairo context.

Returns:
  `true` if a paint source is set, or `false` if the fill should be skipped.

void Goocanvas::Style::set_parent | ( | const Glib::RefPtr< Style >& | style | ) |

Sets the parent of the style.

Parameters:

  | parent | The new parent.

template <typename PropertyType >

void Goocanvas::Style::set_property | ( | GQuark | property_id,
|  | const PropertyType & | value |
| ) |  |  | `[inline]`

bool Goocanvas::Style::set_stroke_options | ( | const Cairo::RefPtr< Cairo::Context > & | context | ) |

Sets the standard cairo stroke options using the given style.

Parameters:

  | cr | A cairo context.

Returns:
  `true` if a paint source is set, or `false` if the stroke should be skipped.

## Friends And Related Function Documentation

Glib::RefPtr< Goocanvas::Style > wrap | ( | GooCanvasStyle * | object,
|  | bool | take_copy = `false` |
| ) |  |  | `[related]`

A Glib::wrap() method for this object.

Parameters:

  | object | The C instance.
  | take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns:
  A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file:

- goocanvasmm/style.h