Fix typos in manual page
[pipeglade.git] / pipeglade.1
blob35a5765a066a96c62af308ec3bec9b0d777cc4a5
1 .\" Copyright (c) 2014, 2015 Bert Burgemeister <trebbu@googlemail.com>
2 .\"
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:
10 .\"
11 .\" The above copyright notice and this permission notice shall be
12 .\" included in all copies or substantial portions of the Software.
13 .\"
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.
21 .\"
22 .Dd February 27, 2015
23 .Dt PIPEGLADE 1 CON
24 .Os BSD
25 .Sh NAME
26 .Nm pipeglade
27 .Nd Pipe-Driven GTK+ Interface
28 .Sh SYNOPSIS
29 .Nm
30 .Op Fl h
31 .Op Fl G
32 .Op Fl V
33 .Nm
34 .Op Fl i Ar in-fifo
35 .Op Fl o Ar out-fifo
36 .Op Fl u Ar builder-file
37 .Sh DESCRIPTION
38 .Nm
39 is a helper program that displays graphical user
40 interfaces for other programs.  It renders the GUI definition
41 found in a GtkBuilder XML file (created using the
42 .Xr glade 1
43 interface designer), and communicates with the main program solely
44 through plain text messages via pipes or fifos.  It provides access to
45 a subset of features of a subset of widgets of GTK+ 3.  Simple
46 one-shot dialogs as well as more complex, long-running programs can be
47 built using
48 .Nm ;
49 see
50 .Sx EXAMPLES .
51 .Sh OPTIONS
52 .Bl -tag -width Ds
53 .It Fl h
54 Prints a help message and exits.
55 .It Fl i Ar in-fifo
56 Creates a named pipe
57 .Ar in-fifo
58 if necessary, and uses it for command input.
59 .Pp
60 A command is a line of text.  Its format is
61 .Qo
62 .Fa name Ns
63 .Ic \&: Ns
64 .Fa action
65 .Bq Fa data
66 .Qc
67 where
68 .Fa name
69 is the name of the receiving widget;
70 .Fa data
71 is separated from the rest of the command by a single whitespace
72 character.  Commands whose first non-whitespace character is
73 .Ic #
74 are considered comments and ignored.
75 Any occurences of the two-character sequences
76 .Ic \en
77 and
78 .Ic \er
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
82 .Va stderr
83 and are otherwise ignored.  See
84 .Sx WIDGETS
85 for applicable commands.
86 .Pp
87 It is an error if
88 .Ar in-fifo
89 exists but is not a named pipe.  The named pipe
90 .Ar in-fifo
91 is deleted upon successful program termination.
92 .Pp
93 Default command input is
94 .Va stdin .
95 .It Fl o Ar out-fifo
96 Creates a named pipe
97 .Ar out-fifo
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
103 .Fa name Ns
104 .Ic \&: Ns
105 .Fa info
106 .Bq Fa data
108 where
109 .Fa name
110 is the name of the sending widget.  See
111 .Sx WIDGETS
112 for possible feedback messages.
114 It is an error if
115 .Ar out-fifo
116 exists but is not a named pipe.  The named pipe
117 .Ar out-fifo
118 is deleted upon successful program termination.
120 Default feedback-message output is
121 .Va stdout .
122 .It Fl u Ar builder-file
123 Displays the graphical user interface
124 .Ar builder-file
125 which should be created using the
126 .Xr glade 1
127 user interface designer and saved in GtkBuilder (.ui) format.  Widget
128 names should be alphanumeric, including underscores, and the main
129 window must be named
130 .Ic main .
132 Default is
133 .Pa ./pipeglade.ui .
134 .It Fl G
135 Prints the GTK+ version and exits.
136 .It Fl V
137 Prints the
138 .Nm pipeglade
139 version and exits.
141 .Sh WIDGETS
142 .Ss Any Widget (including widgets not mentioned in this document)
143 .Bl -tag -width "commands "
144 .It Commands
146 .Fa name Ns
147 .Ic :set_sensitive
148 .Brq Ic 0 |  1
150 makes the widget grayed out
151 .Pq Ic 0
152 or responsive
153 .Pq Ic 1 .
156 .Fa name Ns
157 .Ic :set_visible
158 .Brq Ic 0 |  1
160 hides
161 .Pq Ic 0
162 the widget, or makes it visible
163 .Pq Ic 1 .
166 .Fa name Ns
167 .Ic :override_color
168 .Bq Fa color
170 sets the color of the widget.  Default is the original color.  The
171 format of
172 .Fa color
173 is identical to the format used with
174 .Sx GtkColorButton .
177 .Fa name Ns
178 .Ic :override_background_color
179 .Bq Fa color
181 sets the background color of the widget.  Default is the original
182 background color.  The format of
183 .Fa color
184 is identical to the format used with
185 .Sx GtkColorButton .
188 .Fa name Ns
189 .Ic :override_font
190 .Bq Fa font
192 sets the font of the widget.  Default is the original font.
193 .Fa font
194 examples:
195 .Qq Li  Monospace,Serif Bold Italic Condensed 16 ,
196 .Qq Li  Sans ,
197 .Qq Li  Oblique ,
198 .Qq Li  12 .
201 .Fa name Ns
202 .Ic :force
204 simulates a click on the
205 .Fa name Ns
206 d widget, triggering a response as described with the widgets below.
207 Exceptions:
208 .Bl -dash -offset indent -compact
210 The command is ignored by
211 .Sx GtkComboBoxText
212 (address its child
213 .Sx GtkEntry
214 instead),
215 .Sx GtkTreeView ,
217 .Sx GtkTreeViewColumn ;
219 .Sx GtkCalendar , GtkEntry , GtkFileChooserButton , GtkScale ,
221 .Sx GtkSpinButton
222 report the currently selected item;
224 .Sx GtkColorButton
226 .Sx GtkFontButton
227 just open their respective dialogs.
231 .Fa name Ns
232 .Ic :main_quit
234 kills the user interface.  A non-empty
235 .Fa name
236 is required but ignored.
238 .Ss GtkButton
239 .Bl -tag -width "commands "
240 .It Commands
242 .Fa name Ns
243 .Ic :set_label
244 .Fa string
246 replaces the button text with
247 .Fa string .
248 .It Feedback
250 .Fa name Ns
251 .Ic \&:clicked
254 .Ic GtkButton Ns
255 s with names ending in
256 .Ic _ok , _apply , _cancel , _send_text ,
258 .Ic _send_selection
259 may work differently; see
260 .Sx GtkDialog , GtkFileChooserDialog ,
262 .Sx GtkTextView
263 for details.
265 .Ss GtkCalendar
266 .Bl -tag -width "commands "
267 .It Commands
269 .Fa name Ns
270 .Ic :select_date
271 .Fa yyyy Ns
272 .Ic - Ns
273 .Fa mm Ns
274 .Ic - Ns
275 .Fa dd
277 selects the date on the calendar.
280 .Fa name Ns
281 .Ic :mark_day
282 .Fa day
284 marks
285 .Fa day
286 .Pq 1-31
287 on the calendar.
290 .Fa name Ns
291 .Ic :clear_marks
293 unmarks all days on the calendar.
294 .It Feedback
296 .Fa name Ns
297 .Ic \&:clicked
298 .Fa yyyy Ns
299 .Ic - Ns
300 .Fa mm Ns
301 .Ic - Ns
302 .Fa dd
306 .Fa name Ns
307 .Ic \&:doubleclicked
308 .Fa yyyy Ns
309 .Ic - Ns
310 .Fa mm Ns
311 .Ic - Ns
312 .Fa dd
315 .Ss GtkCheckButton
316 .Bl -tag -width "commands "
317 .It Commands
319 .Fa name Ns
320 .Ic :set_active Brq Ic 0 | 1
322 switches the check mark off
323 .Pq Ic 0
324 or on
325 .Pq Ic 1 .
328 .Fa name Ns
329 .Ic :set_label
330 .Fa string
332 replaces the button text with
333 .Fa string .
334 .It Feedback
336 .Fa name Ns
337 .Ic \&:1
339 if switched on, or
341 .Fa name Ns
342 .Ic \&:0
344 otherwise.
346 .Ss GtkColorButton
347 .Bl -tag -width "commands "
348 .It Commands
350 .Fa name Ns
351 .Ic :set_color
352 .Fa color
354 preselects the color.
355 .Fa color
356 can be
357 .Bl -dash -offset indent -compact
359 a standard X11 color name, like
360 .Qq Li Dark Sea Green ,
362 a hexadecimal value in the form
363 .Ic # Ns
364 .Fa rgb ,
365 .Ic # Ns
366 .Fa rrggbb ,
367 .Ic # Ns
368 .Fa rrrgggbbb ,
370 .Ic # Ns
371 .Fa rrrrggggbbbb ,
373 an RGB color in the form
374 .Ic rgb( Ns
375 .Fa red Ns
376 .Ic \&, Ns
377 .Fa green Ns
378 .Ic \&, Ns
379 .Fa blue Ns
380 .Ic \&) ,
383 an RGBA color in the form
384 .Ic rgba( Ns
385 .Fa red Ns
386 .Ic \&, Ns
387 .Fa green Ns
388 .Ic \&, Ns
389 .Fa blue Ns
390 .Ic \&, Ns
391 .Fa alpha Ns
392 .Ic \&) .
394 .It Feedback
396 .Fa name Ns
397 .Ic \&:color
398 .Ic rgb( Ns
399 .Fa red Ns
400 .Ic \&, Ns
401 .Fa green Ns
402 .Ic \&, Ns
403 .Fa blue Ns
404 .Ic \&)
408 .Fa name Ns
409 .Ic \&:color
410 .Ic rgba( Ns
411 .Fa red Ns
412 .Ic \&, Ns
413 .Fa green Ns
414 .Ic \&, Ns
415 .Fa blue Ns
416 .Ic \&, Ns
417 .Fa alpha Ns
418 .Ic \&)
419 .Qc .
420 .Fa red , green ,
422 .Fa blue
423 lie between 0 and 255, and
424 .Fa alpha
425 between 0 and 1.
427 .Ss GtkComboBoxText
429 .Ic GtkComboBoxText
430 should contain a
431 .Ic GtkEntry .
432 .Bl -tag -width "commands "
433 .It Commands
435 .Fa name Ns
436 .Ic :prepend_text
437 .Fa string
441 .Fa name Ns
442 .Ic :append_text
443 .Fa string
445 prepend/append a new selectable item marked
446 .Fa string .
449 .Fa name Ns
450 .Ic :insert_text
451 .Fa position string
453 inserts item
454 .Fa string
456 .Fa position .
459 .Fa name Ns
460 .Ic :remove
461 .Fa position
463 removes the item at
464 .Fa position .
465 .It Feedback
467 .Fa entry_name Ns
468 .Ic \&:text
469 .Fa text
470 .Qc ,
471 .Fa entry_name
472 being the name of the child
473 .Ic GtkEntry .
475 .Ss GtkDialog
477 .Ic GtkDialog
478 that is named
479 .Fa foo
480 will be invoked by a
481 .Sx GtkMenuItem
482 or a
483 .Sx GtkImageMenuItem
484 that is named
485 .Fa foo Ns
486 .Ic _invoke .
489 .Ic GtkDialog
490 should have a
491 .Sq Cancel
492 .Sx GtkButton
493 named
494 .Fa foo Ns
495 .Ic _cancel
497 .Ic main_cancel
498 if the dialog is the sole window of the GUI and therefore named
499 .Ic main
500 .Pc .
501 .Bl -tag -width "commands "
502 .It Commands
503 none
504 .It Feedback
505 none
507 .Ss GtkDrawingArea
508 Most drawing commands expect an
509 .Fa id
510 parameter (an arbitrary non-negative integer) which can be used to reference the
511 command for later removal.
512 .Bl -tag -width "commands "
513 .It Commands
515 .Fa name Ns
516 .Ic :arc
517 .Fa id x y radius angle1 angle2
519 adds a circular arc to the current path.  The arc is centered at
520 .Pq Fa x , y
521 and proceeds clockwise from
522 .Fa angle1
524 .Fa angle2
526 in degrees
527 .Pc .
530 .Fa name Ns
531 .Ic :arc_negative
532 .Fa id x y radius angle1 angle2
534 adds a circular arc to the current path.  The arc is centered at
535 .Pq Fa x , y
536 and proceeds counterclockwise from
537 .Fa angle1
539 .Fa angle2
541 in degrees
542 .Pc .
545 .Fa name Ns
546 .Ic :close_path
547 .Fa id
549 adds a line segment from the current point to the point most recently
550 passed to
551 .Fa name Ns
552 .Ic :move_to
554 .Fa name Ns
555 .Ic :rel_move_to .
558 .Fa name Ns
559 .Ic :curve_to
560 .Fa id x1 y1 x2 y2 x3 y3
562 adds a cubic Bezier spline from the current point to
563 .Pq Fa x3 , y3 ,
564 using
565 .Pq Fa x1 , y1
567 .Pq Fa x2 , y2
568 as control points.
571 .Fa name Ns
572 .Ic :fill
573 .Fa id
575 fills the current path and clears it.
578 .Fa name Ns
579 .Ic :fill_preserve
580 .Fa id
582 fills the current path without clearing it.
585 .Fa name Ns
586 .Ic :line_to
587 .Fa id x y
589 adds a line from the current point to
590 .Pq Fa x , y .
593 .Fa name Ns
594 .Ic :move_to
595 .Fa id x y
597 sets the current point to
598 .Pq Fa x , y .
601 .Fa name Ns
602 .Ic :rectangle
603 .Fa id x y width height
605 adds a rectangle to the current path.  The top left corner is at
606 .Pq Fa x , y .
609 .Fa name Ns
610 .Ic :refresh
612 redraws the
613 .Ic GtkDrawingArea
614 .Fa name .
617 .Fa name Ns
618 .Ic :rel_curve_to
619 .Fa id dx1 dy1 dx2 dy2 dx3 dy3
621 adds a cubic Bezier spline from the current point to
622 .Pq Fa dx3 , dy3 ,
623 using
624 .Pq Fa dx1 , dy1
626 .Pq Fa dx2 , dy2
627 as control points.  All coordinates are offsets relative to the
628 current point.
631 .Fa name Ns
632 .Ic :rel_line_to
633 .Fa id dx dy
635 adds a line from the current point to a point offset from there by
636 .Pq Fa dx , dy .
639 .Fa name Ns
640 .Ic :rel_move_to
641 .Fa id dx dy
643 moves the current point by
644 .Pq Fa dx , dy .
647 .Fa name Ns
648 .Ic :remove
649 .Fa id
651 removes the elements with
652 .Fa id
653 from the
654 .Ic GtkDrawingArea
655 .Fa name .
658 .Fa name Ns
659 .Ic :set_dash
660 .Fa id l
662 sets the dash pattern to
663 .Fa l
665 .Fa l
666 off.
669 .Fa name Ns
670 .Ic :set_dash
671 .Fa id l1on l1off l2on l2off ...
673 resets the dash pattern to a line with arbitrary on/off portions.
676 .Fa name Ns
677 .Ic :set_dash
678 .Fa id
680 resets the dash pattern to a solid line.
683 .Fa name Ns
684 .Ic :set_font_size
685 .Fa id size
687 sets the font size for subsequent calls of
688 .Fa name Ns
689 .Ic :show_text .
692 .Fa name Ns
693 .Ic :set_line_cap
694 .Fa id
695 .Brq Ic butt | round | square
697 sets the line cap style.
700 .Fa name Ns
701 .Ic :set_line_join
702 .Fa id
703 .Brq Ic miter | round | bevel
705 sets the line junction style.
708 .Fa name Ns
709 .Ic :set_line_width
710 .Fa id width
712 sets the line width.
715 .Fa name Ns
716 .Ic :set_source_rgba
717 .Fa id color
719 sets the color.
720 .Fa color
721 is in the format used with
722 .Sx GtkColorButton .
725 .Fa name Ns
726 .Ic :show_text
727 .Fa id text
729 writes
730 .Fa text ,
731 beginning at the current point.
734 .Fa name Ns
735 .Ic :stroke
736 .Fa id
738 strokes the current path and clears it.
741 .Fa name Ns
742 .Ic :stroke_preserve
743 .Fa id
745 strokes the current path without clearing it.
746 .It Feedback
747 none
749 .Ss GtkEntry
750 .Bl -tag -width "commands "
751 .It Commands
753 .Fa name Ns
754 .Ic :set_text
755 .Fa string
757 replaces the user-editable text with
758 .Fa string .
759 .It Feedback
761 .Fa name Ns
762 .Ic \&:text
763 .Fa text
764 .Qc ,
765 once for each change of
766 .Fa text .
768 .Ss GtkExpander
769 .Bl -tag -width "commands "
770 .It Commands
772 .Fa name Ns
773 .Ic :set_label
774 .Fa string
776 replaces the expander label text with
777 .Fa string .
780 .Fa name Ns
781 .Ic :set_expanded
782 .Brq Ic 0 |  1
784 hides
785 .Pq Ic 0
786 the child widget, or makes it visible
787 .Pq Ic 1 .
788 .It Feedback
789 none
791 .Ss GtkFileChooserButton
792 .Bl -tag -width "commands "
793 .It Commands
795 .Fa name Ns
796 .Ic :set_filename
797 .Fa path
799 preselects
800 .Fa path
801 to the extent it exists.
802 .It Feedback
804 .Fa name Ns
805 .Ic \&:file
806 .Fa pathname
808 if the selection has changed.
810 .Ss GtkFileChooserDialog
812 .Ic GtkFileChooserDialog
813 that is named
814 .Fa foo
815 will be invoked by a
816 .Sx GtkMenuItem
817 or a
818 .Sx GtkImageMenuItem
819 that is named
820 .Fa foo Ns
821 .Ic _invoke
824 .Ic GtkFileChooserDialog
825 should have an
826 .Sq OK
827 .Sx GtkButton
828 named
829 .Fa foo Ns
830 .Ic _ok
832 .Ic main_ok
833 if the dialog is the sole window of the GUI and therefore named
834 .Ic main
835 .Pc .
838 .Ic GtkFileChooserDialog
839 may have a
840 .Sq Cancel
841 .Sx GtkButton
842 named
843 .Fa foo Ns
844 .Ic _cancel
846 .Ic main_cancel
847 if the dialog is the sole window of the GUI and therefore named
848 .Ic main
849 .Pc .
852 .Ic GtkFileChooserDialog
853 may have an
854 .Sq Apply
855 .Sx GtkButton
856 named
857 .Fa foo Ns
858 .Ic _apply
860 .Ic main_apply
861 if the dialog is the sole window of the GUI and therefore named
862 .Ic main
863 .Pc .
864 .Bl -tag -width "commands "
865 .It Commands
867 .Fa name Ns
868 .Ic :set_filename
869 .Fa path
871 preselects
872 .Fa path
873 to the extent it exists.
876 .Fa name Ns
877 .Ic :set_current_name
878 .Fa string
880 makes
881 .Fa string
882 the suggested filename, which may not yet exist.
883 .Fa string
884 should either resemble an absolute path, or the
885 .Fa directory
886 must be set
887 separately by
888 .Fa name Ns
889 .Ic :set_filename
890 .Fa directory .
891 .It Feedback
893 .Fa name Ns
894 .Ic :file
895 .Fa  pathname
897 and/or
899 .Fa name Ns
900 .Ic :folder
901 .Fa  pathname
904 .Ss GtkFontButton
905 .Bl -tag -width "commands "
906 .It Commands
908 .Fa name Ns
909 .Ic :set_font_name
910 .Fa fontname
912 preselects the font.
913 .It Feedback
915 .Fa name Ns
916 .Ic \&:font
917 .Fa fontname
920 .Ss GtkFrame
921 .Bl -tag -width "commands "
922 .It Commands
924 .Fa name Ns
925 .Ic :set_label
926 .Fa text
928 replaces the frame label text with
929 .Fa string .
930 .It Feedback
931 none
933 .Ss GtkImage
934 .Bl -tag -width "commands "
935 .It Commands
937 .Fa name Ns
938 .Ic :set_from_icon_name
939 .Fa icon-name
941 replaces the image with one of the standard icons.
944 .Fa name Ns
945 .Ic :set_from_file
946 .Fa path
948 replaces the image by the one found at
949 .Fa path Ns .
950 .It Feedback
951 none
953 .Ss GtkLabel
954 .Bl -tag -width "commands "
955 .It Commands
957 .Fa name Ns
958 .Ic :set_text
959 .Fa string
961 replaces the label text with
962 .Fa string .
963 .It Feedback
964 none
966 .Ss GtkMenuItem, GtkImageMenuItem
967 .Bl -tag -width "commands "
968 .It Commands
969 none
970 .It Feedback
972 .Ic GtkMenuItem
974 .Ic GtkImageMenuItem
975 with the name
976 .Fa foo Ns
977 .Ic _invoke
978 will invoke the
979 .Sx GtkDialog
981 .Sx GtkFileChooserDialog
982 named
983 .Fa foo
984 if it exists.  If there isn't any dialog attached to the
985 .Ic GtkMenuItem ,
986 it reports
988 .Fa name Ns
989 .Ic \&:active
990 .Fa label
991 .Qc .
993 .Ss GtkNotebook
994 .Bl -tag -width "commands "
995 .It Commands
997 .Fa name Ns
998 .Ic :set_current_page
999 .Fa numeric
1001 switches to page number
1002 .Fa numeric
1004 starting from 0
1005 .Pc .
1006 .It Feedback
1007 none
1009 .Ss GtkProgressBar
1010 .Bl -tag -width "commands "
1011 .It Commands
1013 .Fa name Ns
1014 .Ic :set_fraction
1015 .Fa numeric
1017 moves the progress bar to
1018 .Fa numeric
1020 between 0 and 1
1021 .Pc .
1024 .Fa name Ns
1025 .Ic :set_text
1026 .Bq Fa string
1028 replaces the text of the progress bar with
1029 .Fa string .
1030 Default is the progress percentage.
1031 .It Feedback
1032 none
1034 .Ss GtkRadioButton
1035 .Bl -tag -width "commands "
1036 .It Commands
1038 .Fa name Ns
1039 .Ic :set_active 1
1041 switches the button on.  All other buttons of the same group will go off
1042 automatically.
1045 .Fa name Ns
1046 .Ic :set_label
1047 .Fa string
1049 replaces the button text with
1050 .Fa string .
1051 .It Feedback
1053 .Fa name Ns
1054 .Ic \&:1
1056 if switched on, or
1058 .Fa name Ns
1059 .Ic \&:0
1061 otherwise.
1063 .Ss GtkScale
1064 .Bl -tag -width "commands "
1065 .It Commands
1067 .Fa name Ns
1068 .Ic :set_value
1069 .Fa numeric
1071 moves the slider to value
1072 .Fa numeric .
1073 .It Feedback
1075 .Fa name Ns
1076 .Ic \&:value
1077 .Fa floating_point_text
1080 .Ss GtkSpinButton
1081 .Bl -tag -width "commands "
1082 .It Commands
1084 .Fa name Ns
1085 .Ic :set_text
1086 .Fa string
1088 sets the selected value to
1089 .Fa string .
1090 .It Feedback
1092 .Fa name Ns
1093 .Ic \&:text
1094 .Fa text
1097 .Ss GtkSpinner
1098 .Bl -tag -width "commands "
1099 .It Commands
1101 .Fa name Ns
1102 .Ic :start
1106 .Fa name Ns
1107 .Ic :stop
1109 start and stop the spinner.
1110 .It Feedback
1111 none
1113 .Ss GtkStatusbar
1114 .Bl -tag -width "commands "
1115 .It Commands
1117 .Fa name Ns
1118 .Ic :push
1119 .Fa string
1121 displays
1122 .Fa string
1123 in the statusbar.
1126 .Fa name Ns
1127 .Ic :pop
1129 removes the last entry from the statusbar, revealing the penultimate
1130 entry.
1133 .Fa name Ns
1134 .Ic :remove_all
1136 empties the statusbar.
1137 .It Feedback
1138 none
1140 .Ss GtkSwitch
1141 .Bl -tag -width "commands "
1142 .It Commands
1144 .Fa name Ns
1145 .Ic :set_active Brq Ic 0 | 1
1147 turns the switch off
1148 .Pq Ic 0
1149 or on
1150 .Pq Ic 1 .
1151 .It Feedback
1153 .Fa name Ns
1154 .Ic \&:1
1156 if switched on, or
1158 .Fa name Ns
1159 .Ic \&:0
1161 otherwise.
1163 .Ss GtkTextView
1164 There should be a dedicated
1165 .Sx GtkButton
1166 for sending (parts of) the text.
1167 If the name of the
1168 .Ic GtkTextView
1170 .Fa foo ,
1172 .Sx GtkButton
1173 named
1174 .Fa foo Ns
1175 .Ic _send_text
1176 will send the content of the
1177 .Ic GtkTextView ;
1179 .Sx GtkButton
1180 named
1181 .Fa foo Ns
1182 .Ic _send_selection
1183 will send the highlighted part the
1184 .Ic GtkTextView .
1185 .Bl -tag -width "commands "
1186 .It Commands
1188 .Fa name Ns
1189 .Ic :set_text
1190 .Fa string
1192 replaces the user-editable text with
1193 .Fa string Ns .
1196 .Fa name Ns
1197 .Ic :delete
1199 deletes the text.
1202 .Fa name Ns
1203 .Ic :insert_at_cursor
1204 .Fa string
1206 inserts
1207 .Fa string
1208 at cursor position.
1211 .Fa name Ns
1212 .Ic :place_cursor Brq Fa position | Ic end
1214 places the text cursor at
1215 .Fa position
1216 or at the end of the text.
1219 .Fa name Ns
1220 .Ic :place_cursor_at_line
1221 .Fa line
1223 places the text cursor at the beginning of
1224 .Fa line .
1227 .Fa name Ns
1228 .Ic :scroll_to_cursor
1230 scrolls to the cursor position if necessary.
1231 .It Feedback
1233 .Fa button_name Ns
1234 .Ic :text
1235 .Fa text
1236 .Qc ,
1237 .Fa button_name
1238 being the name of the
1239 .Sx GtkButton .
1240 Line endings in
1241 .Fa text
1242 are replaced by
1243 .Ic \en ,
1244 and backslashes are replaced by
1245 .Ic \e\e .
1247 .Ss GtkToggleButton
1248 .Bl -tag -width "commands "
1249 .It Commands
1251 .Fa name Ns
1252 .Ic :set_active Brq Ic 0 | 1
1254 switches the button off
1255 .Pq Ic 0
1256 or on
1257 .Pq Ic 1 .
1260 .Fa name Ns
1261 .Ic :set_label
1262 .Fa string
1264 replaces the button text with
1265 .Fa string .
1266 .It Feedback
1268 .Fa name Ns
1269 .Ic \&:1
1271 if switched on, or
1273 .Fa name Ns
1274 .Ic \&:0
1276 otherwise.
1278 .Ss GtkTreeView
1280 can deal with columns of type
1281 .Ic gboolean , gint , guint , glong , gulong , gint64 , guint64 , gfloat , gdouble ,
1283 .Ic gchararray .
1285 .Fa row
1287 .Fa column
1288 refer to the underlying model (usually a
1289 .Ic GtkListStore ) .
1290 .Bl -tag -width "commands "
1291 .It Commands
1293 .Fa name Ns
1294 .Ic :set
1295 .Fa row column data
1297 replaces the content at
1298 .Pq Fa row , column
1299 with
1300 .Fa data
1301 (which should be compatible with the type of
1302 .Fa column ) .
1305 .Fa name Ns
1306 .Ic :insert_row Brq Fa position | Ic end
1308 inserts a new, empty row at
1309 .Fa position
1310 or at the end of the list.
1313 .Fa name Ns
1314 .Ic :move_row
1315 .Fa origin Brq Fa destination | Ic end
1317 moves the row at
1318 .Fa origin
1320 .Fa destination
1321 or to the end of the list.
1324 .Fa name Ns
1325 .Ic :remove_row
1326 .Fa position
1328 removes the row at
1329 .Fa position .
1332 .Fa name Ns
1333 .Ic :scroll
1334 .Fa row column
1336 scrolls the cell at
1337 .Pq Fa row , column
1338 into view.
1339 .It Feedback
1341 .Fa name Ns
1342 .Ic \&:clicked
1346 .Fa name Ns
1347 .Ic \&: Ns
1348 .Fa column_type row column value
1349 .Qc ,
1350 one message per selected row and column in the underlying model if
1351 the set of selected rows has changed.
1353 .Ss GtkTreeViewColumn
1354 .Bl -tag -width "commands "
1355 .It Commands
1356 none
1357 .It Feedback
1359 .Fa name Ns
1360 .Ic \&:clicked
1363 .Sh EXAMPLES
1364 .Ss Discovering Pipeglade Interactively
1365 Suppose the interface in
1366 .Pa ./pipeglade.ui
1367 has a
1368 .Sx GtkLabel
1369 .Li label1
1370 and a
1371 .Sx GtkButton
1372 .Li button1 .
1373 After invoking
1374 .Dl pipeglade
1375 and clicking the
1376 .Sx GtkButton ,
1377 .Qq button1:clicked
1378 will be reported on the terminal.  Typing
1379 .Dl label1:set_text Button Label
1380 will change the text shown on the label into
1381 .Qq Button Label .
1382 .Ss One-Shot File Dialog
1383 Suppose the interface in
1384 .Pa ./simple_open.ui
1385 contains a
1386 .Sx GtkFileChooserDialog
1387 with an
1388 .Sq OK
1389 .Sx GtkButton
1390 named
1391 .Li main_ok .
1392 Invoking
1393 .Dl pipeglade -u simple_open.ui
1394 will open the dialog; pressing
1395 .Sq OK
1396 will close it after sending the selected filename to
1397 .Va stdout .
1398 .Ss One-Shot User Notification
1399 If the interface in
1400 .Pa ./simple_dialog.ui
1401 contains a
1402 .Sx GtkLabel
1403 .Li label1 ,
1404 then
1405 .Dl pipeglade -u simple_dialog.ui <<< \e
1406 .Dl \ \ \ \ \&"label1:set_text NOW READ THIS!\&"
1407 will set the label text accordingly and wait for user input.
1408 .Ss Continuous Input
1409 The following shell command displays a running clock:
1410 .Dl while true; do
1411 .Dl \ \ \ \ echo \&"label1:set_text `date`\&";
1412 .Dl \ \ \ \ sleep 1;
1413 .Dl done | pipeglade -u simple_dialog.ui
1414 .Ss Continuous Input and Output
1415 The following shell script fragment sets up
1417 for continuous communication with another program,
1418 .Li main_prog :
1419 .Dl pipeglade -i in.fifo -o out.fifo &
1420 .Dl # wait for in.fifo and out.fifo to appear
1421 .Dl while test \& ! \e( -e in.fifo -a -e out.fifo \e); do :; done
1422 .Dl main_prog <out.fifo >in.fifo
1423 .Sh EXIT STATUS
1425 exits 0 on success, and >0 if an error occurs.
1426 .Sh SEE ALSO
1427 .Xr glade 1 ,
1428 .Xr dialog 1 ,
1429 .Xr gmessage 1 ,
1430 .Xr kdialog 1 ,
1431 .Xr whiptail 1 ,
1432 .Xr xmessage 1 ,
1433 .Xr zenity 1
1434 .Sh AUTHOR
1436 was written by
1437 .An Bert Burgemeister Aq trebbu@googlemail.com .
1438 .\" .Sh BUGS