:right-sidebar: True Buildable =================================================================== .. currentmodule:: gi.repository.Gtk .. class:: Buildable(*args, **kwargs) :no-contents-entry: Implementations: :class:`~gi.repository.Gtk.AboutDialog`, :class:`~gi.repository.Gtk.ActionBar`, :class:`~gi.repository.Gtk.AnyFilter`, :class:`~gi.repository.Gtk.AppChooserButton`, :class:`~gi.repository.Gtk.AppChooserDialog`, :class:`~gi.repository.Gtk.AppChooserWidget`, :class:`~gi.repository.Gtk.ApplicationWindow`, :class:`~gi.repository.Gtk.AspectFrame`, :class:`~gi.repository.Gtk.Assistant`, :class:`~gi.repository.Gtk.Box`, :class:`~gi.repository.Gtk.Button`, :class:`~gi.repository.Gtk.Calendar`, :class:`~gi.repository.Gtk.CellArea`, :class:`~gi.repository.Gtk.CellAreaBox`, :class:`~gi.repository.Gtk.CellView`, :class:`~gi.repository.Gtk.CenterBox`, :class:`~gi.repository.Gtk.CheckButton`, :class:`~gi.repository.Gtk.ColorButton`, :class:`~gi.repository.Gtk.ColorChooserDialog`, :class:`~gi.repository.Gtk.ColorChooserWidget`, :class:`~gi.repository.Gtk.ColorDialogButton`, :class:`~gi.repository.Gtk.ColumnView`, :class:`~gi.repository.Gtk.ComboBox`, :class:`~gi.repository.Gtk.ComboBoxText`, :class:`~gi.repository.Gtk.ConstraintLayout`, :class:`~gi.repository.Gtk.Dialog`, :class:`~gi.repository.Gtk.DragIcon`, :class:`~gi.repository.Gtk.DrawingArea`, :class:`~gi.repository.Gtk.DropDown`, :class:`~gi.repository.Gtk.EditableLabel`, :class:`~gi.repository.Gtk.EmojiChooser`, :class:`~gi.repository.Gtk.Entry`, :class:`~gi.repository.Gtk.EntryCompletion`, :class:`~gi.repository.Gtk.EveryFilter`, :class:`~gi.repository.Gtk.Expander`, :class:`~gi.repository.Gtk.FileChooserDialog`, :class:`~gi.repository.Gtk.FileChooserWidget`, :class:`~gi.repository.Gtk.FileFilter`, :class:`~gi.repository.Gtk.Fixed`, :class:`~gi.repository.Gtk.FlowBox`, :class:`~gi.repository.Gtk.FlowBoxChild`, :class:`~gi.repository.Gtk.FontButton`, :class:`~gi.repository.Gtk.FontChooserDialog`, :class:`~gi.repository.Gtk.FontChooserWidget`, :class:`~gi.repository.Gtk.FontDialogButton`, :class:`~gi.repository.Gtk.Frame`, :class:`~gi.repository.Gtk.GLArea`, :class:`~gi.repository.Gtk.GraphicsOffload`, :class:`~gi.repository.Gtk.Grid`, :class:`~gi.repository.Gtk.GridView`, :class:`~gi.repository.Gtk.HeaderBar`, :class:`~gi.repository.Gtk.IconView`, :class:`~gi.repository.Gtk.Image`, :class:`~gi.repository.Gtk.InfoBar`, :class:`~gi.repository.Gtk.Inscription`, :class:`~gi.repository.Gtk.Label`, :class:`~gi.repository.Gtk.LevelBar`, :class:`~gi.repository.Gtk.LinkButton`, :class:`~gi.repository.Gtk.ListBase`, :class:`~gi.repository.Gtk.ListBox`, :class:`~gi.repository.Gtk.ListBoxRow`, :class:`~gi.repository.Gtk.ListStore`, :class:`~gi.repository.Gtk.ListView`, :class:`~gi.repository.Gtk.LockButton`, :class:`~gi.repository.Gtk.MediaControls`, :class:`~gi.repository.Gtk.MenuButton`, :class:`~gi.repository.Gtk.MessageDialog`, :class:`~gi.repository.Gtk.MultiFilter`, :class:`~gi.repository.Gtk.MultiSorter`, :class:`~gi.repository.Gtk.Notebook`, :class:`~gi.repository.Gtk.Overlay`, :class:`~gi.repository.Gtk.PageSetupUnixDialog`, :class:`~gi.repository.Gtk.Paned`, :class:`~gi.repository.Gtk.PasswordEntry`, :class:`~gi.repository.Gtk.Picture`, :class:`~gi.repository.Gtk.Popover`, :class:`~gi.repository.Gtk.PopoverMenu`, :class:`~gi.repository.Gtk.PopoverMenuBar`, :class:`~gi.repository.Gtk.PrintUnixDialog`, :class:`~gi.repository.Gtk.ProgressBar`, :class:`~gi.repository.Gtk.Range`, :class:`~gi.repository.Gtk.Revealer`, :class:`~gi.repository.Gtk.Scale`, :class:`~gi.repository.Gtk.ScaleButton`, :class:`~gi.repository.Gtk.Scrollbar`, :class:`~gi.repository.Gtk.ScrolledWindow`, :class:`~gi.repository.Gtk.SearchBar`, :class:`~gi.repository.Gtk.SearchEntry`, :class:`~gi.repository.Gtk.Separator`, :class:`~gi.repository.Gtk.ShortcutController`, :class:`~gi.repository.Gtk.ShortcutLabel`, :class:`~gi.repository.Gtk.ShortcutsGroup`, :class:`~gi.repository.Gtk.ShortcutsSection`, :class:`~gi.repository.Gtk.ShortcutsShortcut`, :class:`~gi.repository.Gtk.ShortcutsWindow`, :class:`~gi.repository.Gtk.SizeGroup`, :class:`~gi.repository.Gtk.SpinButton`, :class:`~gi.repository.Gtk.Spinner`, :class:`~gi.repository.Gtk.Stack`, :class:`~gi.repository.Gtk.StackSidebar`, :class:`~gi.repository.Gtk.StackSwitcher`, :class:`~gi.repository.Gtk.Statusbar`, :class:`~gi.repository.Gtk.StringList`, :class:`~gi.repository.Gtk.Switch`, :class:`~gi.repository.Gtk.Text`, :class:`~gi.repository.Gtk.TextTagTable`, :class:`~gi.repository.Gtk.TextView`, :class:`~gi.repository.Gtk.ToggleButton`, :class:`~gi.repository.Gtk.TreeExpander`, :class:`~gi.repository.Gtk.TreeStore`, :class:`~gi.repository.Gtk.TreeView`, :class:`~gi.repository.Gtk.TreeViewColumn`, :class:`~gi.repository.Gtk.Video`, :class:`~gi.repository.Gtk.Viewport`, :class:`~gi.repository.Gtk.VolumeButton`, :class:`~gi.repository.Gtk.Widget`, :class:`~gi.repository.Gtk.Window`, :class:`~gi.repository.Gtk.WindowControls`, :class:`~gi.repository.Gtk.WindowHandle` ``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 :obj:`~gi.repository.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 ``GtkBuilder`` XML format or run any extra routines at deserialization time. Methods ------- .. rst-class:: interim-class .. class:: Buildable :no-index: .. method:: get_buildable_id() -> str | None Gets the ID of the ``buildable`` object. ``GtkBuilder`` sets the name based on the ID attribute of the ```` tag used to construct the ``buildable``. Virtual Methods --------------- .. rst-class:: interim-class .. class:: Buildable :no-index: .. method:: do_add_child(builder: ~gi.repository.Gtk.Builder, child: ~gi.repository.GObject.Object, type: str | None = None) -> None Adds a child to ``buildable``. ``type`` is an optional string describing how the child should be added. :param builder: a ``GtkBuilder`` :param child: child to add :param type: kind of child or :const:`None` .. method:: do_custom_finished(builder: ~gi.repository.Gtk.Builder, child: ~gi.repository.GObject.Object | None, tagname: str, data: None) -> None Similar to gtk_buildable_parser_finished() but is called once for each custom tag handled by the ``buildable``. :param builder: a ``GtkBuilder`` :param child: child object or :const:`None` for non-child tags :param tagname: the name of the tag :param data: user data created in custom_tag_start .. method:: do_custom_tag_end(builder: ~gi.repository.Gtk.Builder, child: ~gi.repository.GObject.Object | None, tagname: str, data: None) -> None Called at the end of each custom element handled by the buildable. :param builder: ``GtkBuilder`` used to construct this object :param child: child object or :const:`None` for non-child tags :param tagname: name of tag :param data: user data that will be passed in to parser functions .. method:: do_custom_tag_start(builder: ~gi.repository.Gtk.Builder, child: ~gi.repository.GObject.Object | None, tagname: str) -> tuple[bool, ~gi.repository.Gtk.BuildableParser, None] Called for each unknown element under ````. :param builder: a ``GtkBuilder`` used to construct this object :param child: child object or :const:`None` for non-child tags :param tagname: name of tag .. method:: do_get_id() -> str The getter corresponding to ``set_id``. Implement this if you implement ``set_id``. .. method:: do_get_internal_child(builder: ~gi.repository.Gtk.Builder, childname: str) -> ~gi.repository.GObject.Object Retrieves the internal child called ``childname`` of the ``buildable`` object. :param builder: a ``GtkBuilder`` :param childname: name of child .. method:: do_parser_finished(builder: ~gi.repository.Gtk.Builder) -> None 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. ``GtkWindow`` sets the ``GtkWidget:visible`` property here. :param builder: .. method:: do_set_buildable_property(builder: ~gi.repository.Gtk.Builder, name: str, value: ~typing.Any) -> None Sets a property of a buildable object. It is normally not necessary to implement this, :func:`~gi.repository.GObject.GObject.Object.set_property` is used by default. ``GtkWindow`` implements this to delay showing itself (i.e. setting the :obj:`~gi.repository.Gtk.Widget.props.visible` property) until the whole interface is created. :param builder: :param name: :param value: .. method:: do_set_id(id: str) -> None 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. :param id: