<commit_before>.\" Copyright (c) 2014-2017 <NAME> <<EMAIL>>
.\"
.\" Permission is hereby granted, free of charge, to any person obtaining
.\" a copy of this software and associated documentation files (the
.\" "Software"), to deal in the Software without restriction, including
.\" without limitation the rights to use, copy, modify, merge, publish,
.\" distribute, sublicense, and/or sell copies of the Software, and to
.\" permit persons to whom the Software is furnished to do so, subject to
.\" the following conditions:
.\"
.\" The above copyright notice and this permission notice shall be
.\" included in all copies or substantial portions of the Software.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
.\" NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
.\" LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
.\" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
.\" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.\"
.Dd July 3, 2016
.Dt PIPEGLADE 1 PRM
.Os BSD
.Sh NAME
.Nm pipeglade
.Nd pipe-driven GTK+ interface
.Sh SYNOPSIS
.Nm
.Oo
.Op Fl i Ar in-fifo
.Op Fl o Ar out-fifo
.Op Fl b
.Op Fl u Ar builder-file
.Op Fl e Ar parent-xid
.Op Fl l Ar log-file
.Op Fl O Ar err-file
.Op Fl -display Ar X-server
.Oc |
.Op Fl h | G | V
.Sh DESCRIPTION
.Nm
is a helper program that displays graphical user
interfaces for other programs.
It renders the GUI definition found in a GtkBuilder XML file
(typically created using the
.Xr glade 1
interface designer), and communicates with the main program solely
through plain text messages via pipes or fifos.
It provides access to a subset of features of a subset of widgets of
GTK+ 3.
Simple one-shot dialogs as well as more complex, long-running programs
can be built using
.Nm ;
see
.Sx EXAMPLES .
.Sh OPTIONS
.Bl -tag -width Ds
.It Fl i Ar in-fifo
Creates a named pipe
.Ar in-fifo
if necessary, sets its permissions to
.Li 0600 ,
and uses it for command input.
.Pp
A command is a line of text.
Its format is
.Qq Ar id Ns Cm \&: Ns Ar action Bq Ar data ,
.Ar id
being the name of the receiving widget;
.Ar data
is separated from the rest of the command by a single whitespace
character.
Commands whose first non-whitespace character is
.Cm #
are considered comments and ignored silently, as are empty input lines.
Any occurences of the two-character sequences
.Cm \en
and
.Cm \er
will be converted into newline or carriage return, respectively.
Every other character following a backslash will be left unchanged,
but the backslash will be removed.
Invalid commands are reported on
.Va stderr
and are otherwise ignored.
See
.Sx WIDGETS
for applicable commands.
.Pp
It is an error if
.Ar in-fifo
exists but is not a named pipe.
The named pipe
.Ar in-fifo
is deleted upon successful program termination.
.Pp
Default command input is
.Va stdin .
.It Fl o Ar out-fifo
Creates a named pipe
.Ar out-fifo
if necessary, sets its permissions to
.Li 0600 ,
and uses it for output of feedback messages from the
graphical user interface.
.Pp
A feedback message is a line of text; its format is
.Qq Ar id Ns Cm \&: Ns Ar info Bq Ar data ,
.Ar id
being the name of the sending widget.
See
.Sx WIDGETS
for possible feedback messages.
.Pp
It is an error if
.Ar out-fifo
exists but is not a named pipe.
The named pipe
.Ar out-fifo
is deleted upon successful program termination.
.Pp
Default feedback-message output is
.Va stdout .
.It Fl b
Runs
.Nm
in the background after printing its process ID to
.Va stdout .
.Pp
It is an error if option
.Fl b
is used and not both
.Fl i Ar in-fifo
and
.Fl o Ar out-fifo
are specified.
.It Fl u Ar builder-file
Displays the graphical user interface
.Ar builder-file
which should be created using the
.Xr glade 1
user interface designer and saved in GtkBuilder (.ui) format.
Widget ids should consist of alphanumeric ASCII characters including
hyphens and underscores.
The main window must must be given the id
.Cm main .
.Pp
Default is
.Pa ./pipeglade.ui .
.It Fl e Ar parent-xid
Embeds the main window into the XEmbed socket
.Ar parent-xid
of another process.
.It Fl l Ar log-file
Appends for each command a line of
.Qq Ar time activity
to
.Ar log-file ,
.Ar time
being the number of microseconds elapsed during
.Ar activity .
.Ar time
and
.Ar activity
are separated by a tab character.
Permissions of
.Ar log-file
are set to
.Li 0600 .
A
.Ar log-file
name of
.Ql -
means
.Va stderr .
.It Fl O Ar err-file
Redirects
.Va stderr ,
appending its output to
.Ar err-file .
Permissions of
.Ar err-file
are set to
.Li 0600 .
.It Fl -display Ar X-server
Uses the display on
.Ar X-server
for user interaction.
.It Fl h
Prints a help message and exits.
.It Fl G
Prints the versions of the underlying GTK+ and cairo libraries and
exits.
.It Fl V
Prints the
.Nm
version and exits.
.El
.Sh WIDGETS
The widget classes able to communicate through
.Nm
are
.\" BEGIN_TOC
.Sx GtkAspectFrame ,
.Sx GtkBox ,
.Sx GtkButton ,
.Sx GtkButtonBox ,
.Sx GtkCalendar ,
.Sx GtkCheckButton ,
.Sx GtkColorButton ,
.Sx GtkComboBoxText ,
.Sx GtkDialog ,
.Sx GtkDrawingArea ,
.Sx GtkEntry ,
.Sx GtkEventBox ,
.Sx GtkExpander ,
.Sx GtkFileChooserButton ,
.Sx GtkFileChooserDialog ,
.Sx GtkFontButton ,
.Sx GtkFrame ,
.Sx GtkGrid ,
.Sx GtkImage ,
.Sx GtkImageMenuItem ,
.Sx GtkInfoBar ,
.Sx GtkLabel ,
.Sx GtkLinkButton ,
.Sx GtkMenu ,
.Sx GtkMenuBar ,
.Sx GtkMenuButton ,
.Sx GtkMenuItem ,
.Sx GtkNotebook ,
.Sx GtkOverlay ,
.Sx GtkPaned ,
.Sx GtkPlug ,
.Sx GtkPrintUnixDialog ,
.Sx GtkProgressBar ,
.Sx GtkRadioButton ,
.Sx GtkScale ,
.Sx GtkScrolledWindow ,
.Sx GtkSeparator ,
.Sx GtkSeparatorMenuItem ,
.Sx GtkSizeGroup ,
.Sx GtkSocket ,
.Sx GtkSpinButton ,
.Sx GtkSpinner ,
.Sx GtkStatusbar ,
.Sx GtkSwitch ,
.Sx GtkTextView ,
.Sx GtkToggleButton ,
.Sx GtkTreeView ,
.Sx GtkTreeViewColumn ,
.Sx GtkViewport ,
and
.Sx GtkWindow .
.\" END_TOC
.Pp
.Nm
references a widget by the
.Ar id
attribute it is given in Glade.
In the
.Pa .ui
file, a
.Cm GtkWindow
named
.Li foo
would appear as
.Dl <object class="GtkWindow" id="foo"> .
.\"
.\" Commands most widgets understand:
.\"
.\"  set_visible
.\"  set_sensitive
.\"  grab_focus
.\"  set_tooltip_text
.\"  block
.\"  set_size_request
.\"  style
.\"  force
.\"  snapshot
.\"  ping
.\"
.Ss Unspecific Widget
.Bl -tag -width indent
.It Commands
.Bl -item
.It
.Qq Ar id Ns Cm :load Ar file
reads arbitrary
.Nm
commands from
.Ar file .
A non-empty
.Ar id
is required but ignored.
.Cm :load
commands may be nested but on attempts to read from the same file, the
inner
.Cm :load
is ignored.
There is also a
.Cm :save
command; see
.Sx GtkTextView
and
.Sx GtkTreeView .
.Pp
.Qq Ar id Ns Cm :main_quit
kills the user interface.
A non-empty
.Ar id
is required but ignored.
.El
.El
.Ss GtkAspectFrame
.Bl -tag -width indent
.It Commands
.Bl -item
.It
.Qq Ar id Ns Cm :set_label Ar text
replaces the frame label text with
.Ar string .
.It
.Qq Ar id Ns Cm :set_sensitive Brq Cm 0 Ns | Ns Cm 1
makes the frame and its content grayed out
.Pq Cm 0
or responsive
.Pq Cm 1 .
.It
.Qq Ar id Ns Cm :set_visible Brq Cm 0 Ns | Ns Cm 1
hides
.Pq Cm 0
the frame, or makes it visible
.Pq Cm 1 .
.It
.Qq Ar id Ns Cm :set_tooltip_text Bq Ar text
sets the frame's tooltip.
Default is disabling the tooltip.
.It
.Qq Ar id Ns Cm :snapshot Ar file Ns Brq Cm .ps Ns | Ns Cm .eps Ns | Ns Cm .epsf Ns | Ns Cm .pdf Ns | Ns Cm .svg
writes a snapshot of the frame to an image file of the specified
type.
.It
.Qq Ar id Ns Cm :set_size_request Bq Ar width height
sets the widget's minimum size to
.Ar width
x
.Ar height .
Default is the frame's natural size.
.It
.Qo
.Ar id Ns Cm :style
.Bo Ar prop Ns Cm \&: Ns Ar val Ns Bo Cm \&; Ar prop Ns Cm \&: Ns Ar val ... Bc Bc
.Qc
sets the style.
See
.Sx Style .
.Pp
.Qq Ar id Ns Cm :ping Bq Ar text
triggers a feedback message.
.El
.It Feedback
.Bl -item
.It
.Qq Ar id Ns Cm :ping Ar text
if triggered by the
.Cm :ping
command.
.El
.El
.Ss GtkBox
.Bl -tag -width indent
.It Commands
.Bl -item
.It
.Qq Ar id Ns Cm :set_sensitive Brq Cm 0 Ns | Ns Cm 1
makes the box grayed out
.Pq Cm 0
or responsive
.Pq Cm 1 .
.It
.Qq Ar id Ns Cm :set_visible Brq Cm 0 Ns | Ns Cm 1
hides
.Pq Cm 0
the box, or makes it visible
.Pq Cm 1 .
.Qq Ar id Ns Cm :set_tooltip_text Bq Ar text
sets the box's tooltip.
Default is disabling the tooltip.
.It
.Qq Ar id Ns Cm :snapshot Ar file Ns Brq Cm .ps Ns | Ns Cm .eps Ns | Ns Cm .epsf Ns | Ns Cm .pdf Ns | Ns Cm .svg
writes a snapshot of the box to an image file of the specified
type.
.It
.Qq Ar id Ns Cm :set_size_request Bq Ar width height
sets the box's minimum size to
.Ar width
x
.Ar height .
Default is the box's natural size.
.It
.Qo
.Ar id Ns Cm :style
.Bo Ar prop Ns Cm \&: Ns Ar val Ns Bo Cm \&; Ar prop Ns Cm \&: Ns Ar val ... Bc Bc
.Qc
sets the style.
See
.Sx Style .
.Pp
.Qq Ar id Ns Cm :ping Bq Ar text
triggers a feedback message.
.El
.It Feedback
.Bl -item
.It
.Qq Ar id Ns Cm :ping Ar text
if triggered by the
.Cm :ping
command.
.El
.El
.Ss GtkButton
.Bl -tag -width indent
.It Commands
.Bl -item
.It
.Qq Ar id Ns Cm :set_label Ar string
replaces the button text with
.Ar string .
.It
.Qq Ar id Ns Cm :grab_focus
puts the keyboard focus onto the button.
.It
.Qq Ar id Ns Cm :set_sensitive Brq Cm 0 Ns | Ns Cm 1
makes the button grayed out
.Pq Cm 0
or responsive
.Pq Cm 1 .
.It
.Qq Ar id Ns Cm :set_visible Brq Cm 0 Ns | Ns Cm 1
hides
.Pq Cm 0
the button, or makes it visible
.Pq Cm 1 .
.It
.Qq Ar id Ns Cm :block Brq Cm 0 Ns | Ns Cm 1
blocks
.Pq Cm 1
or unblocks
.Pq Cm 0
feedback messages.
Initially, the button is unblocked.
.It
.Qq Ar id Ns Cm :set_tooltip_text Bq Ar text
sets the button's tooltip.
Default is disabling the tooltip.
.It
.Qq Ar id Ns Cm :force
simulates a click on the button.
.It
.Qq Ar id Ns Cm :snapshot Ar file Ns Brq Cm .ps Ns | Ns Cm .eps Ns | Ns Cm .epsf Ns | Ns Cm .pdf Ns | Ns Cm .svg
writes a snapshot of the button to an image file of the specified
type.
.It
.Qq Ar id Ns Cm :set_size_request Bq Ar width height
sets the button's minimum size to
.Ar width
x
.Ar height .
Default is the button's natural size.
.It
.Qo
.Ar id Ns Cm :style
.Bo Ar prop Ns Cm \&: Ns Ar val Ns Bo Cm \&; Ar prop Ns Cm \&: Ns Ar val ... Bc Bc
.Qc
sets the style.
See
.Sx Style .
.Pp
.Qq Ar id Ns Cm :ping Bq Ar text
triggers a feedback message.
.El
.It Feedback
.Bl -item
.It
.Qq Ar id Ns Cm :ping Ar text
if triggered by the
.Cm :ping
command.
.Pp
.Qq Ar id Ns Cm \&:clicked
.Pp
.Cm GtkButton Ns
s with ids ending in
.Cm _ok , _apply , _cancel , _send_text ,
and
.Cm _send_selection
may work differently; see
.Sx GtkDialog , GtkFileChooserDialog ,
and
.Sx GtkTextView
for details.
.Pp
.Qq Ar id Ns Cm :ping Ar text
if triggered by the
.Cm :ping
command.
.El
.El
.Ss GtkButtonBox
.Bl -tag -width indent
.It Commands
.Bl -item
.It<commit_msg>Fix repetition in manual page<commit_after>.\" Copyright (c) 2014-2017 <NAME> <<EMAIL>>
.\"
.\" Permission is hereby granted, free of charge, to any person obtaining
.\" a copy of this software and associated documentation files (the
.\" "Software"), to deal in the Software without restriction, including
.\" without limitation the rights to use, copy, modify, merge, publish,
.\" distribute, sublicense, and/or sell copies of the Software, and to
.\" permit persons to whom the Software is furnished to do so, subject to
.\" the following conditions:
.\"
.\" The above copyright notice and this permission notice shall be
.\" included in all copies or substantial portions of the Software.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
.\" NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
.\" LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
.\" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
.\" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.\"
.Dd October 11, 2017
.Dt PIPEGLADE 1 PRM
.Os BSD
.Sh NAME
.Nm pipeglade
.Nd pipe-driven GTK+ interface
.Sh SYNOPSIS
.Nm
.Oo
.Op Fl i Ar in-fifo
.Op Fl o Ar out-fifo
.Op Fl b
.Op Fl u Ar builder-file
.Op Fl e Ar parent-xid
.Op Fl l Ar log-file
.Op Fl O Ar err-file
.Op Fl -display Ar X-server
.Oc |
.Op Fl h | G | V
.Sh DESCRIPTION
.Nm
is a helper program that displays graphical user
interfaces for other programs.
It renders the GUI definition found in a GtkBuilder XML file
(typically created using the
.Xr glade 1
interface designer), and communicates with the main program solely
through plain text messages via pipes or fifos.
It provides access to a subset of features of a subset of widgets of
GTK+ 3.
Simple one-shot dialogs as well as more complex, long-running programs
can be built using
.Nm ;
see
.Sx EXAMPLES .
.Sh OPTIONS
.Bl -tag -width Ds
.It Fl i Ar in-fifo
Creates a named pipe
.Ar in-fifo
if necessary, sets its permissions to
.Li 0600 ,
and uses it for command input.
.Pp
A command is a line of text.
Its format is
.Qq Ar id Ns Cm \&: Ns Ar action Bq Ar data ,
.Ar id
being the name of the receiving widget;
.Ar data
is separated from the rest of the command by a single whitespace
character.
Commands whose first non-whitespace character is
.Cm #
are considered comments and ignored silently, as are empty input lines.
Any occurences of the two-character sequences
.Cm \en
and
.Cm \er
will be converted into newline or carriage return, respectively.
Every other character following a backslash will be left unchanged,
but the backslash will be removed.
Invalid commands are reported on
.Va stderr
and are otherwise ignored.
See
.Sx WIDGETS
for applicable commands.
.Pp
It is an error if
.Ar in-fifo
exists but is not a named pipe.
The named pipe
.Ar in-fifo
is deleted upon successful program termination.
.Pp
Default command input is
.Va stdin .
.It Fl o Ar out-fifo
Creates a named pipe
.Ar out-fifo
if necessary, sets its permissions to
.Li 0600 ,
and uses it for output of feedback messages from the
graphical user interface.
.Pp
A feedback message is a line of text; its format is
.Qq Ar id Ns Cm \&: Ns Ar info Bq Ar data ,
.Ar id
being the name of the sending widget.
See
.Sx WIDGETS
for possible feedback messages.
.Pp
It is an error if
.Ar out-fifo
exists but is not a named pipe.
The named pipe
.Ar out-fifo
is deleted upon successful program termination.
.Pp
Default feedback-message output is
.Va stdout .
.It Fl b
Runs
.Nm
in the background after printing its process ID to
.Va stdout .
.Pp
It is an error if option
.Fl b
is used and not both
.Fl i Ar in-fifo
and
.Fl o Ar out-fifo
are specified.
.It Fl u Ar builder-file
Displays the graphical user interface
.Ar builder-file
which should be created using the
.Xr glade 1
user interface designer and saved in GtkBuilder (.ui) format.
Widget ids should consist of alphanumeric ASCII characters including
hyphens and underscores.
The main window must must be given the id
.Cm main .
.Pp
Default is
.Pa ./pipeglade.ui .
.It Fl e Ar parent-xid
Embeds the main window into the XEmbed socket
.Ar parent-xid
of another process.
.It Fl l Ar log-file
Appends for each command a line of
.Qq Ar time activity
to
.Ar log-file ,
.Ar time
being the number of microseconds elapsed during
.Ar activity .
.Ar time
and
.Ar activity
are separated by a tab character.
Permissions of
.Ar log-file
are set to
.Li 0600 .
A
.Ar log-file
name of
.Ql -
means
.Va stderr .
.It Fl O Ar err-file
Redirects
.Va stderr ,
appending its output to
.Ar err-file .
Permissions of
.Ar err-file
are set to
.Li 0600 .
.It Fl -display Ar X-server
Uses the display on
.Ar X-server
for user interaction.
.It Fl h
Prints a help message and exits.
.It Fl G
Prints the versions of the underlying GTK+ and cairo libraries and
exits.
.It Fl V
Prints the
.Nm
version and exits.
.El
.Sh WIDGETS
The widget classes able to communicate through
.Nm
are
.\" BEGIN_TOC
.Sx GtkAspectFrame ,
.Sx GtkBox ,
.Sx GtkButton ,
.Sx GtkButtonBox ,
.Sx GtkCalendar ,
.Sx GtkCheckButton ,
.Sx GtkColorButton ,
.Sx GtkComboBoxText ,
.Sx GtkDialog ,
.Sx GtkDrawingArea ,
.Sx GtkEntry ,
.Sx GtkEventBox ,
.Sx GtkExpander ,
.Sx GtkFileChooserButton ,
.Sx GtkFileChooserDialog ,
.Sx GtkFontButton ,
.Sx GtkFrame ,
.Sx GtkGrid ,
.Sx GtkImage ,
.Sx GtkImageMenuItem ,
.Sx GtkInfoBar ,
.Sx GtkLabel ,
.Sx GtkLinkButton ,
.Sx GtkMenu ,
.Sx GtkMenuBar ,
.Sx GtkMenuButton ,
.Sx GtkMenuItem ,
.Sx GtkNotebook ,
.Sx GtkOverlay ,
.Sx GtkPaned ,
.Sx GtkPlug ,
.Sx GtkPrintUnixDialog ,
.Sx GtkProgressBar ,
.Sx GtkRadioButton ,
.Sx GtkScale ,
.Sx GtkScrolledWindow ,
.Sx GtkSeparator ,
.Sx GtkSeparatorMenuItem ,
.Sx GtkSizeGroup ,
.Sx GtkSocket ,
.Sx GtkSpinButton ,
.Sx GtkSpinner ,
.Sx GtkStatusbar ,
.Sx GtkSwitch ,
.Sx GtkTextView ,
.Sx GtkToggleButton ,
.Sx GtkTreeView ,
.Sx GtkTreeViewColumn ,
.Sx GtkViewport ,
and
.Sx GtkWindow .
.\" END_TOC
.Pp
.Nm
references a widget by the
.Ar id
attribute it is given in Glade.
In the
.Pa .ui
file, a
.Cm GtkWindow
named
.Li foo
would appear as
.Dl <object class="GtkWindow" id="foo"> .
.\"
.\" Commands most widgets understand:
.\"
.\"  set_visible
.\"  set_sensitive
.\"  grab_focus
.\"  set_tooltip_text
.\"  block
.\"  set_size_request
.\"  style
.\"  force
.\"  snapshot
.\"  ping
.\"
.Ss Unspecific Widget
.Bl -tag -width indent
.It Commands
.Bl -item
.It
.Qq Ar id Ns Cm :load Ar file
reads arbitrary
.Nm
commands from
.Ar file .
A non-empty
.Ar id
is required but ignored.
.Cm :load
commands may be nested but on attempts to read from the same file, the
inner
.Cm :load
is ignored.
There is also a
.Cm :save
command; see
.Sx GtkTextView
and
.Sx GtkTreeView .
.Pp
.Qq Ar id Ns Cm :main_quit
kills the user interface.
A non-empty
.Ar id
is required but ignored.
.El
.El
.Ss GtkAspectFrame
.Bl -tag -width indent
.It Commands
.Bl -item
.It
.Qq Ar id Ns Cm :set_label Ar text
replaces the frame label text with
.Ar string .
.It
.Qq Ar id Ns Cm :set_sensitive Brq Cm 0 Ns | Ns Cm 1
makes the frame and its content grayed out
.Pq Cm 0
or responsive
.Pq Cm 1 .
.It
.Qq Ar id Ns Cm :set_visible Brq Cm 0 Ns | Ns Cm 1
hides
.Pq Cm 0
the frame, or makes it visible
.Pq Cm 1 .
.It
.Qq Ar id Ns Cm :set_tooltip_text Bq Ar text
sets the frame's tooltip.
Default is disabling the tooltip.
.It
.Qq Ar id Ns Cm :snapshot Ar file Ns Brq Cm .ps Ns | Ns Cm .eps Ns | Ns Cm .epsf Ns | Ns Cm .pdf Ns | Ns Cm .svg
writes a snapshot of the frame to an image file of the specified
type.
.It
.Qq Ar id Ns Cm :set_size_request Bq Ar width height
sets the widget's minimum size to
.Ar width
x
.Ar height .
Default is the frame's natural size.
.It
.Qo
.Ar id Ns Cm :style
.Bo Ar prop Ns Cm \&: Ns Ar val Ns Bo Cm \&; Ar prop Ns Cm \&: Ns Ar val ... Bc Bc
.Qc
sets the style.
See
.Sx Style .
.Pp
.Qq Ar id Ns Cm :ping Bq Ar text
triggers a feedback message.
.El
.It Feedback
.Bl -item
.It
.Qq Ar id Ns Cm :ping Ar text
if triggered by the
.Cm :ping
command.
.El
.El
.Ss GtkBox
.Bl -tag -width indent
.It Commands
.Bl -item
.It
.Qq Ar id Ns Cm :set_sensitive Brq Cm 0 Ns | Ns Cm 1
makes the box grayed out
.Pq Cm 0
or responsive
.Pq Cm 1 .
.It
.Qq Ar id Ns Cm :set_visible Brq Cm 0 Ns | Ns Cm 1
hides
.Pq Cm 0
the box, or makes it visible
.Pq Cm 1 .
.Qq Ar id Ns Cm :set_tooltip_text Bq Ar text
sets the box's tooltip.
Default is disabling the tooltip.
.It
.Qq Ar id Ns Cm :snapshot Ar file Ns Brq Cm .ps Ns | Ns Cm .eps Ns | Ns Cm .epsf Ns | Ns Cm .pdf Ns | Ns Cm .svg
writes a snapshot of the box to an image file of the specified
type.
.It
.Qq Ar id Ns Cm :set_size_request Bq Ar width height
sets the box's minimum size to
.Ar width
x
.Ar height .
Default is the box's natural size.
.It
.Qo
.Ar id Ns Cm :style
.Bo Ar prop Ns Cm \&: Ns Ar val Ns Bo Cm \&; Ar prop Ns Cm \&: Ns Ar val ... Bc Bc
.Qc
sets the style.
See
.Sx Style .
.Pp
.Qq Ar id Ns Cm :ping Bq Ar text
triggers a feedback message.
.El
.It Feedback
.Bl -item
.It
.Qq Ar id Ns Cm :ping Ar text
if triggered by the
.Cm :ping
command.
.El
.El
.Ss GtkButton
.Bl -tag -width indent
.It Commands
.Bl -item
.It
.Qq Ar id Ns Cm :set_label Ar string
replaces the button text with
.Ar string .
.It
.Qq Ar id Ns Cm :grab_focus
puts the keyboard focus onto the button.
.It
.Qq Ar id Ns Cm :set_sensitive Brq Cm 0 Ns | Ns Cm 1
makes the button grayed out
.Pq Cm 0
or responsive
.Pq Cm 1 .
.It
.Qq Ar id Ns Cm :set_visible Brq Cm 0 Ns | Ns Cm 1
hides
.Pq Cm 0
the button, or makes it visible
.Pq Cm 1 .
.It
.Qq Ar id Ns Cm :block Brq Cm 0 Ns | Ns Cm 1
blocks
.Pq Cm 1
or unblocks
.Pq Cm 0
feedback messages.
Initially, the button is unblocked.
.It
.Qq Ar id Ns Cm :set_tooltip_text Bq Ar text
sets the button's tooltip.
Default is disabling the tooltip.
.It
.Qq Ar id Ns Cm :force
simulates a click on the button.
.It
.Qq Ar id Ns Cm :snapshot Ar file Ns Brq Cm .ps Ns | Ns Cm .eps Ns | Ns Cm .epsf Ns | Ns Cm .pdf Ns | Ns Cm .svg
writes a snapshot of the button to an image file of the specified
type.
.It
.Qq Ar id Ns Cm :set_size_request Bq Ar width height
sets the button's minimum size to
.Ar width
x
.Ar height .
Default is the button's natural size.
.It
.Qo
.Ar id Ns Cm :style
.Bo Ar prop Ns Cm \&: Ns Ar val Ns Bo Cm \&; Ar prop Ns Cm \&: Ns Ar val ... Bc Bc
.Qc
sets the style.
See
.Sx Style .
.Pp
.Qq Ar id Ns Cm :ping Bq Ar text
triggers a feedback message.
.El
.It Feedback
.Bl -item
.It
.Qq Ar id Ns Cm :ping Ar text
if triggered by the
.Cm :ping
command.
.Pp
.Qq Ar id Ns Cm \&:clicked
.Pp
.Cm GtkButton Ns
s with ids ending in
.Cm _ok , _apply , _cancel , _send_text ,
and
.Cm _send_selection
may work differently; see
.Sx GtkDialog , GtkFileChooserDialog ,
and
.Sx GtkTextView
for details.
.El
.El
.Ss GtkButtonBox
.Bl -tag -width indent
.It Commands
.Bl -item
.It
{'fraction_non_alphanumeric': 0.07766187215661045, 'fraction_numerical': 0.005652313772345021, 'mean_word_length': 3.0638655462184876, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '444980', 'n_tokens_mistral': 8385, 'n_tokens_neox': 8054, 'n_words': 3849}