1GTK4-BUILDER-TOOL()                                        GTK4-BUILDER-TOOL()
2
3
4

NAME

6       gtk4-builder-tool - GtkBuilder File Utility
7

SYNOPSIS

9       gtk4-builder-tool <COMMAND> [OPTIONS...] <FILE>
10
11       gtk4-builder-tool validate <FILE>
12       gtk4-builder-tool enumerate <FILE>
13       gtk4-builder-tool simplify [OPTIONS...] <FILE>
14       gtk4-builder-tool preview [OPTIONS...] <FILE>
15       gtk4-builder-tool screenshot [OPTIONS...] <FILE>
16
17

DESCRIPTION

19       gtk4-builder-tool can perform various operations on GtkBuilder UI defi‐
20       nition files.
21

COMMANDS

23   Validation
24       The validate command validates the given UI definition file and reports
25       errors to stderr.
26
27   Enumeration
28       The  enumerate  command lists all the named objects that are present in
29       the UI definition file.
30
31   Preview
32       The preview command displays the UI definition file.
33
34       This command accepts options to specify the ID of the  toplevel  object
35       and a CSS file to use.
36
37       --id=ID
38          The ID of the object to preview. If not specified, gtk4-builder-tool
39          will choose a suitable object on its own.
40
41       --css=FILE
42          Load style information from the given CSS file.
43
44   Screenshot
45       The screenshot command saves a rendering of the UI definition file as a
46       png  image or node file. The name of the file to write can be specified
47       as a second FILE argument.
48
49       This command accepts options to specify the ID of the  toplevel  object
50       and a CSS file to use.
51
52       --id=ID
53          The ID of the object to preview. If not specified, gtk4-builder-tool
54          will choose a suitable object on its own.
55
56       --css=FILE
57          Load style information from the given CSS file.
58
59       --node
60          Write a serialized node file instead of a png image.
61
62       --force
63          Overwrite an existing file.
64
65   Simplification
66       The simplify command simplifies the  UI  definition  file  by  removing
67       properties  that are set to their default values and writes the result‐
68       ing XML to the standard output, or back to the input file.
69
70       When the --3to4 option is specified, the  simplify  command  interprets
71       the  input as a GTK 3 UI definuition file and attempts to convert it to
72       GTK 4 equivalents. It performs various conversions,  such  as  renaming
73       properties,  translating child properties to layout properties, rewrit‐
74       ing the setup for  GtkNotebook,  GtkStack,  GtkAssistant   or  changing
75       toolbars into boxes.
76
77       You  should  always  test  the modified UI definition files produced by
78       gtk4-builder-tool before using them in production.
79
80       Note in particular that the conversion done with --3to4 is meant  as  a
81       starting  point for a port from GTK 3 to GTK 4. It is expected that you
82       will have to do manual fixups  after the initial conversion.
83
84       --replace
85          Write the content back to the UI definition file  instead  of  using
86          the standard output.
87
88       --3to4
89          Transform a GTK 3 UI definition file to the equivalent GTK 4 defini‐
90          tions.
91
92
93
94
95                                                           GTK4-BUILDER-TOOL()
Impressum