1 .\" Copyright (c) 2014-2016 Bert Burgemeister <trebbu@googlemail.com>
3 .\" Permission is hereby granted, free of charge, to any person obtaining
4 .\" a copy of this software and associated documentation files (the
5 .\" "Software"), to deal in the Software without restriction, including
6 .\" without limitation the rights to use, copy, modify, merge, publish,
7 .\" distribute, sublicense, and/or sell copies of the Software, and to
8 .\" permit persons to whom the Software is furnished to do so, subject to
9 .\" the following conditions:
11 .\" The above copyright notice and this permission notice shall be
12 .\" included in all copies or substantial portions of the Software.
14 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 .\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 .\" NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 .\" LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 .\" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 .\" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 .Nd Pipe-Driven GTK+ Interface
36 .Op Fl u Ar builder-file
37 .Op Fl -display Ar X-server
40 is a helper program that displays graphical user
41 interfaces for other programs. It renders the GUI definition
42 found in a GtkBuilder XML file (typically created using the
44 interface designer), and communicates with the main program solely
45 through plain text messages via pipes or fifos. It provides access to
46 a subset of features of a subset of widgets of GTK+ 3. Simple
47 one-shot dialogs as well as more complex, long-running programs can be
55 Prints a help message and exits.
56 .It Fl e Ar parent-xid
57 Embeds the main window into the XEmbed socket
63 if necessary, and uses it for command input.
65 A command is a line of text. Its format is
66 .Qq Fa name Ns Ic \&: Ns Fa action Bq Fa data
69 is the name of the receiving widget;
71 is separated from the rest of the command by a single whitespace
72 character. Commands whose first non-whitespace character is
74 are considered comments and ignored silently, as are empty input lines.
75 Any occurences of the two-character sequences
79 will be converted into newline or carriage return, respectively.
80 Every other character following a backslash will be left unchanged,
81 but the backslash will be removed. Invalid commands are reported on
83 and are otherwise ignored. See
85 for applicable commands.
89 exists but is not a named pipe. The named pipe
91 is deleted upon successful program termination.
93 Default command input is
98 if necessary, and uses it for output of feedback messages from the
99 graphical user interface.
101 A feedback message is a line of text; its format is
102 .Qq Fa name Ns Ic \&: Ns Fa info Bq Fa data
105 is the name of the sending widget. See
107 for possible feedback messages.
111 exists but is not a named pipe. The named pipe
113 is deleted upon successful program termination.
115 Default feedback-message output is
117 .It Fl u Ar builder-file
118 Displays the graphical user interface
120 which should be created using the
122 user interface designer and saved in GtkBuilder (.ui) format. Widget
123 names should be alphanumeric, including underscores, and the main
129 .It Fl -display Ar X-server
132 for user interaction.
134 Prints the GTK+ version and exits.
141 The widget classes able to communicate through
148 .Sx GtkComboBoxText ,
154 .Sx GtkFileChooserButton ,
155 .Sx GtkFileChooserDialog ,
160 .Sx GtkMenuItem, GtkImageMenuItem ,
162 .Sx GtkPrintUnixDialog ,
166 .Sx GtkScrolledWindow
173 .Sx GtkToggleButton ,
175 .Sx GtkTreeViewColumn ,
180 references a widget by the
182 it is given in Glade. In the .ui file, this
184 is represented by the
186 attribute of the referenced object; therefore, a
190 would appear in the .ui file as
191 .Li <object class="GtkWindow" id="foo"> .
192 .Ss Any Widget (including widgets not mentioned above)
193 .Bl -tag -width "commands "
195 .Qq Fa name Ns Ic :set_sensitive Brq Ic 0 | 1
196 makes the widget grayed out
201 .Qq Fa name Ns Ic :set_visible Brq Ic 0 | 1
204 the widget, or makes it visible
207 .Qq Fa name Ns Ic :grab_focus
208 puts the keyboard focus onto the widget, if possible.
210 .Qq Fa name Ns Ic :set_size_request Bq Fa width height
211 sets the widget's minimum size to
215 Default is the widget's natural size.
218 .Fa name Ns Ic :style
219 .Bo Fa prop Ic : Ns Fa val Ns Bo Ic ; Fa prop Ic : Ns Fa val ... Bc Bc
223 of the widget style to
225 Properties not explicitly specified are reset to their default values.
227 .Bl -dash -offset indent -compact
229 .Qq Li label1:style font:Bold 11; background-color:green
231 .Qq Li label1:style font-style:italic; font-weight:bold; color:blue
233 .Qq Li frame1:style border-color:red yellow; border-width:5px
235 .Qq Li frame1:style border-radius:10px; transition:10s
237 For a description of possible color notations see
240 .Qq Fa name Ns Ic :set_tooltip_text Bq Fa text
241 sets the widget's tooltip
243 Default is disabling the tooltip.
245 .Qq Fa name Ns Ic :force
246 simulates a click on the
248 d widget, triggering a response as described with the widgets below.
250 .Bl -dash -offset indent -compact
252 The command is ignored by
260 .Sx GtkTreeViewColumn ;
262 .Sx GtkCalendar , GtkEntry , GtkFileChooserButton , GtkScale ,
265 report the currently selected item;
270 just open their respective dialogs.
273 .Qq Fa name Ns Ic :load Fa file
280 is required but ignored.
282 commands may be nested but on attempts to read from the same file, the
285 is ignored. There is also a
292 .Qq Fa name Ns Ic :main_quit
293 kills the user interface. A non-empty
295 is required but ignored.
298 .Bl -tag -width "commands "
300 .Qq Fa name Ns Ic :set_label Fa string
301 replaces the button text with
304 .Qq Fa name Ns Ic \&:clicked
307 s with names ending in
308 .Ic _ok , _apply , _cancel , _send_text ,
311 may work differently; see
312 .Sx GtkDialog , GtkFileChooserDialog ,
318 .Bl -tag -width "commands "
320 .Qq Fa name Ns Ic :select_date Fa yyyy Ns Ic - Ns Fa mm Ns Ic - Ns Fa dd
321 selects the date on the calendar.
323 .Qq Fa name Ns Ic :mark_day Fa day
328 .Qq Fa name Ns Ic :clear_marks
329 unmarks all days on the calendar.
331 .Qq Fa name Ns Ic \&:clicked Fa yyyy Ns Ic - Ns Fa mm Ns Ic - Ns Fa dd
333 .Qq Fa name Ns Ic \&:doubleclicked Fa yyyy Ns Ic - Ns Fa mm Ns Ic - Ns Fa dd
336 .Bl -tag -width "commands "
338 .Qq Fa name Ns Ic :set_active Brq Ic 0 | 1
339 switches the check mark off
344 .Qq Fa name Ns Ic :set_label Fa string
345 replaces the button text with
348 .Qq Fa name Ns Ic \&:1
350 .Qq Fa name Ns Ic \&:0
354 .Bl -tag -width "commands "
356 .Qq Fa name Ns Ic :set_color Fa color
357 preselects the color.
360 .Bl -dash -offset indent -compact
362 a standard X11 color name, like
363 .Qq Li Dark Sea Green ,
365 a hexadecimal value in the form
366 .Ic # Ns Fa rgb , Ic # Ns Fa rrggbb , Ic # Ns Fa rrrgggbbb ,
368 .Ic # Ns Fa rrrrggggbbbb ,
370 an RGB color in the form
371 .Ic rgb( Ns Fa red Ns Ic \&, Ns Fa green Ns Ic \&, Ns Fa blue Ns Ic \&) ,
374 an RGBA color in the form
375 .Ic rgba( Ns Fa red Ns Ic \&, Ns Fa green Ns Ic \&, Ns
376 .Fa blue Ns Ic \&, Ns Fa alpha Ns Ic \&) .
379 .Qq Fa name Ns Ic \&:color Ic rgb( Ns Fa red Ns Ic \&, Ns Fa green Ns Ic \&, Ns Fa blue Ns Ic \&)
381 .Qq Fa name Ns Ic \&:color Ic rgba( Ns Fa red Ns Ic \&, Ns Fa green Ns Ic \&, Ns Fa blue Ns Ic \&, Ns Fa alpha Ns Ic \&) .
385 lie between 0 and 255, and
394 .Bl -tag -width "commands "
396 .Qq Fa name Ns Ic :prepend_text Fa string
398 .Qq Fa name Ns Ic :append_text Fa string
399 prepend/append a new selectable item marked
402 .Qq Fa name Ns Ic :insert_text Fa position string
408 .Qq Fa name Ns Ic :remove Fa position
412 .Qq Fa entry_name Ns Ic \&:text Fa text ,
414 being the name of the child
427 .Fa foo Ns Ic _invoke .
435 .Fa foo Ns Ic _cancel
437 if the dialog is the sole window of the GUI and therefore named
448 it will take care of hiding the dialog window.
449 .Bl -tag -width "commands "
451 .Qq Fa name Ns Ic :set_title Fa string
452 replaces the text in the title bar with
455 .Qq Fa name Ns Ic :resize Bq Fa width height
456 changes the size of the dialog window to
460 pixels if specified, or to the default size.
462 .Qq Fa name Ns Ic :move Fa x y
463 moves the dialog window to position
466 .Qq Fa name Ns Ic :fullscreen
468 .Qq Fa name Ns Ic :unfullscreen
469 switch fullscreen mode on and off.
474 Most drawing commands expect an
476 parameter (an arbitrary non-negative integer) which can be used to reference the
477 command for later removal.
479 All coordinates refer to a left-handed coordinate system with its
480 origin in the upper-left corner.
481 .Bl -tag -width "commands "
483 .Qq Fa name Ns Ic :arc Fa id x y radius angle1 angle2
484 adds a circular arc to the current path. The arc is centered at
486 and proceeds clockwise from
494 .Qq Fa name Ns Ic :arc_negative Fa id x y radius angle1 angle2
495 adds a circular arc to the current path. The arc is centered at
497 and proceeds counterclockwise from
505 .Qq Fa name Ns Ic :close_path Fa id
506 adds a line segment from the current point to the point most recently
508 .Fa name Ns Ic :move_to
510 .Fa name Ns Ic :rel_move_to .
512 .Qq Fa name Ns Ic :curve_to Fa id x1 y1 x2 y2 x3 y3
513 adds a cubic Bezier spline from the current point to
521 .Qq Fa name Ns Ic :fill Fa id
522 fills the current path and clears it.
524 .Qq Fa name Ns Ic :fill_preserve Fa id
525 fills the current path without clearing it.
527 .Qq Fa name Ns Ic :line_to Fa id x y
528 adds a line from the current point to
531 .Qq Fa name Ns Ic :move_to Fa id x y
532 sets the current point to
535 .Qq Fa name Ns Ic :rectangle Fa id x y width height
536 adds a rectangle to the current path. The top left corner is at
539 .Qq Fa name Ns Ic :refresh
544 .Qq Fa name Ns Ic :rel_curve_to Fa id dx1 dy1 dx2 dy2 dx3 dy3
545 adds a cubic Bezier spline from the current point to
551 as control points. All coordinates are offsets relative to the
554 .Qq Fa name Ns Ic :rel_line_to Fa id dx dy
555 adds a line from the current point to a point offset from there by
558 .Qq Fa name Ns Ic :rel_move_to Fa id dx dy
559 moves the current point by
562 .Qq Fa name Ns Ic :remove Fa id
563 removes the elements with
566 .Ic GtkDrawingArea Fa name .
568 .Qq Fa name Ns Ic :set_dash Fa id l
569 sets the dash pattern to
575 .Qq Fa name Ns Ic :set_dash Fa id l1on l1off l2on l2off ...
576 resets the dash pattern to a line with arbitrary on/off portions.
578 .Qq Fa name Ns Ic :set_dash Fa id
579 resets the dash pattern to a solid line.
581 .Qq Fa name Ns Ic :set_font_size Fa id size
582 sets the font size for subsequent calls of
583 .Fa name Ns Ic :show_text .
585 .Qq Fa name Ns Ic :set_line_cap Fa id Brq Ic butt | round | square
586 sets the line cap style.
588 .Qq Fa name Ns Ic :set_line_join Fa id Brq Ic miter | round | bevel
589 sets the line junction style.
591 .Qq Fa name Ns Ic :set_line_width Fa id width
594 .Qq Fa name Ns Ic :set_source_rgba Fa id color
597 is in the format used with
600 .Qq Fa name Ns Ic :show_text Fa id text
603 beginning at the current point.
605 .Qq Fa name Ns Ic :stroke Fa id
606 strokes the current path and clears it.
608 .Qq Fa name Ns Ic :stroke_preserve Fa id
609 strokes the current path without clearing it.
614 .Bl -tag -width "commands "
616 .Qq Fa name Ns Ic :set_text Fa string
617 replaces the user-editable text with
620 .Qq Fa name Ns Ic :set_placeholder_text Fa string
623 that is displayed when the entry is empty and unfocused.
625 .Qq Fa name Ns Ic \&:text Fa text ,
626 once for each change of
631 are mouse pointer coordinates relative to the
633 .Bl -tag -width "commands "
637 .Qq Fa name Ns Ic \&:button_press Fa b x y ,
638 .Qq Fa name Ns Ic \&:button_release Fa b x y
641 is the mouse button (normally 1, 2, or 3 for the left, middle, and
642 right button; others may exist).
644 .Qq Fa name Ns Ic \&:motion Fa x y
645 is reported repeatedly while the mouse is being moved with a button
648 .Qq Fa name Ns Ic \&:key_press Fa key ,
651 .Pq e.g. Li Control_L , Tab , a .
654 .Bl -tag -width "commands "
656 .Qq Fa name Ns Ic :set_label Fa string
657 replaces the expander label text with
660 .Qq Fa name Ns Ic :set_expanded Brq Ic 0 | 1
663 the child widget, or makes it visible
668 .Ss GtkFileChooserButton
669 .Bl -tag -width "commands "
671 .Qq Fa name Ns Ic :set_filename Fa path
674 to the extent it exists.
676 .Qq Fa name Ns Ic \&:file Fa pathname
677 if the selection has changed.
679 .Ss GtkFileChooserDialog
681 .Ic GtkFileChooserDialog
689 .Fa foo Ns Ic _invoke .
692 .Ic GtkFileChooserDialog
699 if the dialog is the sole window of the GUI and therefore named
704 .Ic GtkFileChooserDialog
709 .Fa foo Ns Ic _cancel
711 if the dialog is the sole window of the GUI and therefore named
716 .Ic GtkFileChooserDialog
723 if the dialog is the sole window of the GUI and therefore named
726 .Bl -tag -width "commands "
728 .Qq Fa name Ns Ic :set_filename Fa path
731 to the extent it exists.
733 .Qq Fa name Ns Ic :set_current_name Fa string
736 the suggested filename, which may not yet exist.
738 should either resemble an absolute path, or the
740 must be set separately by
741 .Fa name Ns Ic :set_filename Fa directory .
743 .Qq Fa name Ns Ic :set_title Fa string
744 replaces the text in the title bar with
747 .Qq Fa name Ns Ic :resize Bq Fa width height
748 changes the size of the dialog window to
752 pixels if specified, or to the default size.
754 .Qq Fa name Ns Ic :move Fa x y
755 moves the dialog window to position
758 .Qq Fa name Ns Ic :fullscreen
760 .Qq Fa name Ns Ic :unfullscreen
761 switch fullscreen mode on and off.
763 .Qq Fa name Ns Ic :file Fa pathname
765 .Qq Fa name Ns Ic :folder Fa pathname
768 .Bl -tag -width "commands "
770 .Qq Fa name Ns Ic :set_font_name Fa fontname
773 .Qq Fa name Ns Ic \&:font Fa fontname
776 .Bl -tag -width "commands "
778 .Qq Fa name Ns Ic :set_label Fa text
779 replaces the frame label text with
785 .Bl -tag -width "commands "
787 .Qq Fa name Ns Ic :set_from_icon_name Fa icon-name
788 replaces the image with one of the standard icons.
790 .Qq Fa name Ns Ic :set_from_file Fa path
791 replaces the image by the one found at
797 .Bl -tag -width "commands "
799 .Qq Fa name Ns Ic :set_text Fa string
800 replaces the label text with
805 .Ss GtkMenuItem, GtkImageMenuItem
806 .Bl -tag -width "commands "
815 .Fa foo Ns Ic _invoke
819 .Sx GtkFileChooserDialog
822 if it exists. If there isn't any dialog attached to the
825 .Qq Fa name Ns Ic \&:active Fa label .
828 .Bl -tag -width "commands "
830 .Qq Fa name Ns Ic :set_current_page Fa n
831 switches to zero-based page number
836 .Ss GtkPrintUnixDialog
837 .Bl -tag -width "commands "
839 .Qq Fa name Ns Ic :print Fa file.ps
840 opens the print dialog. Pressing the
844 to the printer the user selected in the dialog.
849 .Bl -tag -width "commands "
851 .Qq Fa name Ns Ic :set_fraction Fa x
852 moves the progress bar to
854 .Pq between 0 and 1 .
856 .Qq Fa name Ns Ic :set_text Bq Fa string
857 replaces the text of the progress bar with
859 Default is the progress percentage.
864 .Bl -tag -width "commands "
866 .Qq Fa name Ns Ic :set_active 1
867 switches the button on. All other buttons of the same group will go off
870 .Qq Fa name Ns Ic :set_label Fa string
871 replaces the button text with
874 .Qq Fa name Ns Ic \&:1
876 .Qq Fa name Ns Ic \&:0
880 .Bl -tag -width "commands "
882 .Qq Fa name Ns Ic :set_value Fa x
883 moves the slider to value
886 .Qq Fa name Ns Ic \&:value Fa floating_point_text
888 .Ss GtkScrolledWindow
889 .Bl -tag -width "commands "
891 .Qq Fa name Ns Ic :hscroll Fa position
893 .Qq Fa name Ns Ic :vscroll Fa position
896 to the left or top edge of the
897 .Ic GtkScrolledWindow ,
900 .Qq Fa name Ns Ic :hscroll_to_range Fa pos_0 pos_1
902 .Qq Fa name Ns Ic :vscroll_to_range Fa pos_0 pos_1
903 scroll, if necessary, the range between
908 .Ic GtkScrolledWindow .
909 If the range is greater than the window, the initial part of the range
916 may be unsupported by Glade, but its definition can be inserted
917 manually into the GtkBuilder (.ui) file:
920 \ \ \ \ <object class="GtkSocket" id="socket1">
921 \ \ \ \ \ \ <property name="visible">True</property>
922 \ \ \ \ \ \ <property name="can_focus">True</property>
925 \ \ \ \ \ \ <property name="expand">True</property>
926 \ \ \ \ \ \ <property name="fill">True</property>
927 \ \ \ \ \ \ <property name="position">1</property>
931 .Bl -tag -width "commands "
933 .Qq Fa name Ns Ic :id
934 requests a feedback message containing the socket
937 .Qq Fa name Ns Ic :id Fa xid
938 can be used by another process to XEmbed its widgets into the
941 .Qq Fa name Ns Ic :plug-added ,
946 Notification that the other process has inserted its widgets into or
947 removed them from the
951 .Bl -tag -width "commands "
953 .Qq Fa name Ns Ic :set_text Fa string
954 sets the selected value to
957 .Qq Fa name Ns Ic \&:text Fa text
960 .Bl -tag -width "commands "
962 .Qq Fa name Ns Ic :start
964 .Qq Fa name Ns Ic :stop
965 start and stop the spinner.
972 parameter is an arbitrary non-negative integer.
973 .Bl -tag -width "commands "
975 .Qq Fa name Ns Ic :push_id Fa id string ,
976 .Qq Fa name Ns Ic :push Fa string
981 or 0, respectively, and display it in the statusbar.
983 .Qq Fa name Ns Ic :pop_id Fa id ,
984 .Qq Fa name Ns Ic :pop
985 remove the latest entry associated with context id
987 or 0, respectively, from the statusbar.
989 .Qq Fa name Ns Ic :remove_all
990 empties the statusbar.
995 .Bl -tag -width "commands "
997 .Qq Fa name Ns Ic :set_active Brq Ic 0 | 1
1003 .Qq Fa name Ns Ic \&:1
1005 .Qq Fa name Ns Ic \&:0
1009 There should be a dedicated
1011 for sending (parts of) the text.
1019 .Fa foo Ns Ic _send_text
1020 will send the content of the
1025 .Fa foo Ns Ic _send_selection
1026 will send the highlighted part the
1028 .Bl -tag -width "commands "
1030 .Qq Fa name Ns Ic :set_text Fa string
1031 replaces the user-editable text with (potentially empty)
1034 .Qq Fa name Ns Ic :delete
1037 .Qq Fa name Ns Ic :insert_at_cursor Fa string
1042 .Qq Fa name Ns Ic :place_cursor Brq Fa position | Ic end
1043 places the text cursor at
1045 or at the end of the text.
1047 .Qq Fa name Ns Ic :place_cursor_at_line Fa line
1048 places the text cursor at the beginning of
1051 .Qq Fa name Ns Ic :scroll_to_cursor
1052 scrolls to the cursor position if necessary.
1054 .Qq Fa name Ns Ic :save Fa file
1059 command containing the text.
1061 .Qq Fa button_name Ns Ic :text Fa text ,
1063 being the name of the
1069 and backslashes are replaced by
1073 .Bl -tag -width "commands "
1075 .Qq Fa name Ns Ic :set_active Brq Ic 0 | 1
1076 switches the button off
1081 .Qq Fa name Ns Ic :set_label Fa string
1082 replaces the button text with
1085 .Qq Fa name Ns Ic \&:1
1087 .Qq Fa name Ns Ic \&:0
1092 can deal with columns of type
1093 .Ic gboolean , gint , guint , glong , gulong , gint64 , guint64 , gfloat , gdouble ,
1100 refer to the underlying model
1103 .Ic GtkTreeStore ) .
1105 is a sequence of one or more colon-separated integers, e.g.
1109 .Bl -tag -width "commands "
1111 .Qq Fa name Ns Ic :set Fa row column data
1112 replaces the content at
1116 (which should be compatible with the type of
1118 If necessary, new tree nodes are created to obtain the minimal tree
1119 structure needed to support
1122 .Qq Fa name Ns Ic :insert_row Brq Fa row Bo Ic as_child Bc | Ic end
1123 inserts a new, empty row; either as a sibling of
1129 or at the end of the list, respectively.
1131 .Qq Fa name Ns Ic :move_row Fa origin Brq Fa destination | Ic end
1134 within its current level to
1138 .Qq Fa name Ns Ic :remove_row Fa row
1139 removes the row at position
1142 .Qq Fa name Ns Ic :clear
1145 .Qq Fa name Ns Ic :expand Fa row
1146 expands one level of the subtree below
1149 .Qq Fa name Ns Ic :expand_all Bq Fa row
1150 expands the subtree below
1154 .Qq Fa name Ns Ic :collapse Bq Fa row
1155 collapses the subtree below
1159 .Qq Fa name Ns Ic :set_cursor Bq Fa row
1164 .Qq Fa name Ns Ic :scroll Fa row column
1169 .Qq Fa name Ns Ic :save Fa file
1170 stores the content of the underlying model as a sequence of
1175 .Qq Fa name Ns Ic \&:clicked
1177 .Qq Fa name Ns Ic \&: Ns Fa column_type row column value ,
1178 one message per cell in the underlying model for each selected row; or
1180 .Qq Fa name Ns Ic \&: Ns Fa column_type row column new_value ,
1185 .Ss GtkTreeViewColumn
1186 .Bl -tag -width "commands "
1190 .Qq Fa name Ns Ic \&:clicked
1193 .Bl -tag -width "commands "
1195 .Qq Fa name Ns Ic :set_title Fa string
1196 replaces the text in the title bar with
1199 .Qq Fa name Ns Ic :resize Bq Fa width height
1200 changes the window size to
1204 pixels if specified, or to the default size.
1206 .Qq Fa name Ns Ic :move Fa x y
1207 moves the window to position
1210 .Qq Fa name Ns Ic :fullscreen
1212 .Qq Fa name Ns Ic :unfullscreen
1213 switch fullscreen mode on and off.
1218 .Ss Discovering Pipeglade Interactively
1219 Suppose the interface in
1222 .Sx GtkLabel Li label1
1224 .Sx GtkButton Li button1 .
1228 .Sx GtkButton , Qq button1:clicked
1229 will be reported on the terminal. Typing
1230 .Dl label1:set_text Button Label
1231 will change the text shown on the label into
1233 .Ss One-Shot File Dialog
1234 Suppose the interface in
1235 .Pa ./simple_open.ui
1237 .Sx GtkFileChooserDialog
1244 .Dl pipeglade -u simple_open.ui
1245 will open the dialog; pressing
1247 will close it after sending the selected filename to
1249 .Ss One-Shot User Notification
1251 .Pa ./simple_dialog.ui
1253 .Sx GtkLabel Li label1 ,
1255 .Dl pipeglade -u simple_dialog.ui <<< \e
1256 .Dl \ \ \ \ \&"label1:set_text NOW READ THIS!\&"
1257 will set the label text accordingly and wait for user input.
1258 .Ss Continuous Input
1259 The following shell command displays a running clock:
1261 .Dl \ \ \ \ echo \&"label1:set_text `date`\&";
1262 .Dl \ \ \ \ sleep 1;
1263 .Dl done | pipeglade -u simple_dialog.ui
1264 .Ss Continuous Input and Output
1265 The following shell script fragment sets up
1267 for continuous communication with another program,
1269 .Dl pipeglade -i in.fifo -o out.fifo &
1270 .Dl # wait for in.fifo and out.fifo to appear
1271 .Dl while test \& ! \e( -e in.fifo -a -e out.fifo \e); do :; done
1272 .Dl main_prog <out.fifo >in.fifo
1275 exits 0 on success, and >0 if an error occurs.
1287 .An Bert Burgemeister Aq trebbu@googlemail.com .
1289 Please report them to the author.