
Last chance! 50% off unlimited learning
Sale ends in
gtkBuilderNew()
gtkBuilderAddFromFile(object, filename, .errwarn = TRUE)
gtkBuilderAddFromString(object, buffer, length, .errwarn = TRUE)
gtkBuilderAddObjectsFromFile(object, filename, object.ids, .errwarn = TRUE)
gtkBuilderAddObjectsFromString(object, buffer, length, object.ids, .errwarn = TRUE)
gtkBuilderGetObject(object, name)
gtkBuilderGetObjects(object)
gtkBuilderConnectSignals(object, user.data = NULL)
gtkBuilderConnectSignalsFull(object, func, user.data)
gtkBuilderSetTranslationDomain(object, domain)
gtkBuilderGetTranslationDomain(object)
gtkBuilderGetTypeFromName(object, type.name)
gtkBuilderValueFromString(object, pspec, string, .errwarn = TRUE)
gtkBuilderValueFromStringType(object, type, string, .errwarn = TRUE)
gtkBuilder()
gtkBuilderAddFromFile
or
gtkBuilderAddFromString
. These functions can be called multiple
times; the builder merges the content of all descriptions.
A GtkBuilder holds a reference to all objects that it has constructed
and drops these references when it is finalized. This finalization can
cause the destruction of non-widget objects or widgets which are not
contained in a toplevel window. For toplevel windows constructed by a
builder, it is the responsibility of the user to call gtkWidgetDestroy
to get rid of them and all the widgets they contain.
The functions gtkBuilderGetObject
and gtkBuilderGetObjects
can be used to access the widgets in the interface by the names assigned
to them inside the UI description. Toplevel windows returned by these
functions will stay around until the user explicitly destroys them
with gtkWidgetDestroy
. Other widgets will either be part of a
larger hierarchy constructed by the builder (in which case you should
not have to worry about their lifecycle), or without a parent, in which
case they have to be added to some container to make use of them.
Non-widget objects need to be reffed with gObjectRef()
to keep them
beyond the lifespan of the builder.
The function gtkBuilderConnectSignals
and variants thereof can be
used to connect handlers to the named signals in the description.dgettext()
in the
domain specified. This can also be done by calling
gtkBuilderSetTranslationDomain
on the builder.
Objects are described by gtkBuilder
is the equivalent of gtkBuilderNew
.