table of contents
GTK4-BUILDER-TOOL(1) | GTK commands | GTK4-BUILDER-TOOL(1) |
NAME¶
gtk4-builder-tool - GtkBuilder File Utility
SYNOPSIS¶
gtk4-builder-tool <COMMAND> [OPTIONS...] <FILE> gtk4-builder-tool validate [OPTIONS...] <FILE> gtk4-builder-tool enumerate [OPTIONS...] <FILE> gtk4-builder-tool simplify [OPTIONS...] <FILE> gtk4-builder-tool preview [OPTIONS...] <FILE> gtk4-builder-tool render [OPTIONS...] <FILE> gtk4-builder-tool screenshot [OPTIONS...] <FILE>
DESCRIPTION¶
gtk4-builder-tool can perform various operations on GtkBuilder UI definition files.
COMMANDS¶
Validation¶
The validate command validates the given UI definition file and reports errors to stderr.
Note that there are limitations to the validation that can be done for templates, since they are closely tied to the class_init function they are used in. If your UI file uses types from third-party libraries, it may help to add those libraries to the LD_PRELOAD environment variable.
--deprecations
Enumeration¶
The enumerate command prints all the named objects that are present in the UI definition file.
--callbacks
Preview¶
The preview command displays the UI definition file.
This command accepts options to specify the ID of the toplevel object and a CSS file to use.
--id=ID
--css=FILE
Render¶
The render command saves a rendering of the UI definition file as a png image or node file. The name of the file to write can be specified as a second FILE argument.
This command accepts options to specify the ID of the toplevel object and a CSS file to use.
--id=ID
--css=FILE
--node
--force
Screenshot¶
The screenshot command is an alias for render.
Simplification¶
The simplify command simplifies the UI definition file by removing properties that are set to their default values and writes the resulting XML to the standard output, or back to the input file.
When the --3to4 option is specified, the simplify command interprets the input as a GTK 3 UI definuition file and attempts to convert it to GTK 4 equivalents. It performs various conversions, such as renaming properties, translating child properties to layout properties, rewriting the setup for GtkNotebook, GtkStack, GtkAssistant or changing toolbars into boxes.
You should always test the modified UI definition files produced by gtk4-builder-tool before using them in production.
Note in particular that the conversion done with --3to4 is meant as a starting point for a port from GTK 3 to GTK 4. It is expected that you will have to do manual fixups after the initial conversion.
--replace
--3to4
GTK |