Module: Gtk::Buildable
- Defined in:
- (unknown)
Overview
GtkBuildable allows objects to extend and customize their deserialization
from ui files.
The interface includes methods for setting names and properties of objects, parsing custom tags and constructing child objects.
The GtkBuildable interface is implemented by all widgets and
many of the non-widget objects that are provided by GTK. The
main user of this interface is [classGtk.Builder]. There should be
very little need for applications to call any of these functions directly.
An object only needs to implement this interface if it needs to extend the
GtkBuilder XML format or run any extra routines at deserialization time.
Instance Method Summary collapse
- #add_child(buildable, builder, child, type) ⇒ nil
-
#buildable_id ⇒ String
Gets the ID of the buildable object.
- #construct_child(buildable, builder, name) ⇒ GObject::Object
- #custom_finished(buildable, builder, child, tagname, data) ⇒ nil
- #custom_tag_end(buildable, builder, child, tagname, data) ⇒ nil
-
#custom_tag_start(buildable, builder, child, tagname, parser, data) ⇒ Boolean
True if an object has a custom implementation, false if it doesn't.
- #get_id(buildable) ⇒ String
-
#get_internal_child(buildable, builder, childname) ⇒ GObject::Object
The internal child of the buildable object.
-
#id ⇒ String
The getter corresponding to set_id.
-
#id=(id) ⇒ nil
Stores the id attribute given in the
GtkBuilderUI definition. - #parser_finished(buildable, builder) ⇒ nil
- #set_buildable_property(buildable, builder, name, value) ⇒ nil
- #set_id(buildable, id) ⇒ nil
Instance Method Details
#add_child(buildable, builder, child, type) ⇒ nil
#buildable_id ⇒ String
Gets the ID of the buildable object.
GtkBuilder sets the name based on the ID attribute
of the <object> tag used to construct the buildable.
#construct_child(buildable, builder, name) ⇒ GObject::Object
#custom_finished(buildable, builder, child, tagname, data) ⇒ nil
#custom_tag_end(buildable, builder, child, tagname, data) ⇒ nil
#custom_tag_start(buildable, builder, child, tagname, parser, data) ⇒ Boolean
Returns true if an object has a custom implementation, false if it doesn't.
#get_id(buildable) ⇒ String
#get_internal_child(buildable, builder, childname) ⇒ GObject::Object
Returns the internal child of the buildable object.
#id ⇒ String
The getter corresponding to set_id. Implement this if you implement set_id.
#id=(id) ⇒ nil
Stores the id attribute given in the GtkBuilder UI definition.
GtkWidget stores the name as object data. Implement this method if your
object has some notion of “ID” and it makes sense to map the XML id
attribute to it.