Back to Seed Clases

Gtk


Classes

Interfaces

Structs

Unions

Enums

Struct Gtk.WidgetPath

Import line: Gtk = imports.gi.Gtk;
GIR File: Gtk-3.0.gir
C documentation: GtkWidgetPath
Struct : WidgetPath
GtkWidgetPath is a boxed type that represents a widget hierarchy from
the topmost widget, typically a toplevel, to any child. This widget
path abstraction is used in GtkStyleContext on behalf of the real
widget in order to query style information.
If you are using GTK+ widgets, you probably will not need to use
this API directly, as there is gtk_widget_get_path(), and the style
context returned by gtk_widget_get_style_context() will be automatically
updated on widget hierarchy changes.
The widget path generation is generally simple:

Defining a button within a window

{
GtkWidgetPath *path;
path = gtk_widget_path_new ();
gtk_widget_path_append_type (path, GTK_TYPE_WINDOW);
gtk_widget_path_append_type (path, GTK_TYPE_BUTTON);
}


Although more complex information, such as widget names, or
different classes (property that may be used by other widget
types) and intermediate regions may be included:

Defining the first tab widget in a notebook

{
GtkWidgetPath *path;
guint pos;
path = gtk_widget_path_new ();
pos = gtk_widget_path_append_type (path, GTK_TYPE_NOTEBOOK);
gtk_widget_path_iter_add_region (path, pos, "tab", GTK_REGION_EVEN | GTK_REGION_FIRST);
pos = gtk_widget_path_append_type (path, GTK_TYPE_LABEL);
gtk_widget_path_iter_set_name (path, pos, "first tab label");
}


All this information will be used to match the style information
that applies to the described widget.
Properties
None
Methods / Constructors
Method / Constructor Defined By
 
new Gtk.WidgetPath.c_new () : Gtk.WidgetPath
Create a new Gtk.WidgetPath
Create a new Gtk.WidgetPath
Returns:
Gtk.WidgetPath A newly created, empty, GtkWidgetPath
 
Events
None
Used by These Methods / Signals / Properties
Class / Namespace Method / Signal / Properties
Gtk.Container
Method
get_path_for_child (Widget child) : Gtk.WidgetPath
Returns a newly created widget path representing all the widget hierarchy
from the toplevel down to child (this one not being included).
Gtk.StyleContext
Method
get_path () : Gtk.WidgetPath
Returns the widget path used for style matching.
Gtk.StyleContext
Method
set_path (WidgetPath path) : none
Sets the GtkWidgetPath used for style matching.
Gtk.StyleProvider
Method
get_icon_factory (WidgetPath path) : Gtk.IconFactory
Returns the GtkIconFactory defined to be in use for path, or NULL if none
is defined.
Gtk.StyleProvider
Method
get_style (WidgetPath path) : Gtk.StyleProperties
Returns the style settings affecting a widget defined by path, or NULL if
style settings affecting path
Gtk.StyleProvider
Method
get_style_property (WidgetPath path, StateFlags state, ParamSpec pspec, Object out_values) : gboolean
Looks up a widget style property as defined by provider for
the widget represented by path.
Gtk.ThemingEngine
Method
get_path () : Gtk.WidgetPath
Returns the widget path used for style matching.
Gtk.Widget
Method
get_path () : Gtk.WidgetPath
Returns the GtkWidgetPath representing widget, if the widget
is not connected to a toplevel widget, a partial path will be
created.
Documentation generated by Introspection Doc Generator Loosely Based on JsDoc Toolkit on Sat Apr 16 2011 17:15:37 GMT+0800 (HKT)