.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "GTK4-BUILDER-TOOL" "" "" "" .SH NAME gtk4-builder-tool \- GtkBuilder File Utility .SH SYNOPSIS .nf \fBgtk4\-builder\-tool\fP [OPTIONS...] \fBgtk4\-builder\-tool\fP validate [OPTIONS...] \fBgtk4\-builder\-tool\fP enumerate [OPTIONS...] \fBgtk4\-builder\-tool\fP simplify [OPTIONS...] \fBgtk4\-builder\-tool\fP preview [OPTIONS...] \fBgtk4\-builder\-tool\fP render [OPTIONS...] \fBgtk4\-builder\-tool\fP screenshot [OPTIONS...] .fi .sp .SH DESCRIPTION .sp \fBgtk4\-builder\-tool\fP can perform various operations on GtkBuilder UI definition files. .SH COMMANDS .SS Validation .sp The \fBvalidate\fP command validates the given UI definition file and reports errors to \fBstderr\fP\&. .sp 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 \fILD_PRELOAD\fP environment variable. .sp \fB\-\-deprecations\fP .INDENT 0.0 .INDENT 3.5 Warn about uses of deprecated types in the UI definition file. .UNINDENT .UNINDENT .SS Enumeration .sp The \fBenumerate\fP command prints all the named objects that are present in the UI definition file. .sp \fB\-\-callbacks\fP .INDENT 0.0 .INDENT 3.5 Print the names of callbacks as well. .UNINDENT .UNINDENT .SS Preview .sp The \fBpreview\fP command displays the UI definition file. .sp This command accepts options to specify the ID of the toplevel object and a CSS file to use. .sp \fB\-\-id=ID\fP .INDENT 0.0 .INDENT 3.5 The ID of the object to preview. If not specified, gtk4\-builder\-tool will choose a suitable object on its own. .UNINDENT .UNINDENT .sp \fB\-\-css=FILE\fP .INDENT 0.0 .INDENT 3.5 Load style information from the given CSS file. .UNINDENT .UNINDENT .SS Render .sp The \fBrender\fP 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. .sp This command accepts options to specify the ID of the toplevel object and a CSS file to use. .sp \fB\-\-id=ID\fP .INDENT 0.0 .INDENT 3.5 The ID of the object to preview. If not specified, gtk4\-builder\-tool will choose a suitable object on its own. .UNINDENT .UNINDENT .sp \fB\-\-css=FILE\fP .INDENT 0.0 .INDENT 3.5 Load style information from the given CSS file. .UNINDENT .UNINDENT .sp \fB\-\-node\fP .INDENT 0.0 .INDENT 3.5 Write a serialized node file instead of a png image. .UNINDENT .UNINDENT .sp \fB\-\-force\fP .INDENT 0.0 .INDENT 3.5 Overwrite an existing file. .UNINDENT .UNINDENT .SS Screenshot .sp The \fBscreenshot\fP command is an alias for \fBrender\fP\&. .SS Simplification .sp The \fBsimplify\fP 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. .sp When the \fB\-\-3to4\fP option is specified, the \fBsimplify\fP 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. .sp You should always test the modified UI definition files produced by gtk4\-builder\-tool before using them in production. .sp Note in particular that the conversion done with \fB\-\-3to4\fP 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. .sp \fB\-\-replace\fP .INDENT 0.0 .INDENT 3.5 Write the content back to the UI definition file instead of using the standard output. .UNINDENT .UNINDENT .sp \fB\-\-3to4\fP .INDENT 0.0 .INDENT 3.5 Transform a GTK 3 UI definition file to the equivalent GTK 4 definitions. .UNINDENT .UNINDENT .\" Generated by docutils manpage writer. .