Gtk.BuildableIface

Fields

Name

Type

Access

Description

add_child

object

r

Adds a child. The type parameter can be used to differentiate the kind of child. Gtk.Container implements this to add add a child widget to the container, Gtk.Notebook uses the type to distinguish between page labels (of type “page-label”) and normal children.

construct_child

object

r

Constructs a child of a buildable that has been specified as “constructor” in the UI definition. Gtk.UIManager implements this to reference to a widget created in a <ui> tag which is outside of the normal Gtk.Builder UI definition hierarchy. A reference to the constructed object is returned and becomes owned by the caller.

custom_finished

object

r

Called for each custom tag handled by the buildable when the builder finishes parsing (see custom_tag_start)

custom_tag_end

object

r

Called for the end tag of each custom element that is handled by the buildable (see custom_tag_start).

custom_tag_start

object

r

Implement this if the buildable needs to parse content below <child>. To handle an element, the implementation must fill in the parser and user_data and return True. Gtk.Widget implements this to parse keyboard accelerators specified in <accelerator> elements. Gtk.Container implements it to map properties defined via <packing> elements to child properties. Note that user_data must be freed in custom_tag_end or custom_finished.

g_iface

GObject.TypeInterface

r

the parent class

get_internal_child

object

r

Returns an internal child of a buildable. Gtk.Dialog implements this to give access to its vbox, making it possible to add children to the vbox in a UI definition. Implement this if the buildable has internal children that may need to be accessed from a UI definition.

get_name

object

r

The getter corresponding to set_name. Implement this if you implement set_name.

parser_finished

object

r

Called when a builder finishes the parsing of a UI definition. It is normally not necessary to implement this, unless you need to perform special cleanup actions. Gtk.Window sets the Gtk.Widget :visible property here.

set_buildable_property

object

r

Sets a property of a buildable object. It is normally not necessary to implement this, GObject.Object.set_property() is used by default. Gtk.Window implements this to delay showing itself (i.e. setting the Gtk.Widget :visible property) until the whole interface is created.

set_name

object

r

Stores the name attribute given in the Gtk.Builder UI definition. Gtk.Widget stores the name as object data. Implement this method if your object has some notion of “name” and it makes sense to map the XML name attribute to it.

Methods

None

Details

class Gtk.BuildableIface

The Gtk.BuildableIface interface contains method that are necessary to allow Gtk.Builder to construct an object from a Gtk.Builder UI definition.