Buildable#

class Buildable(*args, **kwargs)#

Implementations: AboutDialog, ActionBar, AnyFilter, AppChooserButton, AppChooserDialog, AppChooserWidget, ApplicationWindow, AspectFrame, Assistant, Box, Button, Calendar, CellArea, CellAreaBox, CellView, CenterBox, CheckButton, ColorButton, ColorChooserDialog, ColorChooserWidget, ColorDialogButton, ColumnView, ComboBox, ComboBoxText, ConstraintLayout, Dialog, DragIcon, DrawingArea, DropDown, EditableLabel, EmojiChooser, Entry, EntryCompletion, EveryFilter, Expander, FileChooserDialog, FileChooserWidget, FileFilter, Fixed, FlowBox, FlowBoxChild, FontButton, FontChooserDialog, FontChooserWidget, FontDialogButton, Frame, GLArea, GraphicsOffload, Grid, GridView, HeaderBar, IconView, Image, InfoBar, Inscription, Label, LevelBar, LinkButton, ListBase, ListBox, ListBoxRow, ListStore, ListView, LockButton, MediaControls, MenuButton, MessageDialog, MultiFilter, MultiSorter, Notebook, Overlay, PageSetupUnixDialog, Paned, PasswordEntry, Picture, Popover, PopoverMenu, PopoverMenuBar, PrintUnixDialog, ProgressBar, Range, Revealer, Scale, ScaleButton, Scrollbar, ScrolledWindow, SearchBar, SearchEntry, Separator, ShortcutController, ShortcutLabel, ShortcutsGroup, ShortcutsSection, ShortcutsShortcut, ShortcutsWindow, SizeGroup, SpinButton, Spinner, Stack, StackSidebar, StackSwitcher, Statusbar, StringList, Switch, Text, TextTagTable, TextView, ToggleButton, TreeExpander, TreeStore, TreeView, TreeViewColumn, Video, Viewport, VolumeButton, Widget, Window, WindowControls, 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 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#

class Buildable
get_buildable_id() str | None#

Gets the ID of the buildable object.

GtkBuilder sets the name based on the ID attribute of the <object> tag used to construct the buildable.

Virtual Methods#

class Buildable
do_add_child(builder: Builder, child: Object, type: str | None = None) None#

The type of the None singleton.

Parameters:
  • builder – a GtkBuilder

  • child – child to add

  • type – kind of child or None

do_custom_finished(builder: Builder, child: Object | None, tagname: str, data: None) None#

The type of the None singleton.

Parameters:
  • builder – a GtkBuilder

  • child – child object or None for non-child tags

  • tagname – the name of the tag

  • data – user data created in custom_tag_start

do_custom_tag_end(builder: Builder, child: Object | None, tagname: str, data: None) None#

The type of the None singleton.

Parameters:
  • builderGtkBuilder used to construct this object

  • child – child object or None for non-child tags

  • tagname – name of tag

  • data – user data that will be passed in to parser functions

do_custom_tag_start(builder: Builder, child: Object | None, tagname: str) tuple[bool, BuildableParser, None]#

The type of the None singleton.

Parameters:
  • builder – a GtkBuilder used to construct this object

  • child – child object or None for non-child tags

  • tagname – name of tag

do_get_id() str#

The type of the None singleton.

do_get_internal_child(builder: Builder, childname: str) Object#

The type of the None singleton.

Parameters:
  • builder – a GtkBuilder

  • childname – name of child

do_parser_finished(builder: Builder) None#

The type of the None singleton.

Parameters:

builder

do_set_buildable_property(builder: Builder, name: str, value: Any) None#

The type of the None singleton.

Parameters:
  • builder

  • name

  • value

do_set_id(id: str) None#

The type of the None singleton.

Parameters:

id