Interface

Gtk-4.0GtkBuildableInterface

Interface for implementing Buildable. Contains only the virtual methods that need to be implemented.

interface Interface {
    vfunc_add_child(
        builder: Gtk.Builder,
        child: GObject.Object,
        type?: string,
    ): void;
    vfunc_custom_finished(
        builder: Gtk.Builder,
        child: GObject.Object,
        tagname: string,
        data?: any,
    ): void;
    vfunc_custom_tag_end(
        builder: Gtk.Builder,
        child: GObject.Object,
        tagname: string,
        data?: any,
    ): void;
    vfunc_custom_tag_start(
        builder: Gtk.Builder,
        child: GObject.Object,
        tagname: string,
    ): [boolean, BuildableParser, any];
    vfunc_get_id(): string;
    vfunc_get_internal_child<T = GObject.Object>(
        builder: Gtk.Builder,
        childname: string,
    ): T;
    vfunc_parser_finished(builder: Gtk.Builder): void;
    vfunc_set_buildable_property(
        builder: Gtk.Builder,
        name: string,
        value: any,
    ): void;
    vfunc_set_id(id: string): void;
}

Hierarchy (View Summary)

Index

Methods

  • Similar to gtk_buildable_parser_finished() but is called once for each custom tag handled by the buildable.

    Parameters

    • builder: Gtk.Builder
    • child: GObject.Object

      child object or null for non-child tags

    • tagname: string

      the name of the tag

    • Optionaldata: any

      user data created in custom_tag_start

    Returns void

  • Called at the end of each custom element handled by the buildable.

    Parameters

    • builder: Gtk.Builder

      Gtk.Builder used to construct this object

    • child: GObject.Object

      child object or null for non-child tags

    • tagname: string

      name of tag

    • Optionaldata: any

      user data that will be passed in to parser functions

    Returns void

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

    Returns string

  • Sets a property of a buildable object. It is normally not necessary to implement this, g_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.

    Parameters

    Returns void

  • Stores the id 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 “ID” and it makes sense to map the XML id attribute to it.

    Parameters

    • id: string

    Returns void