Makefile: simplify; fix typo
[pipeglade.git] / pipeglade.1
blob0534bd845d058631ffa6a2be8503b4f9dc15c9e8
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 January 6, 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 input.  It is an error if
59 .Ar in-fifo
60 exists but is not a named pipe.  The named pipe
61 .Ar in-fifo
62 is deleted upon successful program termination.  Default is
63 .Va stdin .
64 See
65 .Sx GUI MANIPULATION COMMANDS
66 for a list of commands understood by pipeglade.
67 .It Fl o Ar out-fifo
68 Creates a named pipe
69 .Ar out-fifo
70 if necessary, and uses it for output.  It is an error if
71 .Ar out-fifo
72 exists but is not a named pipe.  The named pipe
73 .Ar out-fifo
74 is deleted upon successful program termination.  Default is
75 .Va stdout .
76 See
77 .Sx GUI FEEDBACK MESSAGES
78 for a description of possible output.
79 .It Fl u Ar builder-file
80 Displays the graphical user interface described in
81 .Ar builder-file .
82 Default is
83 .Pa ./pipeglade.ui .
84 .It Fl G
85 Prints the GTK+ version and exits.
86 .It Fl V
87 Prints the
88 .Nm pipeglade
89 version and exits.
90 .El
91 .Sh INTERFACE CREATION (USING GLADE)
92 The interface should be created using the
93 .Xr glade 1
94 user interface designer and saved in GtkBuilder (.ui) format.  The
95 main window must be named
96 .Ic window ;
97 its
98 .Ic destroy
99 signal should be connected to
100 .Ic gtk_main_quit .
101 Certain signals of the other widgets should be connected to
102 callbacks.  See
103 .Sx GUI FEEDBACK MESSAGES
104 for callback names and which signals of which widgets to connect to
105 them.
106 .Sh GUI MANIPULATION COMMANDS
107 A command is a line of text.  Lines whose first non-whitespace
108 character is
109 .Ic #
110 are considered comments and ignored.
111 Any occurences of the two-character sequences
112 .Ic \en
114 .Ic \er
115 will be converted into newline or carriage return, respectively.
116 Every other character following a backslash will be left unchanged,
117 but the backslash will be removed.
118 The format of the commands is
120 .Fa name Ns
121 .Ic \&: Ns
122 .Fa action
123 .Bq Fa data
125 where
126 .Fa name
127 is the name of the receiving widget.
128 .Fa data
129 is separated from the rest of the command by whitespace.
131 Invalid commands are reported on
132 .Va stderr
133 and are otherwise ignored.
135 Widgets that can be manipulated programmatically, and the relevant
136 commands, are given below.
137 .Ss GtkLabel
139 .Fa name Ns
140 .Ic :set_text
141 .Fa string
143 replaces the label text with
144 .Fa string .
145 .Ss GtkImage
147 .Fa name Ns
148 .Ic :set_from_icon_name
149 .Fa icon-name
151 replaces the image with one of the standard icons.
154 .Fa name Ns
155 .Ic :set_from_file
156 .Fa path
158 replaces the image by the one found at
159 .Fa path Ns .
160 .Ss GtkEntry
162 .Fa name Ns
163 .Ic :set_text
164 .Fa string
166 replaces the user-editable text with
167 .Fa string .
168 .Ss GtkTextView
170 .Fa name Ns
171 .Ic :set_text
172 .Fa string
174 replaces the user-editable text with
175 .Fa string Ns .
178 .Fa name Ns
179 .Ic :delete
181 deletes the text.
184 .Fa name Ns
185 .Ic :insert_at_cursor
186 .Fa string
188 inserts
189 .Fa string
190 at cursor position.
193 .Fa name Ns
194 .Ic :place_cursor Brq Fa position | Ic end
196 places the text cursor at
197 .Fa position
198 or at the end of the text.
201 .Fa name Ns
202 .Ic :place_cursor_at_line
203 .Fa line
205 places the text cursor at the beginning of
206 .Fa line .
209 .Fa name Ns
210 .Ic :scroll_to_cursor
212 scrolls to the cursor position if necessary.
213 .Ss GtkButton
215 .Fa name Ns
216 .Ic :set_label
217 .Fa string
219 replaces the button text with
220 .Fa string .
221 .Ss GtkToggleButton
223 .Fa name Ns
224 .Ic :set_active Brq Ic 0 | 1
226 switches the button off
227 .Pq Ic 0
228 or on
229 .Pq Ic 1 .
232 .Fa name Ns
233 .Ic :set_label
234 .Fa string
236 replaces the button text with
237 .Fa string .
238 .Ss GtkCheckButton
240 .Fa name Ns
241 .Ic :set_active Brq Ic 0 | 1
243 switches the check mark off
244 .Pq Ic 0
245 or on
246 .Pq Ic 1 .
249 .Fa name Ns
250 .Ic :set_label
251 .Fa string
253 replaces the button text with
254 .Fa string .
255 .Ss GtkRadioButton
257 .Fa name Ns
258 .Ic :set_active 1
260 switches the button on.  All other buttons of the same group will go off
261 automatically.
264 .Fa name Ns
265 .Ic :set_label
266 .Fa string
268 replaces the button text with
269 .Fa string .
270 .Ss GtkSpinButton
272 .Fa name Ns
273 .Ic :set_text
274 .Fa string
276 sets the selected value to
277 .Fa string .
278 .Ss GtkScale
280 .Fa name Ns
281 .Ic :set_value
282 .Fa numeric
284 moves the slider to value
285 .Fa numeric .
286 .Ss GtkProgressBar
288 .Fa name Ns
289 .Ic :set_fraction
290 .Fa numeric
292 moves the progress bar to
293 .Fa numeric
295 between 0 and 1
296 .Pc .
299 .Fa name Ns
300 .Ic :set_text
301 .Fa string
303 replaces the text of the progress bar with
304 .Fa string .
305 .Ss GtkSpinner
307 .Fa name Ns
308 .Ic :start
312 .Fa name Ns
313 .Ic :stop
315 start and stop the spinner.
316 .Ss GtkStatusbar
318 .Fa name Ns
319 .Ic :push
320 .Fa string
322 displays
323 .Fa string
324 in the statusbar.
327 .Fa name Ns
328 .Ic :pop
330 removes the last entry from the statusbar, revealing the penultimate
331 entry.
332 .Ss GtkComboBoxText
334 .Fa name Ns
335 .Ic :prepend_text
336 .Fa string
340 .Fa name Ns
341 .Ic :append_text
342 .Fa string
344 prepend/append
345 .Fa string
346 as a new selectable item.
349 .Fa name Ns
350 .Ic :insert_text
351 .Fa position string
353 inserts item
354 .Fa string
356 .Fa position .
359 .Fa name Ns
360 .Ic :remove
361 .Fa position
363 removes the item at
364 .Fa position .
365 .Ss GtkTreeView
366 .Fa row
368 .Fa column
369 refer to the underlying model (usually a
370 .Ic GtkListStore ) .
373 .Fa name Ns
374 .Ic :set
375 .Fa row column data
377 replaces the content at
378 .Pq Fa row , column
379 with
380 .Fa data
381 (which should be compatible with the type of
382 .Fa column ) .
385 .Fa name Ns
386 .Ic :insert_row Brq Fa position | Ic end
388 inserts a new, empty row at
389 .Fa position
390 or at the end of the list.
393 .Fa name Ns
394 .Ic :move_row
395 .Fa origin Brq Fa destination | Ic end
397 moves the row at
398 .Fa origin
400 .Fa destination
401 or to the end of the list.
404 .Fa name Ns
405 .Ic :remove_row
406 .Fa position
408 removes the row at
409 .Fa position .
412 .Fa name Ns
413 .Ic :scroll
414 .Fa row column
416 scrolls the cell at
417 .Pq Fa row , column
418 into view.
419 .Ss GtkColorButton
421 .Fa name Ns
422 .Ic :set_color
423 .Fa color
425 preselects the color.
426 .Fa color
427 can be given as
428 .Bl -dash -offset indent -compact
430 a standard X11 color name, like
431 .Qq Li Dark Sea Green,
433 a hexadecimal value in the form
434 .Ic # Ns
435 .Fa rgb ,
436 .Ic # Ns
437 .Fa rrggbb ,
438 .Ic # Ns
439 .Fa rrrgggbbb ,
441 .Ic # Ns
442 .Fa rrrrggggbbbb ,
444 an RGB color in the form
445 .Ic rgb( Ns
446 .Fa r Ns
447 .Ic \&, Ns
448 .Fa g Ns
449 .Ic \&, Ns
450 .Fa b Ns
451 .Ic \&) ,
454 an RGBA color in the form
455 .Ic rgba( Ns
456 .Fa r Ns
457 .Ic \&, Ns
458 .Fa g Ns
459 .Ic \&, Ns
460 .Fa b Ns
461 .Ic \&, Ns
462 .Fa a Ns
463 .Ic \&) .
465 The last two are in the format the widget reports; see
466 .Sx GUI FEEDBACK MESSAGES .
467 .Ss GtkFontButton
469 .Fa name Ns
470 .Ic :set_font_name
471 .Fa fontname
473 preselects the font.
474 .Ss GtkFileChooserButton
476 .Fa name Ns
477 .Ic :set_filename
478 .Fa path
480 preselects
481 .Fa path
482 to the extent it exists.
483 .Ss GtkFileChooserDialog
485 .Fa name Ns
486 .Ic :set_filename
487 .Fa path
489 preselects
490 .Fa path
491 to the extent it exists.
494 .Fa name Ns
495 .Ic :set_current_name
496 .Fa string
498 makes
499 .Fa string
500 the suggested filename, which may not yet exist.
501 .Fa string
502 should either resemble an absolute path, or the
503 .Fa path
504 must be set
505 separately by
506 .Fa name Ns
507 .Ic :set_current_name
508 .Fa path .
509 .Ss GtkCalendar
511 .Fa name Ns
512 .Ic :select_date
513 .Fa date
515 selects
516 .Fa date
517 .Pq Li yyyy-mm-dd
518 on the calendar.
521 .Fa name Ns
522 .Ic :mark_day
523 .Fa day
525 marks
526 .Fa day
527 .Pq 1-31
528 on the calendar.
531 .Fa name Ns
532 .Ic :clear_marks
534 unmarks all days on the calendar.
535 .Ss Main Window
537 .Fa name Ns
538 .Ic :main_quit
540 kills the user interface.  A non-empty
541 .Fa name
542 is required but ignored.
543 .Ss Any Widget
545 .Fa name Ns
546 .Ic :set_sensitive
547 .Brq Ic 0 |  1
549 makes the widget grayed out
550 .Pq Ic 0
551 or responsive
552 .Pq Ic 1 .
555 .Fa name Ns
556 .Ic :set_visible
557 .Brq Ic 0 |  1
559 hides
560 .Pq Ic 0
561 the widget, or makes it visible
562 .Pq Ic 1 .
565 .Fa name Ns
566 .Ic :force_cb
568 initiates the standard callback.  The
569 .Fa name Ns
570 d widget
571 responds as if
572 .Ic cb_0
573 had been activated, but with a different
574 .Fa section
575 code:
577 .Fa name Ns
578 .Ic :forced
579 .Fa data
580 .Qc .
581 The command doesn't change anything on the GUI.
582 .Sh GUI FEEDBACK MESSAGES
583 A message from the graphical user interface is a line of text.  The
584 message format is 
586 .Fa name Ns
587 .Ic \&: Ns
588 .Fa section data
589 .Qc .
590 Message sending is initiated by callbacks.  Callbacks are connected to
591 certain signals; this has to be done in
592 .Xr glade 1
593 as part of the interface design.
595 provides the following callbacks:
596 .Bl -dash -offset indent -compact
598 .Ic cb_0 , cb_1 , cb_2 ,
600 .Ic cb_3
601 are callbacks for use in various widgets.  Their action depends on the
602 particular widget they are called from.  The callbacks are identical
603 except for the 
604 .Fa section
605 strings they send; the respective messages look like
607 .Fa name Ns
608 .Ic :0
609 .Fa  data
610 .Qc ,
612 .Fa name Ns
613 .Ic :1
614 .Fa  data
615 .Qc ,
617 .Fa name Ns
618 .Ic :2
619 .Fa  data
620 .Qc ,
623 .Fa name Ns
624 .Ic :3
625 .Fa  data
626 .Qc .
628 .Ic cb_hide_toplevel
629 is a callback that hides the window the originator is in.  Its main
630 purpose is hiding of dialog windows.  It doesn't report anything.
632 .Ic cb_send_dialog_selection
633 is a callback that sends the item the user has selected in a dialog.
634 It reports
636 .Fa name Ns
637 .Ic :file
638 .Fa path
640 and/or
642 .Fa name Ns
643 .Ic :folder
644 .Fa path
645 .Qc .
647 .Ic cb_send_text
648 is a callback that sends the content of the GtkTextBuffer that is
649 passed as user data.  It reports
651 .Fa name Ns
652 .Ic :text
653 .Fa buffer_text
654 .Qc .
655 Line endings in
656 .Fa buffer_text
657 are replaced by
658 .Ic \en , 
659 and backslashes are replaced by
660 .Ic \e\e .
662 .Ic cb_send_text_selection
663 is a callback that sends the highlighted part of the GtkTextBuffer
664 that is passed as user data.  It reports
666 .Fa name Ns
667 .Ic :text
668 .Fa highlighted_text
669 .Qc .
670 Line endings in
671 .Fa highlighted_text
672 are replaced by
673 .Ic \en ,
674 and backslashes are replaced by
675 .Ic \e\e .
678 The widgets capable of reporting user activity are:
679 .Ss GtkTextView
680 There should be a dedicated
681 .Ic GtkButton
682 for sending (parts of) the text.
684 .Ic clicked
685 signal of the
686 .Ic GtkButton
687 should be connected to either
688 .Ic cb_send_text
690 .Ic cb_send_text_selection ,
691 specifying the
692 .Ic GtkTextBuffer
693 underlying the
694 .Ic GtkTextView
696 .Ic User Data .
698 .Ic GtkButton
699 reports
701 .Fa name Ns
702 .Ic :text
703 .Fa text
704 .Qc ,
705 .Fa name
706 being the name of the
707 .Ic GtkButton.
708 .Ss GtkButton
710 .Ic clicked
711 signal should be connected to one of
712 .Ic cb_0 , cb_1 , cb_2 ,
714 .Ic cb_3 .
715 The widget reports
717 .Fa name Ns
718 .Ic \&: Ns
719 .Fa section
720 .Ic clicked
721 .Qc .
722 .Ss GtkToggleButton, GtkCheckButton, GtkRadioButton
724 .Ic toggled
725 signal should be connected to one of
726 .Ic cb_0 , cb_1 , cb_2 ,
728 .Ic cb_3 .
729 The widgets report
731 .Fa name Ns
732 .Ic \&: Ns
733 .Fa section
734 .Ic on
738 .Fa name Ns
739 .Ic \&: Ns
740 .Fa section
741 .Ic off
742 .Qc .
743 .Ss GtkEntry, GtkComboBoxText, GtkSpinButton
745 .Ic changed
746 signal should be connected to one of
747 .Ic cb_0 , cb_1 , cb_2 ,
749 .Ic cb_3 .
750 The widgets report
752 .Fa name Ns
753 .Ic \&: Ns
754 .Fa section text
755 .Qc .
756 .Ss GtkScale
758 .Ic value-changed
759 signal should be connected to one of
760 .Ic cb_0 , cb_1 , cb_2 ,
762 .Ic cb_3 .
763 The widget reports
765 .Fa name Ns
766 .Ic \&: Ns
767 .Fa section floating_point_text
768 .Qc .
769 .Ss GtkTreeView
771 .Ic changed
772 signal in the subordinated
773 .Ic GtkTreeSelection
774 should be connected to one of
775 .Ic cb_0 , cb_1 , cb_2 ,
777 .Ic cb_3 .
778 The widget reports
780 .Fa name Ns
781 .Ic \&:clicked
783 and, if the set of selected rows has changed,
785 .Fa name Ns
786 .Ic \&: Ns
787 .Fa section row column value
788 .Qc ,
789 one message per row and column in the underlying model.
791 can deal with columns of type
792 .Ic gboolean , gint , guint , glong , gulong , gint64 , guint64 , gfloat , gdouble ,
794 .Ic gchararray .
795 .Ss GtkTreeViewColumn
797 .Ic clicked
798 signal should be connected to one of
799 .Ic cb_0 , cb_1 , cb_2 ,
801 .Ic cb_3 .
802 The widget reports
804 .Fa name Ns
805 .Ic \&: Ns
806 .Fa section
807 .Ic clicked
808 .Qc .
809 .Ss GtkFileChooserDialog (when subordinated to another window)
811 .Ic delete-event
812 signal should be connected to
813 .Ic cb_0 .
814 The name of the
815 .Ic GtkFileChooserDialog
816 widget should end in
817 .Ic _dialog ,
818 eg.\&
819 .Fa some_name Ns
820 .Ic _dialog .
821 Then, a
822 .Ic GtkMenuItem
824 .Ic GtkImageMenuItem
825 named
826 .Fa some_name
827 will invoke the
828 .Ic GtkFileChooserDialog
829 (see
830 .Sx GtkMenuItem, GtkImageMenuItem
831 for their setup).  The
832 .Ic GtkFileChooserDialog
833 should have an
834 .Sq OK
835 .Ic GtkBbutton
836 that has its
837 .Ic clicked
838 signal connected to both
839 .Ic cb_send_dialog_selection
841 .Ic cb_hide_toplevel .
843 .Sq Cancel
844 .Ic GtkButton
845 should have its
846 .Ic clicked
847 signal connected to
848 .Ic cb_hide_toplevel .
849 The widget reports
851 .Fa name Ns
852 .Ic :file
853 .Fa  pathname
855 and/or
857 .Fa name Ns
858 .Ic :folder
859 .Fa  pathname
860 .Qc .
861 .Ss GtkFileChooserDialog (as the sole window)
862 Both the
863 .Ic delete-event
864 and the
865 .Ic destroy
866 signal should be connected to
867 .Ic gtk_main_quit .
869 .Ic GtkFileChooserDialog
870 should have an
871 .Sq OK
872 .Ic GtkBbutton
873 that has its
874 .Ic clicked
875 signal connected to both
876 .Ic cb_send_dialog_selection
878 .Ic gtk_main_quit .
880 .Sq Cancel
881 .Ic GtkButton
882 should have its
883 .Ic clicked
884 signal connected to
885 .Ic gtk_main_quit .
886 The widget reports
888 .Fa name Ns
889 .Ic :file
890 .Fa  pathname
892 and/or
894 .Fa name Ns
895 .Ic :folder
896 .Fa  pathname
897 .Qc .
898 .Ss GtkDialog (when subordinated to another window)
900 .Ic delete-event
901 signal should be connected to
902 .Ic cb_0 .
903 The name of the
904 .Ic GtkDialog
905 widget should end in
906 .Ic _dialog ,
908 .Fa some_name Ns
909 .Ic _dialog .
910 Then, a
911 .Ic GtkMenuItem
913 .Ic GtkImageMenuItem
914 named
915 .Fa some_name
916 will invoke the
917 .Ic GtkDialog
918 (see
919 .Sx GtkMenuItem, GtkImageMenuItem
920 for their setup).  The
921 .Ic GtkDialog
922 should have a
923 .Sq Cancel
924 .Ic GtkBbutton
925 that has its
926 .Ic clicked
927 signal connected to
928 .Ic cb_hide_toplevel .
929 .Ss GtkDialog (as the sole window)
930 Both the
931 .Ic delete-event
932 and the
933 .Ic destroy
934 signal should be connected to
935 .Ic gtk_main_quit .
937 .Ic GtkDialog
938 should have a
939 .Sq Cancel
940 .Ic GtkBbutton
941 that has its
942 .Ic clicked
943 signal connected to
944 .Ic gtk_main_quit .
945 .Ss GtkFileChooserButton
947 .Ic file-set
948 signal should be connected to one of
949 .Ic cb_0 , cb_1 , cb_2 ,
951 .Ic cb_3 .
952 The widget reports
954 .Fa name Ns
955 .Ic \&: Ns
956 .Fa section pathname
958 if the user has changed the selection.
959 .Ss GtkColorButton
961 .Ic color-set
962 signal should be connected to one of
963 .Ic cb_0 , cb_1 , cb_2 ,
965 .Ic cb_3 .
966 The widget reports
968 .Fa name Ns
969 .Ic \&: Ns
970 .Fa section
971 .Ic rgb( Ns
972 .Fa red Ns
973 .Ic \&, Ns
974 .Fa green Ns
975 .Ic \&, Ns
976 .Fa blue Ns
977 .Ic \&)
981 .Fa name Ns
982 .Ic \&: Ns
983 .Fa section
984 .Ic rgb( Ns
985 .Fa red Ns
986 .Ic \&, Ns
987 .Fa green Ns
988 .Ic \&, Ns
989 .Fa blue Ns
990 .Ic \&, Ns
991 .Fa alpha Ns
992 .Ic \&)
993 .Qc ;
994 .Fa red , green ,
996 .Fa blue
997 lie between 0 and 255, and
998 .Fa alpha
999 between 0 and 1.
1000 .Ss GtkFontButton
1002 .Ic font-set
1003 signal should be connected to one of
1004 .Ic cb_0 , cb_1 , cb_2 ,
1006 .Ic cb_3 .
1007 The widget reports
1009 .Fa name Ns
1010 .Ic \&: Ns
1011 .Fa section fontname
1012 .Qc .
1013 .Ss GtkMenuItem, GtkImageMenuItem
1015 .Ic activate
1016 signal should be connected to one of
1017 .Ic cb_0 , cb_1 , cb_2 ,
1019 .Ic cb_3 .
1021 .Ic GtkMenuItem
1023 .Ic GtkImageMenuItem
1024 with the name
1025 .Fa some_item
1026 will invoke the
1027 .Ic GtkDialog
1029 .Ic GtkFileChooserDialog
1030 named
1031 .Fa some_item Ns
1032 .Ic _dialog
1033 if it exists.  If there isn't any dialog attached to the
1034 .Ic GtkMenuItem ,
1035 it reports
1037 .Fa name Ns
1038 .Ic \&: Ns
1039 .Fa section label
1040 .Qc .
1041 .Ss GtkCalendar
1042 One or both of the
1043 .Ic day-selected
1045 .Ic day-selected-doubleclick
1046 signals should be connected to one or two of
1047 .Ic cb_0 , cb_1 , cb_2 ,
1049 .Ic cb_3 .
1050 The widget reports
1052 .Fa name Ns
1053 .Ic \&: Ns
1054 .Fa section date
1056 with
1057 .Fa date
1058 formatted
1059 .Li yyyy-mm-dd .
1060 .Sh EXAMPLES
1061 .Ss Discovering Pipeglade Interactively
1062 Suppose the interface in
1063 .Pa ./pipeglade.ui
1064 has a
1065 .Ic GtkLabel
1066 .Li l1
1067 and a
1068 .Ic GtkButton
1069 .Li b1
1070 whose
1071 .Ic clicked
1072 signal is connected to
1073 .Ic cb_0 .
1074 After invoking
1075 .Dl pipeglade
1076 and clicking the
1077 .Ic GtkButton ,
1078 .Qq b1:0 clicked
1079 will be reported on the terminal.  Typing
1080 .Dl l1:set_text Button Label
1081 will change the text shown on the label into
1082 .Qq Button Label .
1083 .Ss One-Shot File Dialog
1084 Suppose the interface in
1085 .Pa ./simple_open.ui
1086 contains a
1087 .Ic GtkFileChooserDialog
1088 with an
1089 .Sq OK
1090 .Ic GtkButton
1091 whose
1092 .Ic clicked
1093 signal is connected to both
1094 .Ic cb_send_dialog_selection
1096 .Ic gtk_main_quit .
1097 Invoking
1098 .Dl pipeglade -u simple_open.ui
1099 will open the dialog; pressing
1100 .Sq OK
1101 will close it after sending the selected filename to
1102 .Va stdout .
1103 .Ss One-Shot User Notification
1104 If the interface in
1105 .Pa ./simple_dialog.ui
1106 contains a
1107 .Ic GtkLabel
1108 .Li label1 ,
1109 then
1110 .Dl pipeglade -u simple_dialog.ui <<< \e
1111 .Dl \ \ \ \ \&"label1:set_text NOW READ THIS!\&"
1112 will set the label text accordingly and wait for user input.
1113 .Ss Continuous Input
1114 The following shell command displays a running clock:
1115 .Dl while true; do
1116 .Dl \ \ \ \ echo \&"label1:set_text `date`\&";
1117 .Dl \ \ \ \ sleep 1;
1118 .Dl done | pipeglade -u simple_dialog.ui
1119 .Ss Continuous Input and Output
1120 The following shell script fragment sets up
1122 for continuous communication with another program,
1123 .Li main_prog :
1124 .Dl pipeglade -i in.fifo -o out.fifo &
1125 .Dl # wait for in.fifo and out.fifo to appear
1126 .Dl while test \& ! \e( -e in.fifo -a -e out.fifo \e); do :; done
1127 .Dl main_prog <in.fifo >out.fifo
1128 .Sh EXIT STATUS
1130 exits 0 on success, and >0 if an error occurs.
1131 .Sh SEE ALSO
1132 .Xr glade 1 ,
1133 .Xr dialog 1 ,
1134 .Xr gmessage 1 ,
1135 .Xr kdialog 1 ,
1136 .Xr whiptail 1 ,
1137 .Xr xmessage 1 ,
1138 .Xr zenity 1
1139 .Sh AUTHOR
1141 was written by
1142 .An Bert Burgemeister Aq trebbu@googlemail.com .
1143 .\" .Sh BUGS