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 [OPTIONS...] <FILE>
12       gtk4-builder-tool enumerate [OPTIONS...] <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       Note  that there are limitations to the validation that can be done for
28       templates, since they are closely tied to the class_init function  they
29       are used in.  If your UI file uses types from third-party libraries, it
30       may help to add those libraries to the LD_PRELOAD environment variable.
31
32       --deprecations
33          Warn about uses of deprecated types in the UI definition file.
34
35   Enumeration
36       The enumerate command prints all the named objects that are present  in
37       the UI definition file.
38
39       --callbacks
40          Print the names of callbacks as well.
41
42   Preview
43       The preview command displays the UI definition file.
44
45       This  command  accepts options to specify the ID of the toplevel object
46       and a CSS file to use.
47
48       --id=ID
49          The ID of the object to preview. If not specified, gtk4-builder-tool
50          will choose a suitable object on its own.
51
52       --css=FILE
53          Load style information from the given CSS file.
54
55   Screenshot
56       The screenshot command saves a rendering of the UI definition file as a
57       png image or node file. The name of the file to write can be  specified
58       as a second FILE argument.
59
60       This  command  accepts options to specify the ID of the toplevel object
61       and a CSS file to use.
62
63       --id=ID
64          The ID of the object to preview. If not specified, gtk4-builder-tool
65          will choose a suitable object on its own.
66
67       --css=FILE
68          Load style information from the given CSS file.
69
70       --node
71          Write a serialized node file instead of a png image.
72
73       --force
74          Overwrite an existing file.
75
76   Simplification
77       The  simplify  command  simplifies  the  UI definition file by removing
78       properties that are set to their default values and writes the  result‐
79       ing XML to the standard output, or back to the input file.
80
81       When  the  --3to4  option is specified, the simplify command interprets
82       the input as a GTK 3 UI definuition file and attempts to convert it  to
83       GTK  4  equivalents.  It performs various conversions, such as renaming
84       properties, translating child properties to layout properties,  rewrit‐
85       ing  the  setup  for  GtkNotebook,  GtkStack, GtkAssistant  or changing
86       toolbars into boxes.
87
88       You should always test the modified UI  definition  files  produced  by
89       gtk4-builder-tool before using them in production.
90
91       Note  in  particular that the conversion done with --3to4 is meant as a
92       starting point for a port from GTK 3 to GTK 4. It is expected that  you
93       will have to do manual fixups  after the initial conversion.
94
95       --replace
96          Write  the  content  back to the UI definition file instead of using
97          the standard output.
98
99       --3to4
100          Transform a GTK 3 UI definition file to the equivalent GTK 4 defini‐
101          tions.
102
103
104
105
106                                                           GTK4-BUILDER-TOOL()
Impressum