Disable runtime GLIB deprecation warnings
[pipeglade.git] / pipeglade.1
blobc180be9700bb541d3c810186c6d71442daf8a4cf
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 September 23, 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 :style
168 .Bo Fa prop Ic : Ns Fa val Ns
170 .Ic ;
171 .Fa prop Ic : Ns Fa val ...
175 sets properties
176 .Fa prop
177 of the widget style to
178 .Fa val .
179 Properties not explicitly specified are reset to their default values.
180 Examples:
181 .Bl -dash -offset indent -compact
183 .Qq Li label1:style font:Bold 11; background-color:green
185 .Qq Li label1:style font-style:italic; font-weight:bold; color:blue
187 .Qq Li frame1:style border-color:red yellow; border-width:5px
189 .Qq Li frame1:style border-radius:10px; transition:10s
191 For a description of possible color notations see
192 .Sx GtkColorButton .
195 .Fa name Ns
196 .Ic :force
198 simulates a click on the
199 .Fa name Ns
200 d widget, triggering a response as described with the widgets below.
201 Exceptions:
202 .Bl -dash -offset indent -compact
204 The command is ignored by
205 .Sx GtkComboBoxText
206 (address its child
207 .Sx GtkEntry
208 instead),
209 .Sx GtkTreeView ,
211 .Sx GtkTreeViewColumn ;
213 .Sx GtkCalendar , GtkEntry , GtkFileChooserButton , GtkScale ,
215 .Sx GtkSpinButton
216 report the currently selected item;
218 .Sx GtkColorButton
220 .Sx GtkFontButton
221 just open their respective dialogs.
225 .Fa name Ns
226 .Ic :main_quit
228 kills the user interface.  A non-empty
229 .Fa name
230 is required but ignored.
232 .Ss GtkButton
233 .Bl -tag -width "commands "
234 .It Commands
236 .Fa name Ns
237 .Ic :set_label
238 .Fa string
240 replaces the button text with
241 .Fa string .
242 .It Feedback
244 .Fa name Ns
245 .Ic \&:clicked
248 .Ic GtkButton Ns
249 s with names ending in
250 .Ic _ok , _apply , _cancel , _send_text ,
252 .Ic _send_selection
253 may work differently; see
254 .Sx GtkDialog , GtkFileChooserDialog ,
256 .Sx GtkTextView
257 for details.
259 .Ss GtkCalendar
260 .Bl -tag -width "commands "
261 .It Commands
263 .Fa name Ns
264 .Ic :select_date
265 .Fa yyyy Ns
266 .Ic - Ns
267 .Fa mm Ns
268 .Ic - Ns
269 .Fa dd
271 selects the date on the calendar.
274 .Fa name Ns
275 .Ic :mark_day
276 .Fa day
278 marks
279 .Fa day
280 .Pq 1-31
281 on the calendar.
284 .Fa name Ns
285 .Ic :clear_marks
287 unmarks all days on the calendar.
288 .It Feedback
290 .Fa name Ns
291 .Ic \&:clicked
292 .Fa yyyy Ns
293 .Ic - Ns
294 .Fa mm Ns
295 .Ic - Ns
296 .Fa dd
300 .Fa name Ns
301 .Ic \&:doubleclicked
302 .Fa yyyy Ns
303 .Ic - Ns
304 .Fa mm Ns
305 .Ic - Ns
306 .Fa dd
309 .Ss GtkCheckButton
310 .Bl -tag -width "commands "
311 .It Commands
313 .Fa name Ns
314 .Ic :set_active Brq Ic 0 | 1
316 switches the check mark off
317 .Pq Ic 0
318 or on
319 .Pq Ic 1 .
322 .Fa name Ns
323 .Ic :set_label
324 .Fa string
326 replaces the button text with
327 .Fa string .
328 .It Feedback
330 .Fa name Ns
331 .Ic \&:1
333 if switched on, or
335 .Fa name Ns
336 .Ic \&:0
338 otherwise.
340 .Ss GtkColorButton
341 .Bl -tag -width "commands "
342 .It Commands
344 .Fa name Ns
345 .Ic :set_color
346 .Fa color
348 preselects the color.
349 .Fa color
350 can be
351 .Bl -dash -offset indent -compact
353 a standard X11 color name, like
354 .Qq Li Dark Sea Green ,
356 a hexadecimal value in the form
357 .Ic # Ns
358 .Fa rgb ,
359 .Ic # Ns
360 .Fa rrggbb ,
361 .Ic # Ns
362 .Fa rrrgggbbb ,
364 .Ic # Ns
365 .Fa rrrrggggbbbb ,
367 an RGB color in the form
368 .Ic rgb( Ns
369 .Fa red Ns
370 .Ic \&, Ns
371 .Fa green Ns
372 .Ic \&, Ns
373 .Fa blue Ns
374 .Ic \&) ,
377 an RGBA color in the form
378 .Ic rgba( Ns
379 .Fa red Ns
380 .Ic \&, Ns
381 .Fa green Ns
382 .Ic \&, Ns
383 .Fa blue Ns
384 .Ic \&, Ns
385 .Fa alpha Ns
386 .Ic \&) .
388 .It Feedback
390 .Fa name Ns
391 .Ic \&:color
392 .Ic rgb( Ns
393 .Fa red Ns
394 .Ic \&, Ns
395 .Fa green Ns
396 .Ic \&, Ns
397 .Fa blue Ns
398 .Ic \&)
402 .Fa name Ns
403 .Ic \&:color
404 .Ic rgba( Ns
405 .Fa red Ns
406 .Ic \&, Ns
407 .Fa green Ns
408 .Ic \&, Ns
409 .Fa blue Ns
410 .Ic \&, Ns
411 .Fa alpha Ns
412 .Ic \&)
413 .Qc .
414 .Fa red , green ,
416 .Fa blue
417 lie between 0 and 255, and
418 .Fa alpha
419 between 0 and 1.
421 .Ss GtkComboBoxText
423 .Ic GtkComboBoxText
424 should contain a
425 .Ic GtkEntry .
426 .Bl -tag -width "commands "
427 .It Commands
429 .Fa name Ns
430 .Ic :prepend_text
431 .Fa string
435 .Fa name Ns
436 .Ic :append_text
437 .Fa string
439 prepend/append a new selectable item marked
440 .Fa string .
443 .Fa name Ns
444 .Ic :insert_text
445 .Fa position string
447 inserts item
448 .Fa string
450 .Fa position .
453 .Fa name Ns
454 .Ic :remove
455 .Fa position
457 removes the item at
458 .Fa position .
459 .It Feedback
461 .Fa entry_name Ns
462 .Ic \&:text
463 .Fa text
464 .Qc ,
465 .Fa entry_name
466 being the name of the child
467 .Ic GtkEntry .
469 .Ss GtkDialog
471 .Ic GtkDialog
472 that is named
473 .Fa foo
474 will be invoked by a
475 .Sx GtkMenuItem
476 or a
477 .Sx GtkImageMenuItem
478 that is named
479 .Fa foo Ns
480 .Ic _invoke .
483 .Ic GtkDialog
484 should have a
485 .Sq Cancel
486 .Sx GtkButton
487 named
488 .Fa foo Ns
489 .Ic _cancel
491 .Ic main_cancel
492 if the dialog is the sole window of the GUI and therefore named
493 .Ic main
494 .Pc .
495 .Bl -tag -width "commands "
496 .It Commands
497 none
498 .It Feedback
499 none
501 .Ss GtkDrawingArea
502 Most drawing commands expect an
503 .Fa id
504 parameter (an arbitrary non-negative integer) which can be used to reference the
505 command for later removal.
506 .Bl -tag -width "commands "
507 .It Commands
509 .Fa name Ns
510 .Ic :arc
511 .Fa id x y radius angle1 angle2
513 adds a circular arc to the current path.  The arc is centered at
514 .Pq Fa x , y
515 and proceeds clockwise from
516 .Fa angle1
518 .Fa angle2
520 in degrees
521 .Pc .
524 .Fa name Ns
525 .Ic :arc_negative
526 .Fa id x y radius angle1 angle2
528 adds a circular arc to the current path.  The arc is centered at
529 .Pq Fa x , y
530 and proceeds counterclockwise from
531 .Fa angle1
533 .Fa angle2
535 in degrees
536 .Pc .
539 .Fa name Ns
540 .Ic :close_path
541 .Fa id
543 adds a line segment from the current point to the point most recently
544 passed to
545 .Fa name Ns
546 .Ic :move_to
548 .Fa name Ns
549 .Ic :rel_move_to .
552 .Fa name Ns
553 .Ic :curve_to
554 .Fa id x1 y1 x2 y2 x3 y3
556 adds a cubic Bezier spline from the current point to
557 .Pq Fa x3 , y3 ,
558 using
559 .Pq Fa x1 , y1
561 .Pq Fa x2 , y2
562 as control points.
565 .Fa name Ns
566 .Ic :fill
567 .Fa id
569 fills the current path and clears it.
572 .Fa name Ns
573 .Ic :fill_preserve
574 .Fa id
576 fills the current path without clearing it.
579 .Fa name Ns
580 .Ic :line_to
581 .Fa id x y
583 adds a line from the current point to
584 .Pq Fa x , y .
587 .Fa name Ns
588 .Ic :move_to
589 .Fa id x y
591 sets the current point to
592 .Pq Fa x , y .
595 .Fa name Ns
596 .Ic :rectangle
597 .Fa id x y width height
599 adds a rectangle to the current path.  The top left corner is at
600 .Pq Fa x , y .
603 .Fa name Ns
604 .Ic :refresh
606 redraws the
607 .Ic GtkDrawingArea
608 .Fa name .
611 .Fa name Ns
612 .Ic :rel_curve_to
613 .Fa id dx1 dy1 dx2 dy2 dx3 dy3
615 adds a cubic Bezier spline from the current point to
616 .Pq Fa dx3 , dy3 ,
617 using
618 .Pq Fa dx1 , dy1
620 .Pq Fa dx2 , dy2
621 as control points.  All coordinates are offsets relative to the
622 current point.
625 .Fa name Ns
626 .Ic :rel_line_to
627 .Fa id dx dy
629 adds a line from the current point to a point offset from there by
630 .Pq Fa dx , dy .
633 .Fa name Ns
634 .Ic :rel_move_to
635 .Fa id dx dy
637 moves the current point by
638 .Pq Fa dx , dy .
641 .Fa name Ns
642 .Ic :remove
643 .Fa id
645 removes the elements with
646 .Fa id
647 from the
648 .Ic GtkDrawingArea
649 .Fa name .
652 .Fa name Ns
653 .Ic :set_dash
654 .Fa id l
656 sets the dash pattern to
657 .Fa l
659 .Fa l
660 off.
663 .Fa name Ns
664 .Ic :set_dash
665 .Fa id l1on l1off l2on l2off ...
667 resets the dash pattern to a line with arbitrary on/off portions.
670 .Fa name Ns
671 .Ic :set_dash
672 .Fa id
674 resets the dash pattern to a solid line.
677 .Fa name Ns
678 .Ic :set_font_size
679 .Fa id size
681 sets the font size for subsequent calls of
682 .Fa name Ns
683 .Ic :show_text .
686 .Fa name Ns
687 .Ic :set_line_cap
688 .Fa id
689 .Brq Ic butt | round | square
691 sets the line cap style.
694 .Fa name Ns
695 .Ic :set_line_join
696 .Fa id
697 .Brq Ic miter | round | bevel
699 sets the line junction style.
702 .Fa name Ns
703 .Ic :set_line_width
704 .Fa id width
706 sets the line width.
709 .Fa name Ns
710 .Ic :set_source_rgba
711 .Fa id color
713 sets the color.
714 .Fa color
715 is in the format used with
716 .Sx GtkColorButton .
719 .Fa name Ns
720 .Ic :show_text
721 .Fa id text
723 writes
724 .Fa text ,
725 beginning at the current point.
728 .Fa name Ns
729 .Ic :stroke
730 .Fa id
732 strokes the current path and clears it.
735 .Fa name Ns
736 .Ic :stroke_preserve
737 .Fa id
739 strokes the current path without clearing it.
740 .It Feedback
741 none
743 .Ss GtkEntry
744 .Bl -tag -width "commands "
745 .It Commands
747 .Fa name Ns
748 .Ic :set_text
749 .Fa string
751 replaces the user-editable text with
752 .Fa string .
753 .It Feedback
755 .Fa name Ns
756 .Ic \&:text
757 .Fa text
758 .Qc ,
759 once for each change of
760 .Fa text .
762 .Ss GtkExpander
763 .Bl -tag -width "commands "
764 .It Commands
766 .Fa name Ns
767 .Ic :set_label
768 .Fa string
770 replaces the expander label text with
771 .Fa string .
774 .Fa name Ns
775 .Ic :set_expanded
776 .Brq Ic 0 |  1
778 hides
779 .Pq Ic 0
780 the child widget, or makes it visible
781 .Pq Ic 1 .
782 .It Feedback
783 none
785 .Ss GtkFileChooserButton
786 .Bl -tag -width "commands "
787 .It Commands
789 .Fa name Ns
790 .Ic :set_filename
791 .Fa path
793 preselects
794 .Fa path
795 to the extent it exists.
796 .It Feedback
798 .Fa name Ns
799 .Ic \&:file
800 .Fa pathname
802 if the selection has changed.
804 .Ss GtkFileChooserDialog
806 .Ic GtkFileChooserDialog
807 that is named
808 .Fa foo
809 will be invoked by a
810 .Sx GtkMenuItem
811 or a
812 .Sx GtkImageMenuItem
813 that is named
814 .Fa foo Ns
815 .Ic _invoke
818 .Ic GtkFileChooserDialog
819 should have an
820 .Sq OK
821 .Sx GtkButton
822 named
823 .Fa foo Ns
824 .Ic _ok
826 .Ic main_ok
827 if the dialog is the sole window of the GUI and therefore named
828 .Ic main
829 .Pc .
832 .Ic GtkFileChooserDialog
833 may have a
834 .Sq Cancel
835 .Sx GtkButton
836 named
837 .Fa foo Ns
838 .Ic _cancel
840 .Ic main_cancel
841 if the dialog is the sole window of the GUI and therefore named
842 .Ic main
843 .Pc .
846 .Ic GtkFileChooserDialog
847 may have an
848 .Sq Apply
849 .Sx GtkButton
850 named
851 .Fa foo Ns
852 .Ic _apply
854 .Ic main_apply
855 if the dialog is the sole window of the GUI and therefore named
856 .Ic main
857 .Pc .
858 .Bl -tag -width "commands "
859 .It Commands
861 .Fa name Ns
862 .Ic :set_filename
863 .Fa path
865 preselects
866 .Fa path
867 to the extent it exists.
870 .Fa name Ns
871 .Ic :set_current_name
872 .Fa string
874 makes
875 .Fa string
876 the suggested filename, which may not yet exist.
877 .Fa string
878 should either resemble an absolute path, or the
879 .Fa directory
880 must be set
881 separately by
882 .Fa name Ns
883 .Ic :set_filename
884 .Fa directory .
885 .It Feedback
887 .Fa name Ns
888 .Ic :file
889 .Fa  pathname
891 and/or
893 .Fa name Ns
894 .Ic :folder
895 .Fa  pathname
898 .Ss GtkFontButton
899 .Bl -tag -width "commands "
900 .It Commands
902 .Fa name Ns
903 .Ic :set_font_name
904 .Fa fontname
906 preselects the font.
907 .It Feedback
909 .Fa name Ns
910 .Ic \&:font
911 .Fa fontname
914 .Ss GtkFrame
915 .Bl -tag -width "commands "
916 .It Commands
918 .Fa name Ns
919 .Ic :set_label
920 .Fa text
922 replaces the frame label text with
923 .Fa string .
924 .It Feedback
925 none
927 .Ss GtkImage
928 .Bl -tag -width "commands "
929 .It Commands
931 .Fa name Ns
932 .Ic :set_from_icon_name
933 .Fa icon-name
935 replaces the image with one of the standard icons.
938 .Fa name Ns
939 .Ic :set_from_file
940 .Fa path
942 replaces the image by the one found at
943 .Fa path Ns .
944 .It Feedback
945 none
947 .Ss GtkLabel
948 .Bl -tag -width "commands "
949 .It Commands
951 .Fa name Ns
952 .Ic :set_text
953 .Fa string
955 replaces the label text with
956 .Fa string .
957 .It Feedback
958 none
960 .Ss GtkMenuItem, GtkImageMenuItem
961 .Bl -tag -width "commands "
962 .It Commands
963 none
964 .It Feedback
966 .Ic GtkMenuItem
968 .Ic GtkImageMenuItem
969 with the name
970 .Fa foo Ns
971 .Ic _invoke
972 will invoke the
973 .Sx GtkDialog
975 .Sx GtkFileChooserDialog
976 named
977 .Fa foo
978 if it exists.  If there isn't any dialog attached to the
979 .Ic GtkMenuItem ,
980 it reports
982 .Fa name Ns
983 .Ic \&:active
984 .Fa label
985 .Qc .
987 .Ss GtkNotebook
988 .Bl -tag -width "commands "
989 .It Commands
991 .Fa name Ns
992 .Ic :set_current_page
993 .Fa numeric
995 switches to page number
996 .Fa numeric
998 starting from 0
999 .Pc .
1000 .It Feedback
1001 none
1003 .Ss GtkProgressBar
1004 .Bl -tag -width "commands "
1005 .It Commands
1007 .Fa name Ns
1008 .Ic :set_fraction
1009 .Fa numeric
1011 moves the progress bar to
1012 .Fa numeric
1014 between 0 and 1
1015 .Pc .
1018 .Fa name Ns
1019 .Ic :set_text
1020 .Bq Fa string
1022 replaces the text of the progress bar with
1023 .Fa string .
1024 Default is the progress percentage.
1025 .It Feedback
1026 none
1028 .Ss GtkRadioButton
1029 .Bl -tag -width "commands "
1030 .It Commands
1032 .Fa name Ns
1033 .Ic :set_active 1
1035 switches the button on.  All other buttons of the same group will go off
1036 automatically.
1039 .Fa name Ns
1040 .Ic :set_label
1041 .Fa string
1043 replaces the button text with
1044 .Fa string .
1045 .It Feedback
1047 .Fa name Ns
1048 .Ic \&:1
1050 if switched on, or
1052 .Fa name Ns
1053 .Ic \&:0
1055 otherwise.
1057 .Ss GtkScale
1058 .Bl -tag -width "commands "
1059 .It Commands
1061 .Fa name Ns
1062 .Ic :set_value
1063 .Fa numeric
1065 moves the slider to value
1066 .Fa numeric .
1067 .It Feedback
1069 .Fa name Ns
1070 .Ic \&:value
1071 .Fa floating_point_text
1074 .Ss GtkSpinButton
1075 .Bl -tag -width "commands "
1076 .It Commands
1078 .Fa name Ns
1079 .Ic :set_text
1080 .Fa string
1082 sets the selected value to
1083 .Fa string .
1084 .It Feedback
1086 .Fa name Ns
1087 .Ic \&:text
1088 .Fa text
1091 .Ss GtkSpinner
1092 .Bl -tag -width "commands "
1093 .It Commands
1095 .Fa name Ns
1096 .Ic :start
1100 .Fa name Ns
1101 .Ic :stop
1103 start and stop the spinner.
1104 .It Feedback
1105 none
1107 .Ss GtkStatusbar
1108 .Bl -tag -width "commands "
1109 .It Commands
1111 .Fa name Ns
1112 .Ic :push
1113 .Fa string
1115 displays
1116 .Fa string
1117 in the statusbar.
1120 .Fa name Ns
1121 .Ic :pop
1123 removes the last entry from the statusbar, revealing the penultimate
1124 entry.
1127 .Fa name Ns
1128 .Ic :remove_all
1130 empties the statusbar.
1131 .It Feedback
1132 none
1134 .Ss GtkSwitch
1135 .Bl -tag -width "commands "
1136 .It Commands
1138 .Fa name Ns
1139 .Ic :set_active Brq Ic 0 | 1
1141 turns the switch off
1142 .Pq Ic 0
1143 or on
1144 .Pq Ic 1 .
1145 .It Feedback
1147 .Fa name Ns
1148 .Ic \&:1
1150 if switched on, or
1152 .Fa name Ns
1153 .Ic \&:0
1155 otherwise.
1157 .Ss GtkTextView
1158 There should be a dedicated
1159 .Sx GtkButton
1160 for sending (parts of) the text.
1161 If the name of the
1162 .Ic GtkTextView
1164 .Fa foo ,
1166 .Sx GtkButton
1167 named
1168 .Fa foo Ns
1169 .Ic _send_text
1170 will send the content of the
1171 .Ic GtkTextView ;
1173 .Sx GtkButton
1174 named
1175 .Fa foo Ns
1176 .Ic _send_selection
1177 will send the highlighted part the
1178 .Ic GtkTextView .
1179 .Bl -tag -width "commands "
1180 .It Commands
1182 .Fa name Ns
1183 .Ic :set_text
1184 .Fa string
1186 replaces the user-editable text with
1187 .Fa string Ns .
1190 .Fa name Ns
1191 .Ic :delete
1193 deletes the text.
1196 .Fa name Ns
1197 .Ic :insert_at_cursor
1198 .Fa string
1200 inserts
1201 .Fa string
1202 at cursor position.
1205 .Fa name Ns
1206 .Ic :place_cursor Brq Fa position | Ic end
1208 places the text cursor at
1209 .Fa position
1210 or at the end of the text.
1213 .Fa name Ns
1214 .Ic :place_cursor_at_line
1215 .Fa line
1217 places the text cursor at the beginning of
1218 .Fa line .
1221 .Fa name Ns
1222 .Ic :scroll_to_cursor
1224 scrolls to the cursor position if necessary.
1225 .It Feedback
1227 .Fa button_name Ns
1228 .Ic :text
1229 .Fa text
1230 .Qc ,
1231 .Fa button_name
1232 being the name of the
1233 .Sx GtkButton .
1234 Line endings in
1235 .Fa text
1236 are replaced by
1237 .Ic \en ,
1238 and backslashes are replaced by
1239 .Ic \e\e .
1241 .Ss GtkToggleButton
1242 .Bl -tag -width "commands "
1243 .It Commands
1245 .Fa name Ns
1246 .Ic :set_active Brq Ic 0 | 1
1248 switches the button off
1249 .Pq Ic 0
1250 or on
1251 .Pq Ic 1 .
1254 .Fa name Ns
1255 .Ic :set_label
1256 .Fa string
1258 replaces the button text with
1259 .Fa string .
1260 .It Feedback
1262 .Fa name Ns
1263 .Ic \&:1
1265 if switched on, or
1267 .Fa name Ns
1268 .Ic \&:0
1270 otherwise.
1272 .Ss GtkTreeView
1274 can deal with columns of type
1275 .Ic gboolean , gint , guint , glong , gulong , gint64 , guint64 , gfloat , gdouble ,
1277 .Ic gchararray .
1279 .Fa row
1281 .Fa column
1282 refer to the underlying model (usually a
1283 .Ic GtkListStore ) .
1284 .Bl -tag -width "commands "
1285 .It Commands
1287 .Fa name Ns
1288 .Ic :set
1289 .Fa row column data
1291 replaces the content at
1292 .Pq Fa row , column
1293 with
1294 .Fa data
1295 (which should be compatible with the type of
1296 .Fa column ) .
1299 .Fa name Ns
1300 .Ic :insert_row Brq Fa position | Ic end
1302 inserts a new, empty row at
1303 .Fa position
1304 or at the end of the list.
1307 .Fa name Ns
1308 .Ic :move_row
1309 .Fa origin Brq Fa destination | Ic end
1311 moves the row at
1312 .Fa origin
1314 .Fa destination
1315 or to the end of the list.
1318 .Fa name Ns
1319 .Ic :remove_row
1320 .Fa position
1322 removes the row at
1323 .Fa position .
1326 .Fa name Ns
1327 .Ic :scroll
1328 .Fa row column
1330 scrolls the cell at
1331 .Pq Fa row , column
1332 into view.
1333 .It Feedback
1335 .Fa name Ns
1336 .Ic \&:clicked
1340 .Fa name Ns
1341 .Ic \&: Ns
1342 .Fa column_type row column value
1343 .Qc ,
1344 one message per selected row and column in the underlying model if
1345 the set of selected rows has changed.
1347 .Ss GtkTreeViewColumn
1348 .Bl -tag -width "commands "
1349 .It Commands
1350 none
1351 .It Feedback
1353 .Fa name Ns
1354 .Ic \&:clicked
1357 .Sh EXAMPLES
1358 .Ss Discovering Pipeglade Interactively
1359 Suppose the interface in
1360 .Pa ./pipeglade.ui
1361 has a
1362 .Sx GtkLabel
1363 .Li label1
1364 and a
1365 .Sx GtkButton
1366 .Li button1 .
1367 After invoking
1368 .Dl pipeglade
1369 and clicking the
1370 .Sx GtkButton ,
1371 .Qq button1:clicked
1372 will be reported on the terminal.  Typing
1373 .Dl label1:set_text Button Label
1374 will change the text shown on the label into
1375 .Qq Button Label .
1376 .Ss One-Shot File Dialog
1377 Suppose the interface in
1378 .Pa ./simple_open.ui
1379 contains a
1380 .Sx GtkFileChooserDialog
1381 with an
1382 .Sq OK
1383 .Sx GtkButton
1384 named
1385 .Li main_ok .
1386 Invoking
1387 .Dl pipeglade -u simple_open.ui
1388 will open the dialog; pressing
1389 .Sq OK
1390 will close it after sending the selected filename to
1391 .Va stdout .
1392 .Ss One-Shot User Notification
1393 If the interface in
1394 .Pa ./simple_dialog.ui
1395 contains a
1396 .Sx GtkLabel
1397 .Li label1 ,
1398 then
1399 .Dl pipeglade -u simple_dialog.ui <<< \e
1400 .Dl \ \ \ \ \&"label1:set_text NOW READ THIS!\&"
1401 will set the label text accordingly and wait for user input.
1402 .Ss Continuous Input
1403 The following shell command displays a running clock:
1404 .Dl while true; do
1405 .Dl \ \ \ \ echo \&"label1:set_text `date`\&";
1406 .Dl \ \ \ \ sleep 1;
1407 .Dl done | pipeglade -u simple_dialog.ui
1408 .Ss Continuous Input and Output
1409 The following shell script fragment sets up
1411 for continuous communication with another program,
1412 .Li main_prog :
1413 .Dl pipeglade -i in.fifo -o out.fifo &
1414 .Dl # wait for in.fifo and out.fifo to appear
1415 .Dl while test \& ! \e( -e in.fifo -a -e out.fifo \e); do :; done
1416 .Dl main_prog <out.fifo >in.fifo
1417 .Sh EXIT STATUS
1419 exits 0 on success, and >0 if an error occurs.
1420 .Sh SEE ALSO
1421 .Xr glade 1 ,
1422 .Xr dialog 1 ,
1423 .Xr gmessage 1 ,
1424 .Xr kdialog 1 ,
1425 .Xr whiptail 1 ,
1426 .Xr xmessage 1 ,
1427 .Xr zenity 1
1428 .Sh AUTHOR
1430 was written by
1431 .An Bert Burgemeister Aq trebbu@googlemail.com .
1432 .\" .Sh BUGS