GtkBuildableIface

The gtk.buildable_iface.BuildableIface interface contains methods that are necessary to allow gtk.builder.Builder to construct an object from a gtk.builder.Builder UI definition.

Members

Variables

addChild
void function(GtkBuildable* buildable, GtkBuilder* builder, ObjectC* child, const(char)* type) addChild;

Adds a child. The @type parameter can be used to differentiate the kind of child. gtk.widget.Widget implements this to add event controllers to the widget, gtk.notebook.Notebook uses the @type to distinguish between page labels (of type "page-label") and normal children.

constructChild
ObjectC* function(GtkBuildable* buildable, GtkBuilder* builder, const(char)* name) constructChild;

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

customFinished
void function(GtkBuildable* buildable, GtkBuilder* builder, ObjectC* child, const(char)* tagname, void* data) customFinished;

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

customTagEnd
void function(GtkBuildable* buildable, GtkBuilder* builder, ObjectC* child, const(char)* tagname, void* data) customTagEnd;

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

customTagStart
bool function(GtkBuildable* buildable, GtkBuilder* builder, ObjectC* child, const(char)* tagname, GtkBuildableParser* parser, void** data) customTagStart;

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.Widget implements this to parse accessible attributes specified in <accessibility> elements. Note that @user_data must be freed in @custom_tag_end or @custom_finished.

gIface
GTypeInterface gIface;

the parent class

getId
const(char)* function(GtkBuildable* buildable) getId;

The getter corresponding to @set_id. Implement this if you implement @set_id.

getInternalChild
ObjectC* function(GtkBuildable* buildable, GtkBuilder* builder, const(char)* childname) getInternalChild;

Returns an internal child of a buildable. gtk.dialog.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.

parserFinished
void function(GtkBuildable* buildable, GtkBuilder* builder) parserFinished;

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.Window sets the GtkWidget:visible property here.

setBuildableProperty
void function(GtkBuildable* buildable, GtkBuilder* builder, const(char)* name, const(GValue)* value) setBuildableProperty;

Sets a property of a buildable object. It is normally not necessary to implement this, gobject.object.ObjectG.setProperty is used by default. gtk.window.Window implements this to delay showing itself (i.e. setting the gtk.widget.Widget.gboolean property) until the whole interface is created.

setId
void function(GtkBuildable* buildable, const(char)* id) setId;

Stores the id attribute given in the gtk.builder.Builder UI definition. gtk.widget.Widget 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.