1 .\" Copyright (c) 2014-2016 Bert Burgemeister <trebbu@googlemail.com>
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:
11 .\" The above copyright notice and this permission notice shall be
12 .\" included in all copies or substantial portions of the Software.
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.
27 .Nd pipe-driven GTK+ interface
34 .Op Fl u Ar builder-file
35 .Op Fl e Ar parent-xid
38 .Op Fl -display Ar X-server
43 is a helper program that displays graphical user
44 interfaces for other programs.
45 It renders the GUI definition found in a GtkBuilder XML file
46 (typically created using the
48 interface designer), and communicates with the main program solely
49 through plain text messages via pipes or fifos.
50 It provides access to a subset of features of a subset of widgets of
52 Simple one-shot dialogs as well as more complex, long-running programs
62 if necessary, sets its permissions to
64 and uses it for command input.
66 A command is a line of text.
68 .Qq Ar id Ns Cm \&: Ns Ar action Bq Ar data ,
70 being the name of the receiving widget;
72 is separated from the rest of the command by a single whitespace
74 Commands whose first non-whitespace character is
76 are considered comments and ignored silently, as are empty input lines.
77 Any occurences of the two-character sequences
81 will be converted into newline or carriage return, respectively.
82 Every other character following a backslash will be left unchanged,
83 but the backslash will be removed.
84 Invalid commands are reported on
86 and are otherwise ignored.
89 for applicable commands.
93 exists but is not a named pipe.
96 is deleted upon successful program termination.
98 Default command input is
103 if necessary, sets its permissions to
105 and uses it for output of feedback messages from the
106 graphical user interface.
108 A feedback message is a line of text; its format is
109 .Qq Ar id Ns Cm \&: Ns Ar info Bq Ar data ,
111 being the name of the sending widget.
114 for possible feedback messages.
118 exists but is not a named pipe.
121 is deleted upon successful program termination.
123 Default feedback-message output is
128 in the background after printing its process ID to
131 It is an error if option
138 .It Fl u Ar builder-file
139 Displays the graphical user interface
141 which should be created using the
143 user interface designer and saved in GtkBuilder (.ui) format.
144 Widget ids should be alphanumeric, including underscores, and the
145 main window must must be given the id
150 .It Fl e Ar parent-xid
151 Embeds the main window into the XEmbed socket
155 Appends for each command a line of
160 being the number of microseconds elapsed during
165 are separated by a tab character.
179 appending its output to
185 .It Fl -display Ar X-server
188 for user interaction.
190 Prints a help message and exits.
192 Prints the versions of the underlying GTK+ and cairo libraries and
200 The widget classes able to communicate through
207 .Sx GtkComboBoxText ,
213 .Sx GtkFileChooserButton ,
214 .Sx GtkFileChooserDialog ,
219 .Sx GtkMenuItem, GtkImageMenuItem ,
221 .Sx GtkPrintUnixDialog ,
225 .Sx GtkScrolledWindow
232 .Sx GtkToggleButton ,
234 .Sx GtkTreeViewColumn ,
239 references a widget by the
241 attribute it is given in Glade.
249 .Dl <object class="GtkWindow" id="foo"> .
250 .Ss Any Widget (including widgets not mentioned above)
251 .Bl -tag -width "commands "
253 .Qq Ar id Ns Cm :set_sensitive Brq Cm 0 | 1
254 makes the widget grayed out
259 .Qq Ar id Ns Cm :set_visible Brq Cm 0 | 1
262 the widget, or makes it visible
265 .Qq Ar id Ns Cm :grab_focus
266 puts the keyboard focus onto the widget, if possible.
268 .Qq Ar id Ns Cm :set_size_request Bq Ar width height
269 sets the widget's minimum size to
273 Default is the widget's natural size.
277 .Bo Ar prop Ns Cm \&: Ns Ar val Ns Bo Cm \&; Ar prop Ns Cm \&: Ns Ar val ... Bc Bc
281 of the widget style to
283 Properties not explicitly specified are reset to their default values.
285 .Bl -dash -offset indent -compact
287 .Ql label1:style font:Bold 11; background-color:green
289 .Ql label1:style font-style:italic; font-weight:bold; color:blue
291 .Ql frame1:style border-color:red yellow; border-width:5px
293 .Ql frame1:style border-radius:10px; transition:10s
295 For a description of possible color notations see
298 .Qq Ar id Ns Cm :set_tooltip_text Bq Ar text
299 sets the widget's tooltip
301 Default is disabling the tooltip.
303 .Qq Ar id Ns Cm :block Brq Cm 0 | 1
308 feedback messages from widget.
311 address the underlying
314 Initially, all widgets are unblocked.
316 .Qq Ar id Ns Cm :force
317 simulates a click on widget
319 triggering a response as described with the widgets below.
321 .Bl -dash -offset indent -compact
323 The command is ignored by
331 .Sx GtkTreeViewColumn ;
333 .Sx GtkCalendar , GtkEntry , GtkFileChooserButton , GtkScale ,
336 report the currently selected item;
341 just open their respective dialogs.
344 .Qq Ar id Ns Cm :load Ar file
351 is required but ignored.
353 commands may be nested but on attempts to read from the same file, the
364 .Qq Ar id Ns Cm :snapshot Ar file Ns Brq Cm .ps Ns | Ns Cm .eps Ns | Ns Cm .epsf Ns | Ns Cm .pdf Ns | Ns Cm .svg
365 writes a snapshot of the widget to an image file of the specified
368 .Qq Ar id Ns Cm :main_quit
369 kills the user interface.
372 is required but ignored.
375 .Bl -tag -width "commands "
377 .Qq Ar id Ns Cm :set_label Ar string
378 replaces the button text with
381 .Qq Ar id Ns Cm \&:clicked
385 .Cm _ok , _apply , _cancel , _send_text ,
388 may work differently; see
389 .Sx GtkDialog , GtkFileChooserDialog ,
395 .Bl -tag -width "commands "
397 .Qq Ar id Ns Cm :select_date Ar yyyy Ns Cm - Ns Ar mm Ns Cm - Ns Ar dd
398 selects the date on the calendar.
400 .Qq Ar id Ns Cm :mark_day Ar day
405 .Qq Ar id Ns Cm :clear_marks
406 unmarks all days on the calendar.
408 .Qq Ar id Ns Cm \&:clicked Ar yyyy Ns Cm - Ns Ar mm Ns Cm - Ns Ar dd
410 .Qq Ar id Ns Cm \&:doubleclicked Ar yyyy Ns Cm - Ns Ar mm Ns Cm - Ns Ar dd
413 .Bl -tag -width "commands "
415 .Qq Ar id Ns Cm :set_active Brq Cm 0 | 1
416 switches the check mark off
421 .Qq Ar id Ns Cm :set_label Ar string
422 replaces the button text with
431 .Bl -tag -width "commands "
433 .Qq Ar id Ns Cm :set_color Ar color
434 preselects the color.
437 .Bl -dash -offset indent -compact
439 a standard X11 color name, like
442 a hexadecimal value in the form
443 .Cm # Ns Ar rgb , Cm # Ns Ar rrggbb , Cm # Ns Ar rrrgggbbb ,
445 .Cm # Ns Ar rrrrggggbbbb ,
447 an RGB color in the form
448 .Cm rgb( Ns Ar red Ns Cm \&, Ns Ar green Ns Cm \&, Ns Ar blue Ns Cm \&) ,
451 an RGBA color in the form
452 .Cm rgba( Ns Ar red Ns Cm \&, Ns Ar green Ns Cm \&, Ns
453 .Ar blue Ns Cm \&, Ns Ar alpha Ns Cm \&) .
456 .Qq Ar id Ns Cm \&:color Cm rgb( Ns Ar red Ns Cm \&, Ns Ar green Ns Cm \&, Ns Ar blue Ns Cm \&)
458 .Qq Ar id Ns Cm \&:color Cm rgba( Ns Ar red Ns Cm \&, Ns Ar green Ns Cm \&, Ns Ar blue Ns Cm \&, Ns Ar alpha Ns Cm \&) .
462 lie between 0 and 255, and
471 .Bl -tag -width "commands "
473 .Qq Ar id Ns Cm :prepend_text Ar string
475 .Qq Ar id Ns Cm :append_text Ar string
476 prepend/append a new selectable item marked
479 .Qq Ar id Ns Cm :insert_text Ar position string
485 .Qq Ar id Ns Cm :remove Ar position
489 .Qq Ar entry_id Ns Cm \&:text Ar text ,
491 being the id of the child
504 .Ar foo Ns Cm _invoke .
512 .Ar foo Ns Cm _cancel
514 if the dialog is the sole window of the GUI and therefore named
525 it will take care of hiding the dialog window.
526 .Bl -tag -width "commands "
528 .Qq Ar id Ns Cm :set_title Ar string
529 replaces the text in the title bar with
532 .Qq Ar id Ns Cm :resize Bq Ar width height
533 changes the size of the dialog window to
537 pixels if specified, or to the default size.
539 .Qq Ar id Ns Cm :move Ar x y
540 moves the dialog window to position
543 .Qq Ar id Ns Cm :fullscreen
545 .Qq Ar id Ns Cm :unfullscreen
546 switch fullscreen mode on and off.
548 .Qq Ar id Ns Cm \&:closed
551 window was closed by the window manager.
555 expect a context parameter of the form
556 .Bro Ar n Ns | Ns Cm = Ns Ar n Ns | Ns Ar n Ns Cm < Ns Ar m Brc
559 is an arbitrary non-negative integer that can be used later to
560 reference the command.
563 appends its command to the current list of drawing operations.
566 replaces the first drawing operation with context parameter
570 .Ar n Ns Cm < Ns Ar m ,
571 inserts its command before the first drawing operation with context
574 Both second and third form fall back to appending.
576 The default coordinate system is a left-handed system with its origin
577 in the upper-left corner.
578 Angles increase from the positive X axis towards the positve Y axis
579 .Pq clockwise in the default system .
580 .Bl -tag -width "commands "
582 .Qq Ar id Ns Cm :arc Bro Ar n Ns | Ns Cm = Ns Ar n Ns | Ns Ar n Ns Cm < Ns Ar m Brc x y radius angle1 angle2
583 adds a circular arc to the current path.
584 The arc is centered at
592 .Qq Ar id Ns Cm :arc_negative Bro Ar n Ns | Ns Cm = Ns Ar n Ns | Ns Ar n Ns Cm < Ns Ar m Brc x y radius angle1 angle2
593 adds a circular arc to the current path.
594 The arc is centered at
596 and proceeds in the direction of decreasing angles from
602 .Qq Ar id Ns Cm :close_path Bro Ar n Ns | Ns Cm = Ns Ar n Ns | Ns Ar n Ns Cm < Ns Ar m Brc
603 adds a line segment from the current point to the point most recently
605 .Ar id Ns Cm :move_to
607 .Ar id Ns Cm :rel_move_to .
609 .Qq Ar id Ns Cm :curve_to Bro Ar n Ns | Ns Cm = Ns Ar n Ns | Ns Ar n Ns Cm < Ns Ar m Brc x1 y1 x2 y2 x3 y3
610 adds a cubic Bezier spline from the current point to
617 If there is no current point, the curve will start at
620 .Qq Ar id Ns Cm :fill Bro Ar n Ns | Ns Cm = Ns Ar n Ns | Ns Ar n Ns Cm < Ns Ar m Brc
621 fills the current path and clears it.
623 .Qq Ar id Ns Cm :fill_preserve Bro Ar n Ns | Ns Cm = Ns Ar n Ns | Ns Ar n Ns Cm < Ns Ar m Brc
624 fills the current path without clearing it.
626 .Qq Ar id Ns Cm :line_to Bro Ar n Ns | Ns Cm = Ns Ar n Ns | Ns Ar n Ns Cm < Ns Ar m Brc x y
627 adds a line from the current point to
629 or creates a new current point at
632 .Qq Ar id Ns Cm :move_to Bro Ar n Ns | Ns Cm = Ns Ar n Ns | Ns Ar n Ns Cm < Ns Ar m Brc x y
633 sets the current point to
636 .Qq Ar id Ns Cm :rectangle Bro Ar n Ns | Ns Cm = Ns Ar n Ns | Ns Ar n Ns Cm < Ns Ar m Brc x y width height
637 adds a rectangle to the current path.
638 The top left corner is at
641 .Qq Ar id Ns Cm :rel_curve_to Bro Ar n Ns | Ns Cm = Ns Ar n Ns | Ns Ar n Ns Cm < Ns Ar m Brc dx1 dy1 dx2 dy2 dx3 dy3
642 adds a cubic Bezier spline from the current point to
649 All coordinates are offsets relative to the current point.
651 .Qq Ar id Ns Cm :rel_line_to Bro Ar n Ns | Ns Cm = Ns Ar n Ns | Ns Ar n Ns Cm < Ns Ar m Brc dx dy
652 adds a line from the current point to a point offset from there by
655 .Qo Ar id Ns Cm :rel_move_for Bro Ar n Ns | Ns Cm = Ns Ar n Ns | Ns Ar n Ns Cm < Ns Ar m Brc
656 .Brq Cm c Ns | Ns Cm e Ns | Ns Cm n Ns | Ns Cm ne Ns | Ns Cm nw Ns | Ns Cm s Ns | Ns Cm se Ns | Ns Cm sw Ns | Ns Cm w
659 moves the current point such that
660 .Qq Ar id Ns Cm :show_text Ar n text
661 will place the specified reference point of
663 on the original current point.
665 .Qq Ar id Ns Cm :rel_move_to Bro Ar n Ns | Ns Cm = Ns Ar n Ns | Ns Ar n Ns Cm < Ns Ar m Brc dx dy
666 moves the current point by
669 .Qq Ar id Ns Cm :remove Ar n
670 removes the elements with context parameter
673 .Cm GtkDrawingArea Ar id .
675 .Qq Ar id Ns Cm :rotate Bro Ar n Ns | Ns Cm = Ns Ar n Ns | Ns Ar n Ns Cm < Ns Ar m Brc Ar angle
676 rotates the user space axes by
680 .Qq Ar id Ns Cm :scale Bro Ar n Ns | Ns Cm = Ns Ar n Ns | Ns Ar n Ns Cm < Ns Ar m Brc Ar sx sy
681 scales the user space axes by
684 .Qq Ar id Ns Cm :set_dash Bro Ar n Ns | Ns Cm = Ns Ar n Ns | Ns Ar n Ns Cm < Ns Ar m Brc l
685 sets the dash pattern to
691 .Qq Ar id Ns Cm :set_dash Bro Ar n Ns | Ns Cm = Ns Ar n Ns | Ns Ar n Ns Cm < Ns Ar m Brc l1on l1off l2on l2off ...
692 resets the dash pattern to a line with arbitrary on/off portions.
694 .Qq Ar id Ns Cm :set_dash Bro Ar n Ns | Ns Cm = Ns Ar n Ns | Ns Ar n Ns Cm < Ns Ar m Brc
695 resets the dash pattern to a solid line.
697 .Qo Ar id Ns Cm :set_font_face Bro Ar n Ns | Ns Cm = Ns Ar n Ns | Ns Ar n Ns Cm < Ns Ar m Brc
698 .Brq Cm normal | italic | oblique
699 .Brq Cm normal | bold
702 sets the font face for subsequent calls of
703 .Ar id Ns Cm :show_text .
705 .Qq Ar id Ns Cm :set_font_size Bro Ar n Ns | Ns Cm = Ns Ar n Ns | Ns Ar n Ns Cm < Ns Ar m Brc size
706 sets the font size for subsequent calls of
707 .Ar id Ns Cm :show_text .
709 .Qq Ar id Ns Cm :set_line_cap Bro Ar n Ns | Ns Cm = Ns Ar n Ns | Ns Ar n Ns Cm < Ns Ar m Brc Brq Cm butt | round | square
710 sets the line cap style.
714 .Qq Ar id Ns Cm :set_line_join Bro Ar n Ns | Ns Cm = Ns Ar n Ns | Ns Ar n Ns Cm < Ns Ar m Brc Brq Cm miter | round | bevel
715 sets the line junction style.
719 .Qq Ar id Ns Cm :set_line_width Bro Ar n Ns | Ns Cm = Ns Ar n Ns | Ns Ar n Ns Cm < Ns Ar m Brc width
725 .Qq Ar id Ns Cm :set_source_rgba Bro Ar n Ns | Ns Cm = Ns Ar n Ns | Ns Ar n Ns Cm < Ns Ar m Brc color
728 is in the format used with
731 .Qq Ar id Ns Cm :show_text Bro Ar n Ns | Ns Cm = Ns Ar n Ns | Ns Ar n Ns Cm < Ns Ar m Brc text
734 beginning at the current point.
736 .Qq Ar id Ns Cm :stroke Bro Ar n Ns | Ns Cm = Ns Ar n Ns | Ns Ar n Ns Cm < Ns Ar m Brc
737 strokes the current path and clears it.
739 .Qq Ar id Ns Cm :stroke_preserve Bro Ar n Ns | Ns Cm = Ns Ar n Ns | Ns Ar n Ns Cm < Ns Ar m Brc
740 strokes the current path without clearing it.
742 .Qq Ar id Ns Cm :transform Bro Ar n Ns | Ns Cm = Ns Ar n Ns | Ns Ar n Ns Cm < Ns Ar m Brc Bq Ar xx yx xy yy x0 y0
743 modifies the current transformation matrix such that
745 .Dl Va x' Li = Ar xx Va x Li + Ar xy Va y Li + Ar x0 ,
746 .Dl Va y' Li = Ar yx Va y Li + Ar yy Va y Li + Ar y0 .
748 Default is resetting the current transformation matrix.
750 .Qq Ar id Ns Cm :translate Bro Ar n Ns | Ns Cm = Ns Ar n Ns | Ns Ar n Ns Cm < Ns Ar m Brc Ar tx ty
751 translates the user space origin by
757 .Bl -tag -width "commands "
759 .Qq Ar id Ns Cm :set_text Ar string
760 replaces the user-editable text with
763 .Qq Ar id Ns Cm :set_placeholder_text Ar string
766 that is displayed when the entry is empty and unfocused.
768 .Qq Ar id Ns Cm \&:text Ar text ,
769 once for each change of
774 are mouse pointer coordinates relative to the
776 .Bl -tag -width "commands "
780 .Qq Ar id Ns Cm \&:button_press Ar b x y ,
781 .Qq Ar id Ns Cm \&:button_release Ar b x y
784 is the mouse button (normally 1, 2, or 3 for the left, middle, and
785 right button; others may exist).
787 .Qq Ar id Ns Cm \&:motion Ar x y
788 is reported repeatedly while the mouse is being moved with a button
791 .Qq Ar id Ns Cm \&:key_press Ar key ,
801 .Bl -tag -width "commands "
803 .Qq Ar id Ns Cm :set_label Ar string
804 replaces the expander label text with
807 .Qq Ar id Ns Cm :set_expanded Brq Cm 0 | 1
810 the child widget, or makes it visible
815 .Ss GtkFileChooserButton
816 .Bl -tag -width "commands "
818 .Qq Ar id Ns Cm :set_filename Ar path
821 to the extent it exists.
823 .Qq Ar id Ns Cm \&:file Ar pathname
824 if the selection has changed.
826 .Ss GtkFileChooserDialog
828 .Cm GtkFileChooserDialog
836 .Ar foo Ns Cm _invoke .
839 .Cm GtkFileChooserDialog
846 if the dialog is the sole window of the GUI and therefore named
851 .Cm GtkFileChooserDialog
856 .Ar foo Ns Cm _cancel
858 if the dialog is the sole window of the GUI and therefore named
863 .Cm GtkFileChooserDialog
870 if the dialog is the sole window of the GUI and therefore named
873 .Bl -tag -width "commands "
875 .Qq Ar id Ns Cm :set_filename Ar path
878 to the extent it exists.
880 .Qq Ar id Ns Cm :set_current_name Ar string
883 the suggested filename, which may not yet exist.
885 should either resemble an absolute path, or the
887 must be set separately by
888 .Ar id Ns Cm :set_filename Ar directory .
890 .Qq Ar id Ns Cm :set_title Ar string
891 replaces the text in the title bar with
894 .Qq Ar id Ns Cm :resize Bq Ar width height
895 changes the size of the dialog window to
899 pixels if specified, or to the default size.
901 .Qq Ar id Ns Cm :move Ar x y
902 moves the dialog window to position
905 .Qq Ar id Ns Cm :fullscreen
907 .Qq Ar id Ns Cm :unfullscreen
908 switch fullscreen mode on and off.
910 .Qq Ar id Ns Cm :file Ar pathname
912 .Qq Ar id Ns Cm :folder Ar pathname
914 .Qq Ar id Ns Cm \&:closed
916 .Cm GtkFileChooserDialog
917 window was closed by the window manager.
920 .Bl -tag -width "commands "
922 .Qq Ar id Ns Cm :set_font_name Ar fontname
925 .Qq Ar id Ns Cm \&:font Ar fontname
928 .Bl -tag -width "commands "
930 .Qq Ar id Ns Cm :set_label Ar text
931 replaces the frame label text with
937 .Bl -tag -width "commands "
939 .Qq Ar id Ns Cm :set_from_icon_name Ar icon-name
940 replaces the image with one of the standard icons.
942 .Qq Ar id Ns Cm :set_from_file Ar path
943 replaces the image by the one found at
949 .Bl -tag -width "commands "
951 .Qq Ar id Ns Cm :set_text Ar string
952 replaces the label text with
957 .Ss GtkMenuItem, GtkImageMenuItem
958 .Bl -tag -width "commands "
967 .Ar foo Ns Cm _invoke
971 .Sx GtkFileChooserDialog
975 If there isn't any dialog attached to the
978 .Qq Ar id Ns Cm \&:active Ar label .
981 .Bl -tag -width "commands "
983 .Qq Ar id Ns Cm :set_current_page Ar n
984 switches to zero-based page number
989 .Ss GtkPrintUnixDialog
990 .Bl -tag -width "commands "
992 .Qq Ar id Ns Cm :print Ar file.ps
993 opens the print dialog.
998 to the printer the user selected in the dialog.
1000 .Qq Ar id Ns Cm \&:closed
1002 .Cm GtkPrintUnixDialog
1003 window was closed by the window manager.
1006 .Bl -tag -width "commands "
1008 .Qq Ar id Ns Cm :set_fraction Ar x
1009 moves the progress bar to
1011 .Pq between 0 and 1 .
1013 .Qq Ar id Ns Cm :set_text Bq Ar string
1014 replaces the text of the progress bar with
1016 Default is the progress percentage.
1021 .Bl -tag -width "commands "
1023 .Qq Ar id Ns Cm :set_active 1
1024 switches the button on.
1025 All other buttons of the same group will go off automatically.
1027 .Qq Ar id Ns Cm :set_label Ar string
1028 replaces the button text with
1031 .Qq Ar id Ns Cm \&:1
1033 .Qq Ar id Ns Cm \&:0
1037 .Bl -tag -width "commands "
1039 .Qq Ar id Ns Cm :set_value Ar x
1040 moves the slider to value
1043 .Qq Ar id Ns Cm :set_fill_level Bq Ar x
1044 moves the fill level indicator to value
1046 Default is hiding the fill level indicator.
1048 .Qq Ar id Ns Cm :set_range Ar min max
1051 .Qq Ar id Ns Cm :set_increments Ar step page
1052 sets the steps the slider moves while pressing arrow keys and
1054 .Pf / Ql Page_Down ,
1057 .Qq Ar id Ns Cm \&:value Ar number
1059 .Ss GtkScrolledWindow
1060 .Bl -tag -width "commands "
1062 .Qq Ar id Ns Cm :hscroll Ar position
1064 .Qq Ar id Ns Cm :vscroll Ar position
1067 to the left or top edge of the
1068 .Cm GtkScrolledWindow ,
1071 .Qq Ar id Ns Cm :hscroll_to_range Ar pos0 pos1
1073 .Qq Ar id Ns Cm :vscroll_to_range Ar pos0 pos1
1074 scroll, if necessary, the range between
1079 .Cm GtkScrolledWindow .
1080 If the range is greater than the window, the initial part of the range
1087 may be unsupported by Glade, but its definition can be inserted
1088 manually into the GtkBuilder
1091 .Bd -literal -offset indent
1093 <object class="GtkSocket" id="socket1">
1094 <property name="visible">True</property>
1095 <property name="can_focus">True</property>
1098 <property name="expand">True</property>
1099 <property name="fill">True</property>
1100 <property name="position">1</property>
1104 .Bl -tag -width "commands "
1107 requests a feedback message containing the socket
1110 .Qq Ar id Ns Cm :id Ar xid
1111 can be used by another process to XEmbed its widgets into the
1114 .Qq Ar id Ns Cm :plug-added ,
1119 Notification that the other process has inserted its widgets into or
1120 removed them from the
1124 .Bl -tag -width "commands "
1126 .Qq Ar id Ns Cm :set_text Ar string
1127 sets the selected value to
1130 .Qq Ar id Ns Cm :set_range Ar min max
1133 .Qq Ar id Ns Cm :set_increments Ar step page
1134 sets the steps the value changes while pressing arrow keys/left mouse
1137 .Pf / Ql Page_Down Ns
1138 /middle mouse button,
1141 .Qq Ar id Ns Cm \&:text Ar text
1144 .Bl -tag -width "commands "
1146 .Qq Ar id Ns Cm :start
1148 .Qq Ar id Ns Cm :stop
1149 start and stop the spinner.
1154 The context parameter
1156 is an arbitrary non-whitespace string.
1157 .Bl -tag -width "commands "
1159 .Qq Ar id Ns Cm :push_id Ar c string ,
1160 .Qq Ar id Ns Cm :push Ar string
1163 with context parameter
1167 respectively, and display it in the statusbar.
1169 .Qq Ar id Ns Cm :pop_id Ar c ,
1170 .Qq Ar id Ns Cm :pop
1171 remove the latest entry associated with context parameter
1175 respectively, from the statusbar.
1177 .Qq Ar id Ns Cm :remove_all_id Ar c ,
1178 .Qq Ar id Ns Cm :remove_all
1179 remove the entries associated with context parameter
1183 respectively, from the statusbar.
1188 .Bl -tag -width "commands "
1190 .Qq Ar id Ns Cm :set_active Brq Cm 0 | 1
1191 turns the switch off
1196 .Qq Ar id Ns Cm \&:1
1198 .Qq Ar id Ns Cm \&:0
1202 There should be a dedicated
1204 for sending (parts of) the text.
1212 .Ar foo Ns Cm _send_text
1213 will send the content of the
1218 .Ar foo Ns Cm _send_selection
1219 will send the highlighted part the
1221 .Bl -tag -width "commands "
1223 .Qq Ar id Ns Cm :set_text Ar string
1224 replaces the user-editable text with (potentially empty)
1227 .Qq Ar id Ns Cm :delete
1230 .Qq Ar id Ns Cm :insert_at_cursor Ar string
1235 .Qq Ar id Ns Cm :place_cursor Brq Ar position | Cm end
1236 places the text cursor at
1238 or at the end of the text.
1240 .Qq Ar id Ns Cm :place_cursor_at_line Ar line
1241 places the text cursor at the beginning of
1244 .Qq Ar id Ns Cm :scroll_to_cursor
1245 scrolls to the cursor position if necessary.
1247 .Qq Ar id Ns Cm :save Ar file
1252 command containing the text.
1254 .Qq Ar button_id Ns Cm :text Ar text ,
1262 and backslashes are replaced by
1266 .Bl -tag -width "commands "
1268 .Qq Ar id Ns Cm :set_active Brq Cm 0 | 1
1269 switches the button off
1274 .Qq Ar id Ns Cm :set_label Ar string
1275 replaces the button text with
1278 .Qq Ar id Ns Cm \&:1
1280 .Qq Ar id Ns Cm \&:0
1285 can deal with columns of type
1286 .Cm gboolean , gint , guint , glong , gulong , gint64 , guint64 , gfloat , gdouble ,
1293 refer to the underlying model
1296 .Cm GtkTreeStore ) .
1298 is a sequence of one or more colon-separated integers, e.g.
1302 .Bl -tag -width "commands "
1304 .Qq Ar id Ns Cm :set Ar row column data
1305 replaces the content at
1309 (which should be compatible with the type of
1311 If necessary, new tree nodes are created to obtain the minimal tree
1312 structure needed to support
1315 .Qq Ar id Ns Cm :insert_row Brq Ar row Bo Cm as_child Bc | Cm end
1316 inserts a new, empty row; either as a sibling of
1322 or at the end of the list, respectively.
1324 .Qq Ar id Ns Cm :move_row Ar origin Brq Ar destination | Cm end
1327 within its current level to
1331 .Qq Ar id Ns Cm :remove_row Ar row
1332 removes the row at position
1335 .Qq Ar id Ns Cm :clear
1338 .Qq Ar id Ns Cm :expand Ar row
1339 expands one level of the subtree below
1342 .Qq Ar id Ns Cm :expand_all Bq Ar row
1343 expands the subtree below
1347 .Qq Ar id Ns Cm :collapse Bq Ar row
1348 collapses the subtree below
1352 .Qq Ar id Ns Cm :set_cursor Bq Ar row
1357 .Qq Ar id Ns Cm :scroll Ar row column
1362 .Qq Ar id Ns Cm :save Ar file
1363 stores the content of the underlying model as a sequence of
1368 .Qq Ar id Ns Cm \&:clicked
1370 .Qq Ar id Ns Cm \&: Ns Ar column_type row column value ,
1371 one message per cell in the underlying model for each selected row; or
1373 .Qq Ar id Ns Cm \&: Ns Ar column_type row column new_value ,
1378 .Ss GtkTreeViewColumn
1379 .Bl -tag -width "commands "
1383 .Qq Ar id Ns Cm \&:clicked
1386 .Bl -tag -width "commands "
1388 .Qq Ar id Ns Cm :set_title Ar string
1389 replaces the text in the title bar with
1392 .Qq Ar id Ns Cm :resize Bq Ar width height
1393 changes the window size to
1397 pixels if specified, or to the default size.
1399 .Qq Ar id Ns Cm :move Ar x y
1400 moves the window to position
1403 .Qq Ar id Ns Cm :fullscreen
1405 .Qq Ar id Ns Cm :unfullscreen
1406 switch fullscreen mode on and off.
1408 .Qq Ar id Ns Cm \&:closed
1411 was closed by the window manager.
1416 .Ss Discovering Pipeglade Interactively
1417 Suppose the interface in
1420 .Sx GtkLabel Ql label1
1422 .Sx GtkButton Ql button1 .
1428 .Sx GtkButton , Ql button1:clicked
1429 will be reported on the terminal.
1432 .Dl label1:set_text The Button
1434 will change the text shown on the label into
1436 .Ss One-Shot File Dialog
1437 Suppose the interface in
1438 .Pa ./simple_open.ui
1440 .Sx GtkFileChooserDialog
1448 .Dl pipeglade -u simple_open.ui
1450 will open the dialog; pressing
1452 will close it after sending the selected filename to
1454 .Ss One-Shot User Notification
1456 .Pa ./simple_dialog.ui
1458 .Sx GtkLabel Ql label1 ,
1460 .Bd -literal -offset indent
1461 pipeglade -u simple_dialog.ui <<< \e
1462 "label1:set_text NOW READ THIS!"
1464 will set the label text accordingly and wait for user input.
1465 .Ss Continuous Input
1466 The following shell command displays a running clock:
1467 .Bd -literal -offset indent
1469 echo "label1:set_text `date`";
1471 done | pipeglade -u simple_dialog.ui
1473 .Ss Continuous Input and Output
1474 The following shell script fragment sets up
1476 for continuous communication with another program,
1478 .Bd -literal -offset indent
1479 pipeglade -i in.fifo -o out.fifo -b
1480 main_prog <out.fifo >in.fifo
1493 .An Bert Burgemeister
1494 .Aq Mt trebbu@googlemail.com .
1496 Due to what appears to be a bug in cairo v1.14.0,
1498 used with this library version occasionally crashes on