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
34 .Op Fl u Ar builder-file
35 .Op Fl e Ar parent-xid
38 .Op Fl -display Ar X-server
43 is a helper program that displays graphical user
44 interfaces for other programs.
45 It renders the GUI definition found in a GtkBuilder XML file
46 (typically created using the
48 interface designer), and communicates with the main program solely
49 through plain text messages via pipes or fifos.
50 It provides access to a subset of features of a subset of widgets of
52 Simple one-shot dialogs as well as more complex, long-running programs
62 if necessary, and uses it for command input.
64 A command is a line of text.
66 .Qq Ar id Ns Cm \&: Ns Ar action Bq Ar data ,
68 being the name of the receiving widget;
70 is separated from the rest of the command by a single whitespace
72 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.
82 Invalid commands are reported on
84 and are otherwise ignored.
87 for applicable commands.
91 exists but is not a named pipe.
94 is deleted upon successful program termination.
96 Default command input is
101 if necessary, and uses it for output of feedback messages from the
102 graphical user interface.
104 A feedback message is a line of text; its format is
105 .Qq Ar id Ns Cm \&: Ns Ar info Bq Ar data ,
107 being the name of the sending widget.
110 for possible feedback messages.
114 exists but is not a named pipe.
117 is deleted upon successful program termination.
119 Default feedback-message output is
124 in the background after printing its process ID to
127 It is an error if option
134 .It Fl u Ar builder-file
135 Displays the graphical user interface
137 which should be created using the
139 user interface designer and saved in GtkBuilder (.ui) format.
140 Widget ids should be alphanumeric, including underscores, and the
141 main window must must be given the id
146 .It Fl e Ar parent-xid
147 Embeds the main window into the XEmbed socket
151 For each command, append to
157 is the number of microseconds elapsed during
162 are separated by a tab character.
174 .It Fl -display Ar X-server
177 for user interaction.
179 Prints a help message and exits.
181 Prints the versions of the underlying GTK+ and cairo libraries and
189 The widget classes able to communicate through
196 .Sx GtkComboBoxText ,
202 .Sx GtkFileChooserButton ,
203 .Sx GtkFileChooserDialog ,
208 .Sx GtkMenuItem, GtkImageMenuItem ,
210 .Sx GtkPrintUnixDialog ,
214 .Sx GtkScrolledWindow
221 .Sx GtkToggleButton ,
223 .Sx GtkTreeViewColumn ,
228 references a widget by the
230 attribute it is given in Glade.
238 .Dl <object class="GtkWindow" id="foo"> .
239 .Ss Any Widget (including widgets not mentioned above)
240 .Bl -tag -width "commands "
242 .Qq Ar id Ns Cm :set_sensitive Brq Cm 0 | 1
243 makes the widget grayed out
248 .Qq Ar id Ns Cm :set_visible Brq Cm 0 | 1
251 the widget, or makes it visible
254 .Qq Ar id Ns Cm :grab_focus
255 puts the keyboard focus onto the widget, if possible.
257 .Qq Ar id Ns Cm :set_size_request Bq Ar width height
258 sets the widget's minimum size to
262 Default is the widget's natural size.
266 .Bo Ar prop Ns Cm \&: Ns Ar val Ns Bo Cm \&; Ar prop Ns Cm \&: Ns Ar val ... Bc Bc
270 of the widget style to
272 Properties not explicitly specified are reset to their default values.
274 .Bl -dash -offset indent -compact
276 .Ql label1:style font:Bold 11; background-color:green
278 .Ql label1:style font-style:italic; font-weight:bold; color:blue
280 .Ql frame1:style border-color:red yellow; border-width:5px
282 .Ql frame1:style border-radius:10px; transition:10s
284 For a description of possible color notations see
287 .Qq Ar id Ns Cm :set_tooltip_text Bq Ar text
288 sets the widget's tooltip
290 Default is disabling the tooltip.
292 .Qq Ar id Ns Cm :force
293 simulates a click on widget
295 triggering a response as described with the widgets below.
297 .Bl -dash -offset indent -compact
299 The command is ignored by
307 .Sx GtkTreeViewColumn ;
309 .Sx GtkCalendar , GtkEntry , GtkFileChooserButton , GtkScale ,
312 report the currently selected item;
317 just open their respective dialogs.
320 .Qq Ar id Ns Cm :load Ar file
327 is required but ignored.
329 commands may be nested but on attempts to read from the same file, the
340 .Qq Ar id Ns Cm :main_quit
341 kills the user interface.
344 is required but ignored.
347 .Bl -tag -width "commands "
349 .Qq Ar id Ns Cm :set_label Ar string
350 replaces the button text with
353 .Qq Ar id Ns Cm \&:clicked
357 .Cm _ok , _apply , _cancel , _send_text ,
360 may work differently; see
361 .Sx GtkDialog , GtkFileChooserDialog ,
367 .Bl -tag -width "commands "
369 .Qq Ar id Ns Cm :select_date Ar yyyy Ns Cm - Ns Ar mm Ns Cm - Ns Ar dd
370 selects the date on the calendar.
372 .Qq Ar id Ns Cm :mark_day Ar day
377 .Qq Ar id Ns Cm :clear_marks
378 unmarks all days on the calendar.
380 .Qq Ar id Ns Cm \&:clicked Ar yyyy Ns Cm - Ns Ar mm Ns Cm - Ns Ar dd
382 .Qq Ar id Ns Cm \&:doubleclicked Ar yyyy Ns Cm - Ns Ar mm Ns Cm - Ns Ar dd
385 .Bl -tag -width "commands "
387 .Qq Ar id Ns Cm :set_active Brq Cm 0 | 1
388 switches the check mark off
393 .Qq Ar id Ns Cm :set_label Ar string
394 replaces the button text with
403 .Bl -tag -width "commands "
405 .Qq Ar id Ns Cm :set_color Ar color
406 preselects the color.
409 .Bl -dash -offset indent -compact
411 a standard X11 color name, like
414 a hexadecimal value in the form
415 .Cm # Ns Ar rgb , Cm # Ns Ar rrggbb , Cm # Ns Ar rrrgggbbb ,
417 .Cm # Ns Ar rrrrggggbbbb ,
419 an RGB color in the form
420 .Cm rgb( Ns Ar red Ns Cm \&, Ns Ar green Ns Cm \&, Ns Ar blue Ns Cm \&) ,
423 an RGBA color in the form
424 .Cm rgba( Ns Ar red Ns Cm \&, Ns Ar green Ns Cm \&, Ns
425 .Ar blue Ns Cm \&, Ns Ar alpha Ns Cm \&) .
428 .Qq Ar id Ns Cm \&:color Cm rgb( Ns Ar red Ns Cm \&, Ns Ar green Ns Cm \&, Ns Ar blue Ns Cm \&)
430 .Qq Ar id Ns Cm \&:color Cm rgba( Ns Ar red Ns Cm \&, Ns Ar green Ns Cm \&, Ns Ar blue Ns Cm \&, Ns Ar alpha Ns Cm \&) .
434 lie between 0 and 255, and
443 .Bl -tag -width "commands "
445 .Qq Ar id Ns Cm :prepend_text Ar string
447 .Qq Ar id Ns Cm :append_text Ar string
448 prepend/append a new selectable item marked
451 .Qq Ar id Ns Cm :insert_text Ar position string
457 .Qq Ar id Ns Cm :remove Ar position
461 .Qq Ar entry_id Ns Cm \&:text Ar text ,
463 being the id of the child
476 .Ar foo Ns Cm _invoke .
484 .Ar foo Ns Cm _cancel
486 if the dialog is the sole window of the GUI and therefore named
497 it will take care of hiding the dialog window.
498 .Bl -tag -width "commands "
500 .Qq Ar id Ns Cm :set_title Ar string
501 replaces the text in the title bar with
504 .Qq Ar id Ns Cm :resize Bq Ar width height
505 changes the size of the dialog window to
509 pixels if specified, or to the default size.
511 .Qq Ar id Ns Cm :move Ar x y
512 moves the dialog window to position
515 .Qq Ar id Ns Cm :fullscreen
517 .Qq Ar id Ns Cm :unfullscreen
518 switch fullscreen mode on and off.
520 .Qq Ar id Ns Cm \&:closed
523 window was closed by the window manager.
526 Drawing commands expect a context parameter
528 (an arbitrary non-negative integer) which can be used to
529 reference the command for later removal.
531 The default coordinate system is a left-handed system with its origin
532 in the upper-left corner.
533 Angles increase from the positive X axis towards the positve Y axis
534 .Pq clockwise in the default system .
535 .Bl -tag -width "commands "
537 .Qq Ar id Ns Cm :arc Ar n x y radius angle1 angle2
538 adds a circular arc to the current path.
539 The arc is centered at
547 .Qq Ar id Ns Cm :arc_negative Ar n x y radius angle1 angle2
548 adds a circular arc to the current path.
549 The arc is centered at
551 and proceeds in the direction of decreasing angles from
557 .Qq Ar id Ns Cm :close_path Ar n
558 adds a line segment from the current point to the point most recently
560 .Ar id Ns Cm :move_to
562 .Ar id Ns Cm :rel_move_to .
564 .Qq Ar id Ns Cm :curve_to Ar n x1 y1 x2 y2 x3 y3
565 adds a cubic Bezier spline from the current point to
572 If there is no current point, the curve will start at
575 .Qq Ar id Ns Cm :fill Ar n
576 fills the current path and clears it.
578 .Qq Ar id Ns Cm :fill_preserve Ar n
579 fills the current path without clearing it.
581 .Qq Ar id Ns Cm :line_to Ar n x y
582 adds a line from the current point to
584 or creates a new current point at
587 .Qq Ar id Ns Cm :move_to Ar n x y
588 sets the current point to
591 .Qq Ar id Ns Cm :rectangle Ar n x y width height
592 adds a rectangle to the current path.
593 The top left corner is at
596 .Qq Ar id Ns Cm :rel_curve_to Ar n dx1 dy1 dx2 dy2 dx3 dy3
597 adds a cubic Bezier spline from the current point to
604 All coordinates are offsets relative to the current point.
606 .Qq Ar id Ns Cm :rel_line_to Ar n dx dy
607 adds a line from the current point to a point offset from there by
610 .Qo Ar id Ns Cm :rel_move_for Ar n Brq Cm c | e | n | ne | nw | s | se | sw | w
613 moves the current point such that
614 .Qq Ar id Ns Cm :show_text Ar n text
615 will place the specified reference point of
617 on the original current point.
619 .Qq Ar id Ns Cm :rel_move_to Ar n dx dy
620 moves the current point by
623 .Qq Ar id Ns Cm :remove Ar n
624 removes the elements with context parameter
627 .Cm GtkDrawingArea Ar id .
629 .Qq Ar id Ns Cm :rotate Ar n Ar angle
630 rotates the user space axes by
634 .Qq Ar id Ns Cm :scale Ar n Ar sx sy
635 scales the user space axes by
638 .Qq Ar id Ns Cm :set_dash Ar n l
639 sets the dash pattern to
645 .Qq Ar id Ns Cm :set_dash Ar n l1on l1off l2on l2off ...
646 resets the dash pattern to a line with arbitrary on/off portions.
648 .Qq Ar id Ns Cm :set_dash Ar n
649 resets the dash pattern to a solid line.
651 .Qo Ar id Ns Cm :set_font_family Ar n Brq Cm normal | italic | oblique
652 .Brq Cm normal | bold
655 sets the font face for subsequent calls of
656 .Ar id Ns Cm :show_text .
658 .Qq Ar id Ns Cm :set_font_size Ar n size
659 sets the font size for subsequent calls of
660 .Ar id Ns Cm :show_text .
662 .Qq Ar id Ns Cm :set_line_cap Ar n Brq Cm butt | round | square
663 sets the line cap style.
667 .Qq Ar id Ns Cm :set_line_join Ar n Brq Cm miter | round | bevel
668 sets the line junction style.
672 .Qq Ar id Ns Cm :set_line_width Ar n width
678 .Qq Ar id Ns Cm :set_source_rgba Ar n color
681 is in the format used with
684 .Qq Ar id Ns Cm :show_text Ar n text
687 beginning at the current point.
689 .Qq Ar id Ns Cm :stroke Ar n
690 strokes the current path and clears it.
692 .Qq Ar id Ns Cm :stroke_preserve Ar n
693 strokes the current path without clearing it.
695 .Qq Ar id Ns Cm :transform Ar n Bq Ar xx yx xy yy x0 y0
696 modifies the current transformation matrix such that
698 .Dl Va x' Li = Ar xx Va x Li + Ar xy Va y Li + Ar x0 ,
699 .Dl Va y' Li = Ar yx Va y Li + Ar yy Va y Li + Ar y0 .
701 Default is resetting the current transformation matrix.
703 .Qq Ar id Ns Cm :translate Ar n Ar tx ty
704 translates the user space origin by
710 .Bl -tag -width "commands "
712 .Qq Ar id Ns Cm :set_text Ar string
713 replaces the user-editable text with
716 .Qq Ar id Ns Cm :set_placeholder_text Ar string
719 that is displayed when the entry is empty and unfocused.
721 .Qq Ar id Ns Cm \&:text Ar text ,
722 once for each change of
727 are mouse pointer coordinates relative to the
729 .Bl -tag -width "commands "
733 .Qq Ar id Ns Cm \&:button_press Ar b x y ,
734 .Qq Ar id Ns Cm \&:button_release Ar b x y
737 is the mouse button (normally 1, 2, or 3 for the left, middle, and
738 right button; others may exist).
740 .Qq Ar id Ns Cm \&:motion Ar x y
741 is reported repeatedly while the mouse is being moved with a button
744 .Qq Ar id Ns Cm \&:key_press Ar key ,
754 .Bl -tag -width "commands "
756 .Qq Ar id Ns Cm :set_label Ar string
757 replaces the expander label text with
760 .Qq Ar id Ns Cm :set_expanded Brq Cm 0 | 1
763 the child widget, or makes it visible
768 .Ss GtkFileChooserButton
769 .Bl -tag -width "commands "
771 .Qq Ar id Ns Cm :set_filename Ar path
774 to the extent it exists.
776 .Qq Ar id Ns Cm \&:file Ar pathname
777 if the selection has changed.
779 .Ss GtkFileChooserDialog
781 .Cm GtkFileChooserDialog
789 .Ar foo Ns Cm _invoke .
792 .Cm GtkFileChooserDialog
799 if the dialog is the sole window of the GUI and therefore named
804 .Cm GtkFileChooserDialog
809 .Ar foo Ns Cm _cancel
811 if the dialog is the sole window of the GUI and therefore named
816 .Cm GtkFileChooserDialog
823 if the dialog is the sole window of the GUI and therefore named
826 .Bl -tag -width "commands "
828 .Qq Ar id Ns Cm :set_filename Ar path
831 to the extent it exists.
833 .Qq Ar id Ns Cm :set_current_name Ar string
836 the suggested filename, which may not yet exist.
838 should either resemble an absolute path, or the
840 must be set separately by
841 .Ar id Ns Cm :set_filename Ar directory .
843 .Qq Ar id Ns Cm :set_title Ar string
844 replaces the text in the title bar with
847 .Qq Ar id Ns Cm :resize Bq Ar width height
848 changes the size of the dialog window to
852 pixels if specified, or to the default size.
854 .Qq Ar id Ns Cm :move Ar x y
855 moves the dialog window to position
858 .Qq Ar id Ns Cm :fullscreen
860 .Qq Ar id Ns Cm :unfullscreen
861 switch fullscreen mode on and off.
863 .Qq Ar id Ns Cm :file Ar pathname
865 .Qq Ar id Ns Cm :folder Ar pathname
867 .Qq Ar id Ns Cm \&:closed
869 .Cm GtkFileChooserDialog
870 window was closed by the window manager.
873 .Bl -tag -width "commands "
875 .Qq Ar id Ns Cm :set_font_name Ar fontname
878 .Qq Ar id Ns Cm \&:font Ar fontname
881 .Bl -tag -width "commands "
883 .Qq Ar id Ns Cm :set_label Ar text
884 replaces the frame label text with
890 .Bl -tag -width "commands "
892 .Qq Ar id Ns Cm :set_from_icon_name Ar icon-name
893 replaces the image with one of the standard icons.
895 .Qq Ar id Ns Cm :set_from_file Ar path
896 replaces the image by the one found at
902 .Bl -tag -width "commands "
904 .Qq Ar id Ns Cm :set_text Ar string
905 replaces the label text with
910 .Ss GtkMenuItem, GtkImageMenuItem
911 .Bl -tag -width "commands "
920 .Ar foo Ns Cm _invoke
924 .Sx GtkFileChooserDialog
928 If there isn't any dialog attached to the
931 .Qq Ar id Ns Cm \&:active Ar label .
934 .Bl -tag -width "commands "
936 .Qq Ar id Ns Cm :set_current_page Ar n
937 switches to zero-based page number
942 .Ss GtkPrintUnixDialog
943 .Bl -tag -width "commands "
945 .Qq Ar id Ns Cm :print Ar file.ps
946 opens the print dialog.
951 to the printer the user selected in the dialog.
953 .Qq Ar id Ns Cm \&:closed
955 .Cm GtkPrintUnixDialog
956 window was closed by the window manager.
959 .Bl -tag -width "commands "
961 .Qq Ar id Ns Cm :set_fraction Ar x
962 moves the progress bar to
964 .Pq between 0 and 1 .
966 .Qq Ar id Ns Cm :set_text Bq Ar string
967 replaces the text of the progress bar with
969 Default is the progress percentage.
974 .Bl -tag -width "commands "
976 .Qq Ar id Ns Cm :set_active 1
977 switches the button on.
978 All other buttons of the same group will go off automatically.
980 .Qq Ar id Ns Cm :set_label Ar string
981 replaces the button text with
990 .Bl -tag -width "commands "
992 .Qq Ar id Ns Cm :set_value Ar x
993 moves the slider to value
996 .Qq Ar id Ns Cm \&:value Ar floating_point_text
998 .Ss GtkScrolledWindow
999 .Bl -tag -width "commands "
1001 .Qq Ar id Ns Cm :hscroll Ar position
1003 .Qq Ar id Ns Cm :vscroll Ar position
1006 to the left or top edge of the
1007 .Cm GtkScrolledWindow ,
1010 .Qq Ar id Ns Cm :hscroll_to_range Ar pos_0 pos_1
1012 .Qq Ar id Ns Cm :vscroll_to_range Ar pos_0 pos_1
1013 scroll, if necessary, the range between
1018 .Cm GtkScrolledWindow .
1019 If the range is greater than the window, the initial part of the range
1026 may be unsupported by Glade, but its definition can be inserted
1027 manually into the GtkBuilder
1030 .Bd -literal -offset indent
1032 <object class="GtkSocket" id="socket1">
1033 <property name="visible">True</property>
1034 <property name="can_focus">True</property>
1037 <property name="expand">True</property>
1038 <property name="fill">True</property>
1039 <property name="position">1</property>
1043 .Bl -tag -width "commands "
1046 requests a feedback message containing the socket
1049 .Qq Ar id Ns Cm :id Ar xid
1050 can be used by another process to XEmbed its widgets into the
1053 .Qq Ar id Ns Cm :plug-added ,
1058 Notification that the other process has inserted its widgets into or
1059 removed them from the
1063 .Bl -tag -width "commands "
1065 .Qq Ar id Ns Cm :set_text Ar string
1066 sets the selected value to
1069 .Qq Ar id Ns Cm \&:text Ar text
1072 .Bl -tag -width "commands "
1074 .Qq Ar id Ns Cm :start
1076 .Qq Ar id Ns Cm :stop
1077 start and stop the spinner.
1082 The context parameter
1084 is an arbitrary non-whitespace string.
1085 .Bl -tag -width "commands "
1087 .Qq Ar id Ns Cm :push_id Ar c string ,
1088 .Qq Ar id Ns Cm :push Ar string
1091 with context parameter
1095 respectively, and display it in the statusbar.
1097 .Qq Ar id Ns Cm :pop_id Ar c ,
1098 .Qq Ar id Ns Cm :pop
1099 remove the latest entry associated with context parameter
1103 respectively, from the statusbar.
1105 .Qq Ar id Ns Cm :remove_all_id Ar c ,
1106 .Qq Ar id Ns Cm :remove_all
1107 remove the entries associated with context parameter
1111 respectively, from the statusbar.
1116 .Bl -tag -width "commands "
1118 .Qq Ar id Ns Cm :set_active Brq Cm 0 | 1
1119 turns the switch off
1124 .Qq Ar id Ns Cm \&:1
1126 .Qq Ar id Ns Cm \&:0
1130 There should be a dedicated
1132 for sending (parts of) the text.
1140 .Ar foo Ns Cm _send_text
1141 will send the content of the
1146 .Ar foo Ns Cm _send_selection
1147 will send the highlighted part the
1149 .Bl -tag -width "commands "
1151 .Qq Ar id Ns Cm :set_text Ar string
1152 replaces the user-editable text with (potentially empty)
1155 .Qq Ar id Ns Cm :delete
1158 .Qq Ar id Ns Cm :insert_at_cursor Ar string
1163 .Qq Ar id Ns Cm :place_cursor Brq Ar position | Cm end
1164 places the text cursor at
1166 or at the end of the text.
1168 .Qq Ar id Ns Cm :place_cursor_at_line Ar line
1169 places the text cursor at the beginning of
1172 .Qq Ar id Ns Cm :scroll_to_cursor
1173 scrolls to the cursor position if necessary.
1175 .Qq Ar id Ns Cm :save Ar file
1180 command containing the text.
1182 .Qq Ar button_id Ns Cm :text Ar text ,
1190 and backslashes are replaced by
1194 .Bl -tag -width "commands "
1196 .Qq Ar id Ns Cm :set_active Brq Cm 0 | 1
1197 switches the button off
1202 .Qq Ar id Ns Cm :set_label Ar string
1203 replaces the button text with
1206 .Qq Ar id Ns Cm \&:1
1208 .Qq Ar id Ns Cm \&:0
1213 can deal with columns of type
1214 .Cm gboolean , gint , guint , glong , gulong , gint64 , guint64 , gfloat , gdouble ,
1221 refer to the underlying model
1224 .Cm GtkTreeStore ) .
1226 is a sequence of one or more colon-separated integers, e.g.
1230 .Bl -tag -width "commands "
1232 .Qq Ar id Ns Cm :set Ar row column data
1233 replaces the content at
1237 (which should be compatible with the type of
1239 If necessary, new tree nodes are created to obtain the minimal tree
1240 structure needed to support
1243 .Qq Ar id Ns Cm :insert_row Brq Ar row Bo Cm as_child Bc | Cm end
1244 inserts a new, empty row; either as a sibling of
1250 or at the end of the list, respectively.
1252 .Qq Ar id Ns Cm :move_row Ar origin Brq Ar destination | Cm end
1255 within its current level to
1259 .Qq Ar id Ns Cm :remove_row Ar row
1260 removes the row at position
1263 .Qq Ar id Ns Cm :clear
1266 .Qq Ar id Ns Cm :expand Ar row
1267 expands one level of the subtree below
1270 .Qq Ar id Ns Cm :expand_all Bq Ar row
1271 expands the subtree below
1275 .Qq Ar id Ns Cm :collapse Bq Ar row
1276 collapses the subtree below
1280 .Qq Ar id Ns Cm :set_cursor Bq Ar row
1285 .Qq Ar id Ns Cm :scroll Ar row column
1290 .Qq Ar id Ns Cm :save Ar file
1291 stores the content of the underlying model as a sequence of
1296 .Qq Ar id Ns Cm \&:clicked
1298 .Qq Ar id Ns Cm \&: Ns Ar column_type row column value ,
1299 one message per cell in the underlying model for each selected row; or
1301 .Qq Ar id Ns Cm \&: Ns Ar column_type row column new_value ,
1306 .Ss GtkTreeViewColumn
1307 .Bl -tag -width "commands "
1311 .Qq Ar id Ns Cm \&:clicked
1314 .Bl -tag -width "commands "
1316 .Qq Ar id Ns Cm :set_title Ar string
1317 replaces the text in the title bar with
1320 .Qq Ar id Ns Cm :resize Bq Ar width height
1321 changes the window size to
1325 pixels if specified, or to the default size.
1327 .Qq Ar id Ns Cm :move Ar x y
1328 moves the window to position
1331 .Qq Ar id Ns Cm :fullscreen
1333 .Qq Ar id Ns Cm :unfullscreen
1334 switch fullscreen mode on and off.
1336 .Qq Ar id Ns Cm \&:closed
1339 was closed by the window manager.
1344 .Ss Discovering Pipeglade Interactively
1345 Suppose the interface in
1348 .Sx GtkLabel Ql label1
1350 .Sx GtkButton Ql button1 .
1356 .Sx GtkButton , Ql button1:clicked
1357 will be reported on the terminal.
1360 .Dl label1:set_text Button Label
1362 will change the text shown on the label into
1364 .Ss One-Shot File Dialog
1365 Suppose the interface in
1366 .Pa ./simple_open.ui
1368 .Sx GtkFileChooserDialog
1376 .Dl pipeglade -u simple_open.ui
1378 will open the dialog; pressing
1380 will close it after sending the selected filename to
1382 .Ss One-Shot User Notification
1384 .Pa ./simple_dialog.ui
1386 .Sx GtkLabel Ql label1 ,
1388 .Bd -literal -offset indent
1389 pipeglade -u simple_dialog.ui <<< \e
1390 "label1:set_text NOW READ THIS!"
1392 will set the label text accordingly and wait for user input.
1393 .Ss Continuous Input
1394 The following shell command displays a running clock:
1395 .Bd -literal -offset indent
1397 echo "label1:set_text `date`";
1399 done | pipeglade -u simple_dialog.ui
1401 .Ss Continuous Input and Output
1402 The following shell script fragment sets up
1404 for continuous communication with another program,
1406 .Bd -literal -offset indent
1407 pipeglade -i in.fifo -o out.fifo &
1408 # wait for in.fifo and out.fifo to appear
1409 while test ! \e( -e in.fifo -a -e out.fifo \e); do :; done
1410 main_prog <out.fifo >in.fifo
1423 .An Bert Burgemeister
1424 .Aq Mt trebbu@googlemail.com .
1426 Due to what appears to be a bug in cairo v1.14.0,
1428 used with this library version occasionally crashes on