Libraries:Gtk:Glade:Global
Functions
EnumFromString(type @ Gtk.GObject.Type.T, string @ Std.String.T) : Std.Integer.SmallT
FlagsFromString(type @ Gtk.GObject.Type.T, string @ Std.String.T) : Std.Integer.SmallT
This helper routine is designed to be used by widget build routines to convert the string representations of flags values found in the XML descriptions to the integer values that can be used to configure the widget. The string is composed of string names or nicknames for various flags separated by '|'.
type | the GType for this flags type. |
string | the string representation of the flags value. |
Returns | the integer value for this flags string |
GetWidgetName(widget @ Gtk.Gtk.Widget.T) : Std.String.T
Used to get the name of a widget that was generated by a GladeXML object.
widget | the widget |
Returns | the name of the widget. |
GetWidgetTree(widget @ Gtk.Gtk.Widget.T) : Gtk.Glade.XML.T
This function is used to get the GladeXML object that built this widget.
widget | the widget |
Returns | the GladeXML object that built this widget. |
ModuleCheckVersion(version @ Std.Integer.SmallT) : Std.String.T
RegisterCustomProp(type @ Gtk.GObject.Type.T, prop_name @ Std.String.T, apply_prop @ Std.Function.T) : Std.Object.T
Some properties are not (yet) handled through the GObject property code, so can not be handled by the generic code. This function provides a way to register handlers for these properties. Such handlers will apply for the GType type and all its descendants.
type | the GType of the widget. |
prop_name | the name for the custom widget. |
apply_prop | the function to be called when the custom property is found. |
RegisterWidget(type @ Gtk.GObject.Type.T, new_func @ Std.Function.T, build_children @ Std.Function.T, find_internal_child @ Std.Function.T) : Std.Object.T
This function is used to register new construction functions for a widget type. The child building routine would call Gtk.Glade.XML.BuildWidget on each child node to create the child before packing it.
This function is mainly useful for addon widget modules for libglade (it would get called from the glade_init_module() function).
type | the GType of the widget. |
new_func | the function used to construct instances of the widget. |
build_children | function used to construct children (or NULL). |
find_internal_child | function to find internal children (or NULL). |
SetCustomHandler(handler @ Std.Function.T, user_data @ Std.Object.T) : Std.Object.T
Calling this function allows you to override the default behaviour when a Custom widget is found in an interface. This could be used by a language binding to call some other function, or to limit what functions can be called to create custom widgets.
handler | the custom widget handler |
user_data | user data passed to the custom handler |
This helper routine is designed to be used by widget build routines to convert the string representations of enumeration values found in the XML descriptions to the integer values that can be used to configure the widget.