Add support for GtkSocket
[pipeglade.git] / pipeglade.1
blobcfe0c62e0973677b4c92fbd5e8417d533fcc2177
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 GtkPrintUnixDialog
1004 .Bl -tag -width "commands "
1005 .It Commands
1007 .Fa name Ns
1008 .Ic :print
1009 .Fa file.ps
1011 opens the print dialog.  Pressing the
1012 .Qq Print
1013 button sends
1014 .Fa file.ps
1015 to the selected printer.
1016 .It Feedback
1017 none
1019 .Ss GtkProgressBar
1020 .Bl -tag -width "commands "
1021 .It Commands
1023 .Fa name Ns
1024 .Ic :set_fraction
1025 .Fa numeric
1027 moves the progress bar to
1028 .Fa numeric
1030 between 0 and 1
1031 .Pc .
1034 .Fa name Ns
1035 .Ic :set_text
1036 .Bq Fa string
1038 replaces the text of the progress bar with
1039 .Fa string .
1040 Default is the progress percentage.
1041 .It Feedback
1042 none
1044 .Ss GtkRadioButton
1045 .Bl -tag -width "commands "
1046 .It Commands
1048 .Fa name Ns
1049 .Ic :set_active 1
1051 switches the button on.  All other buttons of the same group will go off
1052 automatically.
1055 .Fa name Ns
1056 .Ic :set_label
1057 .Fa string
1059 replaces the button text with
1060 .Fa string .
1061 .It Feedback
1063 .Fa name Ns
1064 .Ic \&:1
1066 if switched on, or
1068 .Fa name Ns
1069 .Ic \&:0
1071 otherwise.
1073 .Ss GtkScale
1074 .Bl -tag -width "commands "
1075 .It Commands
1077 .Fa name Ns
1078 .Ic :set_value
1079 .Fa numeric
1081 moves the slider to value
1082 .Fa numeric .
1083 .It Feedback
1085 .Fa name Ns
1086 .Ic \&:value
1087 .Fa floating_point_text
1090 .Ss GtkSocket
1091 .Ic GtkSocket
1092 may be unsupported by Glade so its definition needs to be inserted
1093 manually into the GtkBuilder (.ui) file:
1094 .Bf -literal
1095  <child>
1096    <object class="GtkSocket" id="socket1">
1097      <property name="visible">True</property>
1098      <property name="can_focus">True</property>
1099    </object>
1100    <packing>
1101      <property name="expand">False</property>
1102      <property name="fill">True</property>
1103      <property name="position">1</property>
1104    </packing>
1105  </child>
1107 .Bl -tag -width "commands "
1108 .It Commands
1110 .Fa name Ns
1111 .Ic :id
1113 requests a feedback message containing the socket
1114 .Fa id .
1115 .It Feedback
1117 .Fa name Ns
1118 .Ic :id
1119 .Fa id
1121 can be used by another process to XEmbed its widgets into the
1122 .Ic GtkSocket .
1125 .Fa name Ns
1126 .Ic :plug-added
1127 .Qc ,
1129 .Fa name Ns
1130 .Ic :plug-removed
1131 .Qc .
1132 Notification that the other process has inserted its widgets into or
1133 removed them from the
1134 .Ic GtkSocket .
1136 .Ss GtkSpinButton
1137 .Bl -tag -width "commands "
1138 .It Commands
1140 .Fa name Ns
1141 .Ic :set_text
1142 .Fa string
1144 sets the selected value to
1145 .Fa string .
1146 .It Feedback
1148 .Fa name Ns
1149 .Ic \&:text
1150 .Fa text
1153 .Ss GtkSpinner
1154 .Bl -tag -width "commands "
1155 .It Commands
1157 .Fa name Ns
1158 .Ic :start
1162 .Fa name Ns
1163 .Ic :stop
1165 start and stop the spinner.
1166 .It Feedback
1167 none
1169 .Ss GtkStatusbar
1170 .Bl -tag -width "commands "
1171 .It Commands
1173 .Fa name Ns
1174 .Ic :push
1175 .Fa string
1177 displays
1178 .Fa string
1179 in the statusbar.
1182 .Fa name Ns
1183 .Ic :pop
1185 removes the last entry from the statusbar, revealing the penultimate
1186 entry.
1189 .Fa name Ns
1190 .Ic :remove_all
1192 empties the statusbar.
1193 .It Feedback
1194 none
1196 .Ss GtkSwitch
1197 .Bl -tag -width "commands "
1198 .It Commands
1200 .Fa name Ns
1201 .Ic :set_active Brq Ic 0 | 1
1203 turns the switch off
1204 .Pq Ic 0
1205 or on
1206 .Pq Ic 1 .
1207 .It Feedback
1209 .Fa name Ns
1210 .Ic \&:1
1212 if switched on, or
1214 .Fa name Ns
1215 .Ic \&:0
1217 otherwise.
1219 .Ss GtkTextView
1220 There should be a dedicated
1221 .Sx GtkButton
1222 for sending (parts of) the text.
1223 If the name of the
1224 .Ic GtkTextView
1226 .Fa foo ,
1228 .Sx GtkButton
1229 named
1230 .Fa foo Ns
1231 .Ic _send_text
1232 will send the content of the
1233 .Ic GtkTextView ;
1235 .Sx GtkButton
1236 named
1237 .Fa foo Ns
1238 .Ic _send_selection
1239 will send the highlighted part the
1240 .Ic GtkTextView .
1241 .Bl -tag -width "commands "
1242 .It Commands
1244 .Fa name Ns
1245 .Ic :set_text
1246 .Fa string
1248 replaces the user-editable text with
1249 .Fa string Ns .
1252 .Fa name Ns
1253 .Ic :delete
1255 deletes the text.
1258 .Fa name Ns
1259 .Ic :insert_at_cursor
1260 .Fa string
1262 inserts
1263 .Fa string
1264 at cursor position.
1267 .Fa name Ns
1268 .Ic :place_cursor Brq Fa position | Ic end
1270 places the text cursor at
1271 .Fa position
1272 or at the end of the text.
1275 .Fa name Ns
1276 .Ic :place_cursor_at_line
1277 .Fa line
1279 places the text cursor at the beginning of
1280 .Fa line .
1283 .Fa name Ns
1284 .Ic :scroll_to_cursor
1286 scrolls to the cursor position if necessary.
1287 .It Feedback
1289 .Fa button_name Ns
1290 .Ic :text
1291 .Fa text
1292 .Qc ,
1293 .Fa button_name
1294 being the name of the
1295 .Sx GtkButton .
1296 Line endings in
1297 .Fa text
1298 are replaced by
1299 .Ic \en ,
1300 and backslashes are replaced by
1301 .Ic \e\e .
1303 .Ss GtkToggleButton
1304 .Bl -tag -width "commands "
1305 .It Commands
1307 .Fa name Ns
1308 .Ic :set_active Brq Ic 0 | 1
1310 switches the button off
1311 .Pq Ic 0
1312 or on
1313 .Pq Ic 1 .
1316 .Fa name Ns
1317 .Ic :set_label
1318 .Fa string
1320 replaces the button text with
1321 .Fa string .
1322 .It Feedback
1324 .Fa name Ns
1325 .Ic \&:1
1327 if switched on, or
1329 .Fa name Ns
1330 .Ic \&:0
1332 otherwise.
1334 .Ss GtkTreeView
1336 can deal with columns of type
1337 .Ic gboolean , gint , guint , glong , gulong , gint64 , guint64 , gfloat , gdouble ,
1339 .Ic gchararray .
1341 .Fa row
1343 .Fa column
1344 refer to the underlying model (usually a
1345 .Ic GtkListStore ) .
1346 .Bl -tag -width "commands "
1347 .It Commands
1349 .Fa name Ns
1350 .Ic :set
1351 .Fa row column data
1353 replaces the content at
1354 .Pq Fa row , column
1355 with
1356 .Fa data
1357 (which should be compatible with the type of
1358 .Fa column ) .
1361 .Fa name Ns
1362 .Ic :insert_row Brq Fa position | Ic end
1364 inserts a new, empty row at
1365 .Fa position
1366 or at the end of the list.
1369 .Fa name Ns
1370 .Ic :move_row
1371 .Fa origin Brq Fa destination | Ic end
1373 moves the row at
1374 .Fa origin
1376 .Fa destination
1377 or to the end of the list.
1380 .Fa name Ns
1381 .Ic :remove_row
1382 .Fa position
1384 removes the row at
1385 .Fa position .
1388 .Fa name Ns
1389 .Ic :scroll
1390 .Fa row column
1392 scrolls the cell at
1393 .Pq Fa row , column
1394 into view.
1395 .It Feedback
1397 .Fa name Ns
1398 .Ic \&:clicked
1402 .Fa name Ns
1403 .Ic \&: Ns
1404 .Fa column_type row column value
1405 .Qc ,
1406 one message per selected row and column in the underlying model if
1407 the set of selected rows has changed.
1409 .Ss GtkTreeViewColumn
1410 .Bl -tag -width "commands "
1411 .It Commands
1412 none
1413 .It Feedback
1415 .Fa name Ns
1416 .Ic \&:clicked
1419 .Sh EXAMPLES
1420 .Ss Discovering Pipeglade Interactively
1421 Suppose the interface in
1422 .Pa ./pipeglade.ui
1423 has a
1424 .Sx GtkLabel
1425 .Li label1
1426 and a
1427 .Sx GtkButton
1428 .Li button1 .
1429 After invoking
1430 .Dl pipeglade
1431 and clicking the
1432 .Sx GtkButton ,
1433 .Qq button1:clicked
1434 will be reported on the terminal.  Typing
1435 .Dl label1:set_text Button Label
1436 will change the text shown on the label into
1437 .Qq Button Label .
1438 .Ss One-Shot File Dialog
1439 Suppose the interface in
1440 .Pa ./simple_open.ui
1441 contains a
1442 .Sx GtkFileChooserDialog
1443 with an
1444 .Sq OK
1445 .Sx GtkButton
1446 named
1447 .Li main_ok .
1448 Invoking
1449 .Dl pipeglade -u simple_open.ui
1450 will open the dialog; pressing
1451 .Sq OK
1452 will close it after sending the selected filename to
1453 .Va stdout .
1454 .Ss One-Shot User Notification
1455 If the interface in
1456 .Pa ./simple_dialog.ui
1457 contains a
1458 .Sx GtkLabel
1459 .Li label1 ,
1460 then
1461 .Dl pipeglade -u simple_dialog.ui <<< \e
1462 .Dl \ \ \ \ \&"label1:set_text NOW READ THIS!\&"
1463 will set the label text accordingly and wait for user input.
1464 .Ss Continuous Input
1465 The following shell command displays a running clock:
1466 .Dl while true; do
1467 .Dl \ \ \ \ echo \&"label1:set_text `date`\&";
1468 .Dl \ \ \ \ sleep 1;
1469 .Dl done | pipeglade -u simple_dialog.ui
1470 .Ss Continuous Input and Output
1471 The following shell script fragment sets up
1473 for continuous communication with another program,
1474 .Li main_prog :
1475 .Dl pipeglade -i in.fifo -o out.fifo &
1476 .Dl # wait for in.fifo and out.fifo to appear
1477 .Dl while test \& ! \e( -e in.fifo -a -e out.fifo \e); do :; done
1478 .Dl main_prog <out.fifo >in.fifo
1479 .Sh EXIT STATUS
1481 exits 0 on success, and >0 if an error occurs.
1482 .Sh SEE ALSO
1483 .Xr glade 1 ,
1484 .Xr dialog 1 ,
1485 .Xr gmessage 1 ,
1486 .Xr kdialog 1 ,
1487 .Xr whiptail 1 ,
1488 .Xr xmessage 1 ,
1489 .Xr zenity 1
1490 .Sh AUTHOR
1492 was written by
1493 .An Bert Burgemeister Aq trebbu@googlemail.com .
1494 .\" .Sh BUGS