# Gtk::WidgetPath Class Reference

This represents a widget hierarchy from the topmost widget, typically a toplevel, to any child. More...

List of all members.

## Public Member Functions

| WidgetPath ()
| WidgetPath (GtkWidgetPath* gobject, bool make_a_copy=true)
| WidgetPath (const WidgetPath& other)
WidgetPath& | operator= (const WidgetPath& other)
| ~WidgetPath ()
void | swap (WidgetPath& other)
GtkWidgetPath* | gobj ()
| Provides access to the underlying C instance.
const GtkWidgetPath* | gobj () const
| Provides access to the underlying C instance.
GtkWidgetPath* | gobj_copy () const
| Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
int | path_length () const
int | path_append_type (GType type)
void | prepend_type (GType type)
GType | iter_get_object_type (int pos) const
void | iter_set_object_type (int pos, GType type)
Glib::ustring | iter_get_name (int pos) const
void | iter_set_name (int pos, const Glib::ustring& name)
bool | iter_has_name (int pos, const Glib::ustring& name) const
void | iter_add_class (int pos, const Glib::ustring& name)
void | iter_remove_class (int pos, const Glib::ustring& name)
void | iter_clear_classes (int pos)
bool | iter_has_class (int pos, const Glib::ustring& name) const
void | iter_add_region (int pos, const Glib::ustring& name, RegionFlags flags)
void | iter_remove_region (int pos, const Glib::ustring& name)
void | iter_clear_regions (int pos)
bool | iter_has_region (int pos, const Glib::ustring& name, RegionFlags& flags) const
GType | get_object_type () const
bool | is_type (GType type) const
bool | has_parent (GType type) const

## Protected Attributes

GtkWidgetPath* | gobject_

## Related Functions

(Note that these are not member functions.)
void | swap (WidgetPath& lhs, WidgetPath& rhs)
Gtk::WidgetPath | wrap (GtkWidgetPath* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Detailed Description

This represents a widget hierarchy from the topmost widget, typically a toplevel, to any child.

This widget path abstraction is used in StyleContext on behalf of the real widget in order to query style information.

If you are using gtkmm widgets, you probably will not need to use this API directly, as there is Widget::get_path(), and the style context returned by Widget::get_style_context() will be automatically updated on widget hierarchy changes.

Since gtkmm 3.0:

## Constructor & Destructor Documentation

Gtk::WidgetPath::WidgetPath | ( |  | ) |

Gtk::WidgetPath::WidgetPath | ( | GtkWidgetPath * | gobject,
|  | bool | make_a_copy = `true`
| ) |  | `[explicit]`

Gtk::WidgetPath::WidgetPath | ( | const WidgetPath& | other | ) |

Gtk::WidgetPath::~WidgetPath | ( |  | ) |

## Member Function Documentation

GType Gtk::WidgetPath::get_object_type | ( |  | ) | const

GtkWidgetPath* Gtk::WidgetPath::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C instance.

const GtkWidgetPath* Gtk::WidgetPath::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C instance.

GtkWidgetPath* Gtk::WidgetPath::gobj_copy | ( |  | ) | const

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

bool Gtk::WidgetPath::has_parent | ( | GType | type | ) | const

bool Gtk::WidgetPath::is_type | ( | GType | type | ) | const

void Gtk::WidgetPath::iter_add_class | ( | int | pos,
|  | const Glib::ustring & | name
| ) |  |

void Gtk::WidgetPath::iter_add_region | ( | int | pos,
|  | const Glib::ustring & | name,
|  | RegionFlags | flags
| ) |  |

void Gtk::WidgetPath::iter_clear_classes | ( | int | pos | ) |

void Gtk::WidgetPath::iter_clear_regions | ( | int | pos | ) |

Glib::ustring Gtk::WidgetPath::iter_get_name | ( | int | pos | ) | const

GType Gtk::WidgetPath::iter_get_object_type | ( | int | pos | ) | const

bool Gtk::WidgetPath::iter_has_class | ( | int | pos,
|  | const Glib::ustring & | name
| ) |  | const

bool Gtk::WidgetPath::iter_has_name | ( | int | pos,
|  | const Glib::ustring & | name
| ) |  | const

bool Gtk::WidgetPath::iter_has_region | ( | int | pos,
|  | const Glib::ustring & | name,
|  | RegionFlags& | flags
| ) |  | const

void Gtk::WidgetPath::iter_remove_class | ( | int | pos,
|  | const Glib::ustring & | name
| ) |  |

void Gtk::WidgetPath::iter_remove_region | ( | int | pos,
|  | const Glib::ustring & | name
| ) |  |

void Gtk::WidgetPath::iter_set_name | ( | int | pos,
|  | const Glib::ustring & | name
| ) |  |

void Gtk::WidgetPath::iter_set_object_type | ( | int | pos,
|  | GType | type
| ) |  |

WidgetPath& Gtk::WidgetPath::operator= | ( | const WidgetPath& | other | ) |

int Gtk::WidgetPath::path_append_type | ( | GType | type | ) |

int Gtk::WidgetPath::path_length | ( |  | ) | const

void Gtk::WidgetPath::prepend_type | ( | GType | type | ) |

void Gtk::WidgetPath::swap | ( | WidgetPath& | other | ) |

## Friends And Related Function Documentation

void swap | ( | WidgetPath& | lhs,
|  | WidgetPath& | rhs
| ) |  | `[related]`

Parameters:

  lhs | The left-hand side
  rhs | The right-hand side

Gtk::WidgetPath wrap | ( | GtkWidgetPath * | 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.

## Member Data Documentation

GtkWidgetPath* Gtk::WidgetPath::gobject_ `[protected]`

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

- gtkmm/widgetpath.h