Support GtkTreeStore
[pipeglade.git] / pipeglade.1
blob1cf5c3e8ec0c1248979c46428211b86734fe2267
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 November 8, 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 e Ar parent-xid
56 Embeds the main window into the XEmbed socket  
57 .Ar parent-xid
58 of another process.
59 .It Fl i Ar in-fifo
60 Creates a named pipe
61 .Ar in-fifo
62 if necessary, and uses it for command input.
63 .Pp
64 A command is a line of text.  Its format is
65 .Qo
66 .Fa name Ns
67 .Ic \&: Ns
68 .Fa action
69 .Bq Fa data
70 .Qc
71 where
72 .Fa name
73 is the name of the receiving widget;
74 .Fa data
75 is separated from the rest of the command by a single whitespace
76 character.  Commands whose first non-whitespace character is
77 .Ic #
78 are considered comments and ignored.
79 Any occurences of the two-character sequences
80 .Ic \en
81 and
82 .Ic \er
83 will be converted into newline or carriage return, respectively.
84 Every other character following a backslash will be left unchanged,
85 but the backslash will be removed.  Invalid commands are reported on
86 .Va stderr
87 and are otherwise ignored.  See
88 .Sx WIDGETS
89 for applicable commands.
90 .Pp
91 It is an error if
92 .Ar in-fifo
93 exists but is not a named pipe.  The named pipe
94 .Ar in-fifo
95 is deleted upon successful program termination.
96 .Pp
97 Default command input is
98 .Va stdin .
99 .It Fl o Ar out-fifo
100 Creates a named pipe
101 .Ar out-fifo
102 if necessary, and uses it for output of feedback messages from the
103 graphical user interface.
105 A feedback message is a line of text; its format is
107 .Fa name Ns
108 .Ic \&: Ns
109 .Fa info
110 .Bq Fa data
112 where
113 .Fa name
114 is the name of the sending widget.  See
115 .Sx WIDGETS
116 for possible feedback messages.
118 It is an error if
119 .Ar out-fifo
120 exists but is not a named pipe.  The named pipe
121 .Ar out-fifo
122 is deleted upon successful program termination.
124 Default feedback-message output is
125 .Va stdout .
126 .It Fl u Ar builder-file
127 Displays the graphical user interface
128 .Ar builder-file
129 which should be created using the
130 .Xr glade 1
131 user interface designer and saved in GtkBuilder (.ui) format.  Widget
132 names should be alphanumeric, including underscores, and the main
133 window must be named
134 .Ic main .
136 Default is
137 .Pa ./pipeglade.ui .
138 .It Fl G
139 Prints the GTK+ version and exits.
140 .It Fl V
141 Prints the
142 .Nm pipeglade
143 version and exits.
145 .Sh WIDGETS
146 .Ss Any Widget (including widgets not mentioned in this document)
147 .Bl -tag -width "commands "
148 .It Commands
150 .Fa name Ns
151 .Ic :set_sensitive
152 .Brq Ic 0 |  1
154 makes the widget grayed out
155 .Pq Ic 0
156 or responsive
157 .Pq Ic 1 .
160 .Fa name Ns
161 .Ic :set_visible
162 .Brq Ic 0 |  1
164 hides
165 .Pq Ic 0
166 the widget, or makes it visible
167 .Pq Ic 1 .
170 .Fa name Ns
171 .Ic :style
172 .Bo Fa prop Ic : Ns Fa val Ns
174 .Ic ;
175 .Fa prop Ic : Ns Fa val ...
179 sets properties
180 .Fa prop
181 of the widget style to
182 .Fa val .
183 Properties not explicitly specified are reset to their default values.
184 Examples:
185 .Bl -dash -offset indent -compact
187 .Qq Li label1:style font:Bold 11; background-color:green
189 .Qq Li label1:style font-style:italic; font-weight:bold; color:blue
191 .Qq Li frame1:style border-color:red yellow; border-width:5px
193 .Qq Li frame1:style border-radius:10px; transition:10s
195 For a description of possible color notations see
196 .Sx GtkColorButton .
199 .Fa name Ns
200 .Ic :force
202 simulates a click on the
203 .Fa name Ns
204 d widget, triggering a response as described with the widgets below.
205 Exceptions:
206 .Bl -dash -offset indent -compact
208 The command is ignored by
209 .Sx GtkComboBoxText
210 (address its child
211 .Sx GtkEntry
212 instead),
213 .Sx GtkTreeView ,
215 .Sx GtkTreeViewColumn ;
217 .Sx GtkCalendar , GtkEntry , GtkFileChooserButton , GtkScale ,
219 .Sx GtkSpinButton
220 report the currently selected item;
222 .Sx GtkColorButton
224 .Sx GtkFontButton
225 just open their respective dialogs.
229 .Fa name Ns
230 .Ic :main_quit
232 kills the user interface.  A non-empty
233 .Fa name
234 is required but ignored.
236 .Ss GtkButton
237 .Bl -tag -width "commands "
238 .It Commands
240 .Fa name Ns
241 .Ic :set_label
242 .Fa string
244 replaces the button text with
245 .Fa string .
246 .It Feedback
248 .Fa name Ns
249 .Ic \&:clicked
252 .Ic GtkButton Ns
253 s with names ending in
254 .Ic _ok , _apply , _cancel , _send_text ,
256 .Ic _send_selection
257 may work differently; see
258 .Sx GtkDialog , GtkFileChooserDialog ,
260 .Sx GtkTextView
261 for details.
263 .Ss GtkCalendar
264 .Bl -tag -width "commands "
265 .It Commands
267 .Fa name Ns
268 .Ic :select_date
269 .Fa yyyy Ns
270 .Ic - Ns
271 .Fa mm Ns
272 .Ic - Ns
273 .Fa dd
275 selects the date on the calendar.
278 .Fa name Ns
279 .Ic :mark_day
280 .Fa day
282 marks
283 .Fa day
284 .Pq 1-31
285 on the calendar.
288 .Fa name Ns
289 .Ic :clear_marks
291 unmarks all days on the calendar.
292 .It Feedback
294 .Fa name Ns
295 .Ic \&:clicked
296 .Fa yyyy Ns
297 .Ic - Ns
298 .Fa mm Ns
299 .Ic - Ns
300 .Fa dd
304 .Fa name Ns
305 .Ic \&:doubleclicked
306 .Fa yyyy Ns
307 .Ic - Ns
308 .Fa mm Ns
309 .Ic - Ns
310 .Fa dd
313 .Ss GtkCheckButton
314 .Bl -tag -width "commands "
315 .It Commands
317 .Fa name Ns
318 .Ic :set_active Brq Ic 0 | 1
320 switches the check mark off
321 .Pq Ic 0
322 or on
323 .Pq Ic 1 .
326 .Fa name Ns
327 .Ic :set_label
328 .Fa string
330 replaces the button text with
331 .Fa string .
332 .It Feedback
334 .Fa name Ns
335 .Ic \&:1
337 if switched on, or
339 .Fa name Ns
340 .Ic \&:0
342 otherwise.
344 .Ss GtkColorButton
345 .Bl -tag -width "commands "
346 .It Commands
348 .Fa name Ns
349 .Ic :set_color
350 .Fa color
352 preselects the color.
353 .Fa color
354 can be
355 .Bl -dash -offset indent -compact
357 a standard X11 color name, like
358 .Qq Li Dark Sea Green ,
360 a hexadecimal value in the form
361 .Ic # Ns
362 .Fa rgb ,
363 .Ic # Ns
364 .Fa rrggbb ,
365 .Ic # Ns
366 .Fa rrrgggbbb ,
368 .Ic # Ns
369 .Fa rrrrggggbbbb ,
371 an RGB color in the form
372 .Ic rgb( Ns
373 .Fa red Ns
374 .Ic \&, Ns
375 .Fa green Ns
376 .Ic \&, Ns
377 .Fa blue Ns
378 .Ic \&) ,
381 an RGBA color in the form
382 .Ic rgba( Ns
383 .Fa red Ns
384 .Ic \&, Ns
385 .Fa green Ns
386 .Ic \&, Ns
387 .Fa blue Ns
388 .Ic \&, Ns
389 .Fa alpha Ns
390 .Ic \&) .
392 .It Feedback
394 .Fa name Ns
395 .Ic \&:color
396 .Ic rgb( Ns
397 .Fa red Ns
398 .Ic \&, Ns
399 .Fa green Ns
400 .Ic \&, Ns
401 .Fa blue Ns
402 .Ic \&)
406 .Fa name Ns
407 .Ic \&:color
408 .Ic rgba( Ns
409 .Fa red Ns
410 .Ic \&, Ns
411 .Fa green Ns
412 .Ic \&, Ns
413 .Fa blue Ns
414 .Ic \&, Ns
415 .Fa alpha Ns
416 .Ic \&)
417 .Qc .
418 .Fa red , green ,
420 .Fa blue
421 lie between 0 and 255, and
422 .Fa alpha
423 between 0 and 1.
425 .Ss GtkComboBoxText
427 .Ic GtkComboBoxText
428 should contain a
429 .Ic GtkEntry .
430 .Bl -tag -width "commands "
431 .It Commands
433 .Fa name Ns
434 .Ic :prepend_text
435 .Fa string
439 .Fa name Ns
440 .Ic :append_text
441 .Fa string
443 prepend/append a new selectable item marked
444 .Fa string .
447 .Fa name Ns
448 .Ic :insert_text
449 .Fa position string
451 inserts item
452 .Fa string
454 .Fa position .
457 .Fa name Ns
458 .Ic :remove
459 .Fa position
461 removes the item at
462 .Fa position .
463 .It Feedback
465 .Fa entry_name Ns
466 .Ic \&:text
467 .Fa text
468 .Qc ,
469 .Fa entry_name
470 being the name of the child
471 .Ic GtkEntry .
473 .Ss GtkDialog
475 .Ic GtkDialog
476 that is named
477 .Fa foo
478 will be invoked by a
479 .Sx GtkMenuItem
480 or a
481 .Sx GtkImageMenuItem
482 that is named
483 .Fa foo Ns
484 .Ic _invoke .
487 .Ic GtkDialog
488 should have a
489 .Sq Cancel
490 .Sx GtkButton
491 named
492 .Fa foo Ns
493 .Ic _cancel
495 .Ic main_cancel
496 if the dialog is the sole window of the GUI and therefore named
497 .Ic main
498 .Pc .
499 .Bl -tag -width "commands "
500 .It Commands
501 none
502 .It Feedback
503 none
505 .Ss GtkDrawingArea
506 Most drawing commands expect an
507 .Fa id
508 parameter (an arbitrary non-negative integer) which can be used to reference the
509 command for later removal.
510 .Bl -tag -width "commands "
511 .It Commands
513 .Fa name Ns
514 .Ic :arc
515 .Fa id x y radius angle1 angle2
517 adds a circular arc to the current path.  The arc is centered at
518 .Pq Fa x , y
519 and proceeds clockwise from
520 .Fa angle1
522 .Fa angle2
524 in degrees
525 .Pc .
528 .Fa name Ns
529 .Ic :arc_negative
530 .Fa id x y radius angle1 angle2
532 adds a circular arc to the current path.  The arc is centered at
533 .Pq Fa x , y
534 and proceeds counterclockwise from
535 .Fa angle1
537 .Fa angle2
539 in degrees
540 .Pc .
543 .Fa name Ns
544 .Ic :close_path
545 .Fa id
547 adds a line segment from the current point to the point most recently
548 passed to
549 .Fa name Ns
550 .Ic :move_to
552 .Fa name Ns
553 .Ic :rel_move_to .
556 .Fa name Ns
557 .Ic :curve_to
558 .Fa id x1 y1 x2 y2 x3 y3
560 adds a cubic Bezier spline from the current point to
561 .Pq Fa x3 , y3 ,
562 using
563 .Pq Fa x1 , y1
565 .Pq Fa x2 , y2
566 as control points.
569 .Fa name Ns
570 .Ic :fill
571 .Fa id
573 fills the current path and clears it.
576 .Fa name Ns
577 .Ic :fill_preserve
578 .Fa id
580 fills the current path without clearing it.
583 .Fa name Ns
584 .Ic :line_to
585 .Fa id x y
587 adds a line from the current point to
588 .Pq Fa x , y .
591 .Fa name Ns
592 .Ic :move_to
593 .Fa id x y
595 sets the current point to
596 .Pq Fa x , y .
599 .Fa name Ns
600 .Ic :rectangle
601 .Fa id x y width height
603 adds a rectangle to the current path.  The top left corner is at
604 .Pq Fa x , y .
607 .Fa name Ns
608 .Ic :refresh
610 redraws the
611 .Ic GtkDrawingArea
612 .Fa name .
615 .Fa name Ns
616 .Ic :rel_curve_to
617 .Fa id dx1 dy1 dx2 dy2 dx3 dy3
619 adds a cubic Bezier spline from the current point to
620 .Pq Fa dx3 , dy3 ,
621 using
622 .Pq Fa dx1 , dy1
624 .Pq Fa dx2 , dy2
625 as control points.  All coordinates are offsets relative to the
626 current point.
629 .Fa name Ns
630 .Ic :rel_line_to
631 .Fa id dx dy
633 adds a line from the current point to a point offset from there by
634 .Pq Fa dx , dy .
637 .Fa name Ns
638 .Ic :rel_move_to
639 .Fa id dx dy
641 moves the current point by
642 .Pq Fa dx , dy .
645 .Fa name Ns
646 .Ic :remove
647 .Fa id
649 removes the elements with
650 .Fa id
651 from the
652 .Ic GtkDrawingArea
653 .Fa name .
656 .Fa name Ns
657 .Ic :set_dash
658 .Fa id l
660 sets the dash pattern to
661 .Fa l
663 .Fa l
664 off.
667 .Fa name Ns
668 .Ic :set_dash
669 .Fa id l1on l1off l2on l2off ...
671 resets the dash pattern to a line with arbitrary on/off portions.
674 .Fa name Ns
675 .Ic :set_dash
676 .Fa id
678 resets the dash pattern to a solid line.
681 .Fa name Ns
682 .Ic :set_font_size
683 .Fa id size
685 sets the font size for subsequent calls of
686 .Fa name Ns
687 .Ic :show_text .
690 .Fa name Ns
691 .Ic :set_line_cap
692 .Fa id
693 .Brq Ic butt | round | square
695 sets the line cap style.
698 .Fa name Ns
699 .Ic :set_line_join
700 .Fa id
701 .Brq Ic miter | round | bevel
703 sets the line junction style.
706 .Fa name Ns
707 .Ic :set_line_width
708 .Fa id width
710 sets the line width.
713 .Fa name Ns
714 .Ic :set_source_rgba
715 .Fa id color
717 sets the color.
718 .Fa color
719 is in the format used with
720 .Sx GtkColorButton .
723 .Fa name Ns
724 .Ic :show_text
725 .Fa id text
727 writes
728 .Fa text ,
729 beginning at the current point.
732 .Fa name Ns
733 .Ic :stroke
734 .Fa id
736 strokes the current path and clears it.
739 .Fa name Ns
740 .Ic :stroke_preserve
741 .Fa id
743 strokes the current path without clearing it.
744 .It Feedback
745 none
747 .Ss GtkEntry
748 .Bl -tag -width "commands "
749 .It Commands
751 .Fa name Ns
752 .Ic :set_text
753 .Fa string
755 replaces the user-editable text with
756 .Fa string .
759 .Fa name Ns
760 .Ic :set_placeholder_text
761 .Fa string
763 sets the
764 .Fa string
765 that is displayed when the entry is empty and unfocused.
766 .It Feedback
768 .Fa name Ns
769 .Ic \&:text
770 .Fa text
771 .Qc ,
772 once for each change of
773 .Fa text .
775 .Ss GtkExpander
776 .Bl -tag -width "commands "
777 .It Commands
779 .Fa name Ns
780 .Ic :set_label
781 .Fa string
783 replaces the expander label text with
784 .Fa string .
787 .Fa name Ns
788 .Ic :set_expanded
789 .Brq Ic 0 |  1
791 hides
792 .Pq Ic 0
793 the child widget, or makes it visible
794 .Pq Ic 1 .
795 .It Feedback
796 none
798 .Ss GtkFileChooserButton
799 .Bl -tag -width "commands "
800 .It Commands
802 .Fa name Ns
803 .Ic :set_filename
804 .Fa path
806 preselects
807 .Fa path
808 to the extent it exists.
809 .It Feedback
811 .Fa name Ns
812 .Ic \&:file
813 .Fa pathname
815 if the selection has changed.
817 .Ss GtkFileChooserDialog
819 .Ic GtkFileChooserDialog
820 that is named
821 .Fa foo
822 will be invoked by a
823 .Sx GtkMenuItem
824 or a
825 .Sx GtkImageMenuItem
826 that is named
827 .Fa foo Ns
828 .Ic _invoke
831 .Ic GtkFileChooserDialog
832 should have an
833 .Sq OK
834 .Sx GtkButton
835 named
836 .Fa foo Ns
837 .Ic _ok
839 .Ic main_ok
840 if the dialog is the sole window of the GUI and therefore named
841 .Ic main
842 .Pc .
845 .Ic GtkFileChooserDialog
846 may have a
847 .Sq Cancel
848 .Sx GtkButton
849 named
850 .Fa foo Ns
851 .Ic _cancel
853 .Ic main_cancel
854 if the dialog is the sole window of the GUI and therefore named
855 .Ic main
856 .Pc .
859 .Ic GtkFileChooserDialog
860 may have an
861 .Sq Apply
862 .Sx GtkButton
863 named
864 .Fa foo Ns
865 .Ic _apply
867 .Ic main_apply
868 if the dialog is the sole window of the GUI and therefore named
869 .Ic main
870 .Pc .
871 .Bl -tag -width "commands "
872 .It Commands
874 .Fa name Ns
875 .Ic :set_filename
876 .Fa path
878 preselects
879 .Fa path
880 to the extent it exists.
883 .Fa name Ns
884 .Ic :set_current_name
885 .Fa string
887 makes
888 .Fa string
889 the suggested filename, which may not yet exist.
890 .Fa string
891 should either resemble an absolute path, or the
892 .Fa directory
893 must be set
894 separately by
895 .Fa name Ns
896 .Ic :set_filename
897 .Fa directory .
898 .It Feedback
900 .Fa name Ns
901 .Ic :file
902 .Fa  pathname
904 and/or
906 .Fa name Ns
907 .Ic :folder
908 .Fa  pathname
911 .Ss GtkFontButton
912 .Bl -tag -width "commands "
913 .It Commands
915 .Fa name Ns
916 .Ic :set_font_name
917 .Fa fontname
919 preselects the font.
920 .It Feedback
922 .Fa name Ns
923 .Ic \&:font
924 .Fa fontname
927 .Ss GtkFrame
928 .Bl -tag -width "commands "
929 .It Commands
931 .Fa name Ns
932 .Ic :set_label
933 .Fa text
935 replaces the frame label text with
936 .Fa string .
937 .It Feedback
938 none
940 .Ss GtkImage
941 .Bl -tag -width "commands "
942 .It Commands
944 .Fa name Ns
945 .Ic :set_from_icon_name
946 .Fa icon-name
948 replaces the image with one of the standard icons.
951 .Fa name Ns
952 .Ic :set_from_file
953 .Fa path
955 replaces the image by the one found at
956 .Fa path Ns .
957 .It Feedback
958 none
960 .Ss GtkLabel
961 .Bl -tag -width "commands "
962 .It Commands
964 .Fa name Ns
965 .Ic :set_text
966 .Fa string
968 replaces the label text with
969 .Fa string .
970 .It Feedback
971 none
973 .Ss GtkMenuItem, GtkImageMenuItem
974 .Bl -tag -width "commands "
975 .It Commands
976 none
977 .It Feedback
979 .Ic GtkMenuItem
981 .Ic GtkImageMenuItem
982 with the name
983 .Fa foo Ns
984 .Ic _invoke
985 will invoke the
986 .Sx GtkDialog
988 .Sx GtkFileChooserDialog
989 named
990 .Fa foo
991 if it exists.  If there isn't any dialog attached to the
992 .Ic GtkMenuItem ,
993 it reports
995 .Fa name Ns
996 .Ic \&:active
997 .Fa label
998 .Qc .
1000 .Ss GtkNotebook
1001 .Bl -tag -width "commands "
1002 .It Commands
1004 .Fa name Ns
1005 .Ic :set_current_page
1006 .Fa numeric
1008 switches to page number
1009 .Fa numeric
1011 starting from 0
1012 .Pc .
1013 .It Feedback
1014 none
1016 .Ss GtkPrintUnixDialog
1017 .Bl -tag -width "commands "
1018 .It Commands
1020 .Fa name Ns
1021 .Ic :print
1022 .Fa file.ps
1024 opens the print dialog.  Pressing the
1025 .Qq Print
1026 button sends
1027 .Fa file.ps
1028 to the printer the user selected in the dialog.
1029 .It Feedback
1030 none
1032 .Ss GtkProgressBar
1033 .Bl -tag -width "commands "
1034 .It Commands
1036 .Fa name Ns
1037 .Ic :set_fraction
1038 .Fa numeric
1040 moves the progress bar to
1041 .Fa numeric
1043 between 0 and 1
1044 .Pc .
1047 .Fa name Ns
1048 .Ic :set_text
1049 .Bq Fa string
1051 replaces the text of the progress bar with
1052 .Fa string .
1053 Default is the progress percentage.
1054 .It Feedback
1055 none
1057 .Ss GtkRadioButton
1058 .Bl -tag -width "commands "
1059 .It Commands
1061 .Fa name Ns
1062 .Ic :set_active 1
1064 switches the button on.  All other buttons of the same group will go off
1065 automatically.
1068 .Fa name Ns
1069 .Ic :set_label
1070 .Fa string
1072 replaces the button text with
1073 .Fa string .
1074 .It Feedback
1076 .Fa name Ns
1077 .Ic \&:1
1079 if switched on, or
1081 .Fa name Ns
1082 .Ic \&:0
1084 otherwise.
1086 .Ss GtkScale
1087 .Bl -tag -width "commands "
1088 .It Commands
1090 .Fa name Ns
1091 .Ic :set_value
1092 .Fa numeric
1094 moves the slider to value
1095 .Fa numeric .
1096 .It Feedback
1098 .Fa name Ns
1099 .Ic \&:value
1100 .Fa floating_point_text
1103 .Ss GtkSocket
1104 .Ic GtkSocket
1105 may be unsupported by Glade, but its definition can be inserted
1106 manually into the GtkBuilder (.ui) file:
1107 .Bf -literal
1108  \ \ <child>
1109  \ \ \ \ <object class="GtkSocket" id="socket1">
1110  \ \ \ \ \ \ <property name="visible">True</property>
1111  \ \ \ \ \ \ <property name="can_focus">True</property>
1112  \ \ \ \ </object>
1113  \ \ \ \ <packing>
1114  \ \ \ \ \ \ <property name="expand">True</property>
1115  \ \ \ \ \ \ <property name="fill">True</property>
1116  \ \ \ \ \ \ <property name="position">1</property>
1117  \ \ \ \ </packing>
1118  \ \ </child>
1120 .Bl -tag -width "commands "
1121 .It Commands
1123 .Fa name Ns
1124 .Ic :id
1126 requests a feedback message containing the socket
1127 .Fa xid .
1128 .It Feedback
1130 .Fa name Ns
1131 .Ic :id
1132 .Fa xid
1134 can be used by another process to XEmbed its widgets into the
1135 .Ic GtkSocket .
1138 .Fa name Ns
1139 .Ic :plug-added
1140 .Qc ,
1142 .Fa name Ns
1143 .Ic :plug-removed
1144 .Qc .
1145 Notification that the other process has inserted its widgets into or
1146 removed them from the
1147 .Ic GtkSocket .
1149 .Ss GtkSpinButton
1150 .Bl -tag -width "commands "
1151 .It Commands
1153 .Fa name Ns
1154 .Ic :set_text
1155 .Fa string
1157 sets the selected value to
1158 .Fa string .
1159 .It Feedback
1161 .Fa name Ns
1162 .Ic \&:text
1163 .Fa text
1166 .Ss GtkSpinner
1167 .Bl -tag -width "commands "
1168 .It Commands
1170 .Fa name Ns
1171 .Ic :start
1175 .Fa name Ns
1176 .Ic :stop
1178 start and stop the spinner.
1179 .It Feedback
1180 none
1182 .Ss GtkStatusbar
1183 .Bl -tag -width "commands "
1184 .It Commands
1186 .Fa name Ns
1187 .Ic :push
1188 .Fa string
1190 displays
1191 .Fa string
1192 in the statusbar.
1195 .Fa name Ns
1196 .Ic :pop
1198 removes the last entry from the statusbar, revealing the penultimate
1199 entry.
1202 .Fa name Ns
1203 .Ic :remove_all
1205 empties the statusbar.
1206 .It Feedback
1207 none
1209 .Ss GtkSwitch
1210 .Bl -tag -width "commands "
1211 .It Commands
1213 .Fa name Ns
1214 .Ic :set_active Brq Ic 0 | 1
1216 turns the switch off
1217 .Pq Ic 0
1218 or on
1219 .Pq Ic 1 .
1220 .It Feedback
1222 .Fa name Ns
1223 .Ic \&:1
1225 if switched on, or
1227 .Fa name Ns
1228 .Ic \&:0
1230 otherwise.
1232 .Ss GtkTextView
1233 There should be a dedicated
1234 .Sx GtkButton
1235 for sending (parts of) the text.
1236 If the name of the
1237 .Ic GtkTextView
1239 .Fa foo ,
1241 .Sx GtkButton
1242 named
1243 .Fa foo Ns
1244 .Ic _send_text
1245 will send the content of the
1246 .Ic GtkTextView ;
1248 .Sx GtkButton
1249 named
1250 .Fa foo Ns
1251 .Ic _send_selection
1252 will send the highlighted part the
1253 .Ic GtkTextView .
1254 .Bl -tag -width "commands "
1255 .It Commands
1257 .Fa name Ns
1258 .Ic :set_text
1259 .Fa string
1261 replaces the user-editable text with
1262 .Fa string Ns .
1265 .Fa name Ns
1266 .Ic :delete
1268 deletes the text.
1271 .Fa name Ns
1272 .Ic :insert_at_cursor
1273 .Fa string
1275 inserts
1276 .Fa string
1277 at cursor position.
1280 .Fa name Ns
1281 .Ic :place_cursor Brq Fa position | Ic end
1283 places the text cursor at
1284 .Fa position
1285 or at the end of the text.
1288 .Fa name Ns
1289 .Ic :place_cursor_at_line
1290 .Fa line
1292 places the text cursor at the beginning of
1293 .Fa line .
1296 .Fa name Ns
1297 .Ic :scroll_to_cursor
1299 scrolls to the cursor position if necessary.
1300 .It Feedback
1302 .Fa button_name Ns
1303 .Ic :text
1304 .Fa text
1305 .Qc ,
1306 .Fa button_name
1307 being the name of the
1308 .Sx GtkButton .
1309 Line endings in
1310 .Fa text
1311 are replaced by
1312 .Ic \en ,
1313 and backslashes are replaced by
1314 .Ic \e\e .
1316 .Ss GtkToggleButton
1317 .Bl -tag -width "commands "
1318 .It Commands
1320 .Fa name Ns
1321 .Ic :set_active Brq Ic 0 | 1
1323 switches the button off
1324 .Pq Ic 0
1325 or on
1326 .Pq Ic 1 .
1329 .Fa name Ns
1330 .Ic :set_label
1331 .Fa string
1333 replaces the button text with
1334 .Fa string .
1335 .It Feedback
1337 .Fa name Ns
1338 .Ic \&:1
1340 if switched on, or
1342 .Fa name Ns
1343 .Ic \&:0
1345 otherwise.
1347 .Ss GtkTreeView
1349 can deal with columns of type
1350 .Ic gboolean , gint , guint , glong , gulong , gint64 , guint64 , gfloat , gdouble ,
1352 .Ic gchararray .
1354 .Fa row
1356 .Fa column
1357 refer to the underlying model
1358 .Ic ( GtkListStore
1360 .Ic GtkTreeStore ) .
1361 .Fa row
1362 is a sequence of one or more colon-separated integers, e.g.
1363 .Qq 3
1365 .Qq 0:0:1 .
1366 .Bl -tag -width "commands "
1367 .It Commands
1369 .Fa name Ns
1370 .Ic :set
1371 .Fa row column data
1373 replaces the content at
1374 .Pq Fa row , column
1375 with
1376 .Fa data
1377 (which should be compatible with the type of
1378 .Fa column ) .
1381 .Fa name Ns
1382 .Ic :insert_row Brq Fa row Bo Ic as_child Bc | Ic end
1384 inserts a new, empty row; either as a sibling of
1385 .Fa row
1386 at position
1387 .Fa row ,
1388 or as a child of
1389 .Fa row ,
1390 or at the end of the list, respectively.
1393 .Fa name Ns
1394 .Ic :move_row
1395 .Fa origin Brq Fa destination | Ic end
1397 moves the row at
1398 .Fa origin
1399 within its current level to
1400 .Fa destination
1401 or to the end.
1404 .Fa name Ns
1405 .Ic :remove_row
1406 .Fa row
1408 removes the row at position
1409 .Fa row .
1412 .Fa name Ns
1413 .Ic :clear
1415 removes all rows.
1418 .Fa name Ns
1419 .Ic :expand
1420 .Fa row
1422 expands one level of the subtree below
1423 .Fa row .
1426 .Fa name Ns
1427 .Ic :expand_all
1428 .Bq Fa row
1430 expands the subtree below
1431 .Fa row ,
1432 or the whole tree.
1435 .Fa name Ns
1436 .Ic :collapse
1437 .Bq Fa row
1439 collapses the subtree below
1440 .Fa row ,
1441 or the whole tree.
1444 .Fa name Ns
1445 .Ic :set_cursor
1446 .Bq Fa row
1448 sets the cursor to
1449 .Fa row ,
1450 or unsets it.
1453 .Fa name Ns
1454 .Ic :scroll
1455 .Fa row column
1457 scrolls the cell at
1458 .Pq Fa row , column
1459 into view.
1460 .It Feedback
1462 .Fa name Ns
1463 .Ic \&:clicked
1467 .Fa name Ns
1468 .Ic \&: Ns
1469 .Fa column_type row column value
1470 .Qc ,
1471 one message per selected row and column in the underlying model if
1472 the set of selected rows has changed.
1474 .Ss GtkTreeViewColumn
1475 .Bl -tag -width "commands "
1476 .It Commands
1477 none
1478 .It Feedback
1480 .Fa name Ns
1481 .Ic \&:clicked
1484 .Ss GtkWindow
1485 .Bl -tag -width "commands "
1486 .It Commands
1488 .Fa name Ns
1489 .Ic :set_title
1490 .Fa string
1492 replaces the text in the title bar with
1493 .Fa string .
1496 .Fa name Ns
1497 .Ic :resize
1498 .Bq Fa width height
1500 changes the window size to
1501 .Fa width
1503 .Fa height
1504 pixels if specified, or to the default size.
1507 .Fa name Ns
1508 .Ic :move
1509 .Fa x y
1511 moves the window to position
1512 .Fa x , y .
1515 .Fa name Ns
1516 .Ic :fullscreen
1520 .Fa name Ns
1521 .Ic :unfullscreen
1523 switch fullscreen mode on and off.
1524 .It Feedback
1525 none
1527 .Sh EXAMPLES
1528 .Ss Discovering Pipeglade Interactively
1529 Suppose the interface in
1530 .Pa ./pipeglade.ui
1531 has a
1532 .Sx GtkLabel
1533 .Li label1
1534 and a
1535 .Sx GtkButton
1536 .Li button1 .
1537 After invoking
1538 .Dl pipeglade
1539 and clicking the
1540 .Sx GtkButton ,
1541 .Qq button1:clicked
1542 will be reported on the terminal.  Typing
1543 .Dl label1:set_text Button Label
1544 will change the text shown on the label into
1545 .Qq Button Label .
1546 .Ss One-Shot File Dialog
1547 Suppose the interface in
1548 .Pa ./simple_open.ui
1549 contains a
1550 .Sx GtkFileChooserDialog
1551 with an
1552 .Sq OK
1553 .Sx GtkButton
1554 named
1555 .Li main_ok .
1556 Invoking
1557 .Dl pipeglade -u simple_open.ui
1558 will open the dialog; pressing
1559 .Sq OK
1560 will close it after sending the selected filename to
1561 .Va stdout .
1562 .Ss One-Shot User Notification
1563 If the interface in
1564 .Pa ./simple_dialog.ui
1565 contains a
1566 .Sx GtkLabel
1567 .Li label1 ,
1568 then
1569 .Dl pipeglade -u simple_dialog.ui <<< \e
1570 .Dl \ \ \ \ \&"label1:set_text NOW READ THIS!\&"
1571 will set the label text accordingly and wait for user input.
1572 .Ss Continuous Input
1573 The following shell command displays a running clock:
1574 .Dl while true; do
1575 .Dl \ \ \ \ echo \&"label1:set_text `date`\&";
1576 .Dl \ \ \ \ sleep 1;
1577 .Dl done | pipeglade -u simple_dialog.ui
1578 .Ss Continuous Input and Output
1579 The following shell script fragment sets up
1581 for continuous communication with another program,
1582 .Li main_prog :
1583 .Dl pipeglade -i in.fifo -o out.fifo &
1584 .Dl # wait for in.fifo and out.fifo to appear
1585 .Dl while test \& ! \e( -e in.fifo -a -e out.fifo \e); do :; done
1586 .Dl main_prog <out.fifo >in.fifo
1587 .Sh EXIT STATUS
1589 exits 0 on success, and >0 if an error occurs.
1590 .Sh SEE ALSO
1591 .Xr glade 1 ,
1592 .Xr dialog 1 ,
1593 .Xr gmessage 1 ,
1594 .Xr kdialog 1 ,
1595 .Xr whiptail 1 ,
1596 .Xr xmessage 1 ,
1597 .Xr zenity 1
1598 .Sh AUTHOR
1600 was written by
1601 .An Bert Burgemeister Aq trebbu@googlemail.com .
1602 .\" .Sh BUGS