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 render [OPTIONS...] <FILE>
16       gtk4-builder-tool screenshot [OPTIONS...] <FILE>
17
18

DESCRIPTION

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

COMMANDS

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