Gtk.Buildable¶
Methods¶
| add_child(builder, child, type) | |
| construct_child(builder, name) | |
| custom_finished(builder, child, tagname, data) | |
| custom_tag_end(builder, child, tagname, data) | |
| custom_tag_start(builder, child, tagname) | |
| get_internal_child(builder, childname) | |
| get_name() | |
| parser_finished(builder) | |
| set_buildable_property(builder, name, value) | |
| set_name(name) | 
Virtual Methods¶
| do_add_child(builder, child, type) | |
| do_construct_child(builder, name) | |
| do_custom_finished(builder, child, tagname, data) | |
| do_custom_tag_end(builder, child, tagname, data) | |
| do_custom_tag_start(builder, child, tagname) | |
| do_get_internal_child(builder, childname) | |
| do_get_name() | |
| do_parser_finished(builder) | |
| do_set_buildable_property(builder, name, value) | |
| do_set_name(name) | 
Properties¶
None
Signals¶
None
Fields¶
None
Class Details¶
- 
class Gtk.Buildable¶
- Bases: - GObject.GInterface- Structure: - Gtk.BuildableIface- Gtk.Buildableallows objects to extend and customize their deserialization from GtkBuilder UI descriptions. The interface includes methods for setting names and properties of objects, parsing custom tags and constructing child objects.- The - Gtk.Buildableinterface is implemented by all widgets and many of the non-widget objects that are provided by GTK+. The main user of this interface is- Gtk.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 - Gtk.Builderformat or run any extra routines at deserialization time.- 
add_child(builder, child, type)[source]¶
- Parameters: - builder (Gtk.Builder) – aGtk.Builder
- child (GObject.Object) – child to add
- type (strorNone) – kind of child orNone
 - Adds a child to self. type is an optional string describing how the child should be added. - New in version 2.12. 
- builder (
 - 
construct_child(builder, name)[source]¶
- Parameters: - builder (Gtk.Builder) –Gtk.Builderused to construct this object
- name (str) – name of child to construct
 - Returns: - the constructed child - Return type: - Constructs a child of self with the name name. - Gtk.Buildercalls this function if a “constructor” has been specified in the UI definition.- New in version 2.12. 
- builder (
 - 
custom_finished(builder, child, tagname, data)[source]¶
- Parameters: - builder (Gtk.Builder) – aGtk.Builder
- child (GObject.ObjectorNone) – child object orNonefor non-child tags
- tagname (str) – the name of the tag
- data (objectorNone) – user data created in custom_tag_start
 - This is similar to - Gtk.Buildable.parser_finished() but is called once for each custom tag handled by the self.- New in version 2.12. 
- builder (
 - 
custom_tag_end(builder, child, tagname, data)[source]¶
- Parameters: - builder (Gtk.Builder) –Gtk.Builderused to construct this object
- child (GObject.ObjectorNone) – child object orNonefor non-child tags
- tagname (str) – name of tag
- data (objectorNone) – user data that will be passed in to parser functions
 - This is called at the end of each custom element handled by the buildable. - New in version 2.12. 
- builder (
 - 
custom_tag_start(builder, child, tagname)[source]¶
- Parameters: - builder (Gtk.Builder) – aGtk.Builderused to construct this object
- child (GObject.ObjectorNone) – child object orNonefor non-child tags
- tagname (str) – name of tag
 - Returns: - Trueif a object has a custom implementation,- Falseif it doesn’t.- parser: - a - GLib.MarkupParserto fill in- data: - return location for user data that will be passed in to parser functions - Return type: - ( - bool, parser:- GLib.MarkupParser, data:- object)- This is called for each unknown element under <child>. - New in version 2.12. 
- builder (
 - 
get_internal_child(builder, childname)[source]¶
- Parameters: - builder (Gtk.Builder) – aGtk.Builder
- childname (str) – name of child
 - Returns: - the internal child of the buildable object - Return type: - Get the internal child called childname of the self object. - New in version 2.12. 
- builder (
 - 
get_name()[source]¶
- Returns: - the name set with - Gtk.Buildable.set_name()- Return type: - str- Gets the name of the self object. - Gtk.Buildersets the name based on the GtkBuilder UI definition used to construct the self.- New in version 2.12. 
 - 
parser_finished(builder)[source]¶
- Parameters: - builder ( - Gtk.Builder) – a- Gtk.Builder- Called when the builder finishes the parsing of a GtkBuilder UI definition. Note that this will be called once for each time - Gtk.Builder.add_from_file() or- Gtk.Builder.add_from_string() is called on a builder.- New in version 2.12. 
 - 
set_buildable_property(builder, name, value)[source]¶
- Parameters: - builder (Gtk.Builder) – aGtk.Builder
- name (str) – name of property
- value (GObject.Value) – value of property
 - Sets the property name name to value on the self object. - New in version 2.12. 
- builder (
 - 
set_name(name)[source]¶
- Parameters: - name ( - str) – name to set- Sets the name of the self object. - New in version 2.12. 
 - 
do_add_child(builder, child, type) virtual¶
- Parameters: - builder (Gtk.Builder) – aGtk.Builder
- child (GObject.Object) – child to add
- type (strorNone) – kind of child orNone
 - Adds a child to buildable. type is an optional string describing how the child should be added. - New in version 2.12. 
- builder (
 - 
do_construct_child(builder, name) virtual¶
- Parameters: - builder (Gtk.Builder) –Gtk.Builderused to construct this object
- name (str) – name of child to construct
 - Returns: - the constructed child - Return type: - Constructs a child of buildable with the name name. - Gtk.Buildercalls this function if a “constructor” has been specified in the UI definition.- New in version 2.12. 
- builder (
 - 
do_custom_finished(builder, child, tagname, data) virtual¶
- Parameters: - builder (Gtk.Builder) – aGtk.Builder
- child (GObject.ObjectorNone) – child object orNonefor non-child tags
- tagname (str) – the name of the tag
- data (objectorNone) – user data created in custom_tag_start
 - This is similar to - Gtk.Buildable.parser_finished() but is called once for each custom tag handled by the buildable.- New in version 2.12. 
- builder (
 - 
do_custom_tag_end(builder, child, tagname, data) virtual¶
- Parameters: - builder (Gtk.Builder) –Gtk.Builderused to construct this object
- child (GObject.ObjectorNone) – child object orNonefor non-child tags
- tagname (str) – name of tag
- data (objectorNone) – user data that will be passed in to parser functions
 - This is called at the end of each custom element handled by the buildable. - New in version 2.12. 
- builder (
 - 
do_custom_tag_start(builder, child, tagname) virtual¶
- Parameters: - builder (Gtk.Builder) – aGtk.Builderused to construct this object
- child (GObject.ObjectorNone) – child object orNonefor non-child tags
- tagname (str) – name of tag
 - Returns: - Trueif a object has a custom implementation,- Falseif it doesn’t.- parser: - a - GLib.MarkupParserto fill in- data: - return location for user data that will be passed in to parser functions - Return type: - ( - bool, parser:- GLib.MarkupParser, data:- object)- This is called for each unknown element under <child>. - New in version 2.12. 
- builder (
 - 
do_get_internal_child(builder, childname) virtual¶
- Parameters: - builder (Gtk.Builder) – aGtk.Builder
- childname (str) – name of child
 - Returns: - the internal child of the buildable object - Return type: - Get the internal child called childname of the buildable object. - New in version 2.12. 
- builder (
 - 
do_get_name() virtual¶
- Returns: - the name set with - Gtk.Buildable.set_name()- Return type: - str- Gets the name of the buildable object. - Gtk.Buildersets the name based on the GtkBuilder UI definition used to construct the buildable.- New in version 2.12. 
 - 
do_parser_finished(builder) virtual¶
- Parameters: - builder ( - Gtk.Builder) – a- Gtk.Builder- Called when the builder finishes the parsing of a GtkBuilder UI definition. Note that this will be called once for each time - Gtk.Builder.add_from_file() or- Gtk.Builder.add_from_string() is called on a builder.- New in version 2.12. 
 - 
do_set_buildable_property(builder, name, value) virtual¶
- Parameters: - builder (Gtk.Builder) – aGtk.Builder
- name (str) – name of property
- value (GObject.Value) – value of property
 - Sets the property name name to value on the buildable object. - New in version 2.12. 
- builder (
 
-