1This is guile-gnome-gtk.info, produced by makeinfo version 6.3 from
2guile-gnome-gtk.texi.
3
4This manual is for '(gnome gtk)' (version 2.16.5, updated 24 January
52015)
6
7   Copyright 1997-2007 Damon Chaplin and others
8
9     This work may be reproduced and distributed in whole or in part, in
10     any medium, physical or electronic, so as long as this copyright
11     notice remains intact and unchanged on all copies.  Commercial
12     redistribution is permitted and encouraged, but you may not
13     redistribute, in whole or in part, under terms more restrictive
14     than those under which you received it.  If you redistribute a
15     modified or translated version of this work, you must also make the
16     source code to the modified or translated version available in
17     electronic form without charge.  However, mere aggregation as part
18     of a larger work shall not count as a modification for this
19     purpose.
20
21     All code examples in this work are placed into the public domain,
22     and may be used, modified and redistributed without restriction.
23
24     BECAUSE THIS WORK IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
25     FOR THE WORK, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT
26     WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
27     PARTIES PROVIDE THE WORK "AS IS" WITHOUT WARRANTY OF ANY KIND,
28     EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
29     IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
30     PURPOSE. SHOULD THE WORK PROVE DEFECTIVE, YOU ASSUME THE COST OF
31     ALL NECESSARY REPAIR OR CORRECTION.
32
33     IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
34     WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
35     MODIFY AND/OR REDISTRIBUTE THE WORK AS PERMITTED ABOVE, BE LIABLE
36     TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
37     CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
38     THE WORK, EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF
39     THE POSSIBILITY OF SUCH DAMAGES.
40
41INFO-DIR-SECTION The Algorithmic Language Scheme
42START-INFO-DIR-ENTRY
43* Guile-Gtk: (guile-gnome-gtk.info).  The GIMP ToolKit.
44END-INFO-DIR-ENTRY
45
46
47File: guile-gnome-gtk.info,  Node: GtkToolbar,  Next: GtkToolItem,  Prev: GtkTearoffMenuItem,  Up: Top
48
4965 GtkToolbar
50*************
51
52Create bars of buttons and other widgets
53
5465.1 Overview
55=============
56
57A toolbar is created with a call to 'gtk-toolbar-new'.
58
59   A toolbar can contain instances of a subclass of '<gtk-tool-item>'.
60To add a '<gtk-tool-item>' to the a toolbar, use 'gtk-toolbar-insert'.
61To remove an item from the toolbar use 'gtk-container-remove'.  To add a
62button to the toolbar, add an instance of '<gtk-tool-button>'.
63
64   Toolbar items can be visually grouped by adding instances of
65'<gtk-separator-tool-item>' to the toolbar.  If a
66'<gtk-separator-tool-item>' has the "expand" property set to '#t' and
67the "draw" property set to '#f' the effect is to force all following
68items to the end of the toolbar.
69
70   Creating a context menu for the toolbar can be done by connecting to
71the '<gtk-toolbar::popup-context-menu>' signal.
72
7365.2 Usage
74==========
75
76 -- Class: <gtk-toolbar>
77     Derives from '<gtk-container>'.
78
79     This class defines the following slots:
80
81     'orientation'
82          The orientation of the toolbar
83
84     'toolbar-style'
85          How to draw the toolbar
86
87     'show-arrow'
88          If an arrow should be shown if the toolbar doesn't fit
89
90     'tooltips'
91          If the tooltips of the toolbar should be active or not
92
93     'icon-size'
94          Size of icons in this toolbar
95
96     'icon-size-set'
97          Whether the icon-size property has been set
98
99 -- Signal on <gtk-toolbar>: orientation-changed
100          (arg0 '<gtk-orientation>')
101     Emitted when the orientation of the toolbar changes.
102
103 -- Signal on <gtk-toolbar>: style-changed (arg0 '<gtk-toolbar-style>')
104     Emitted when the style of the toolbar changes.
105
106 -- Signal on <gtk-toolbar>: popup-context-menu (arg0 '<gint>')
107          (arg1 '<gint>') (arg2 '<gint>') => '<gboolean>'
108     Emitted when the user right-clicks the toolbar or uses the
109     keybinding to display a popup menu.
110
111     Application developers should handle this signal if they want to
112     display a context menu on the toolbar.  The context-menu should
113     appear at the coordinates given by X and Y.  The mouse button
114     number is given by the BUTTON parameter.  If the menu was popped up
115     using the keybaord, BUTTON is -1.
116
117 -- Signal on <gtk-toolbar>: focus-home-or-end (arg0 '<gboolean>')
118          => '<gboolean>'
119     A keybinding signal used internally by GTK+.  This signal can't be
120     used in application code
121
122 -- Function: gtk-toolbar-new =>  (ret '<gtk-widget>')
123     Creates a new toolbar.
124
125     RET
126          the newly-created toolbar.
127
128 -- Function: gtk-toolbar-insert (self '<gtk-toolbar>')
129          (item '<gtk-tool-item>') (pos 'int')
130 -- Method: insert
131     Insert a '<gtk-tool-item>' into the toolbar at position POS.  If
132     POS is 0 the item is prepended to the start of the toolbar.  If POS
133     is negative, the item is appended to the end of the toolbar.
134
135     TOOLBAR
136          a '<gtk-toolbar>'
137
138     ITEM
139          a '<gtk-tool-item>'
140
141     POS
142          the position of the new item
143
144     Since 2.4
145
146 -- Function: gtk-toolbar-get-item-index (self '<gtk-toolbar>')
147          (item '<gtk-tool-item>') =>  (ret 'int')
148 -- Method: get-item-index
149     Returns the position of ITEM on the toolbar, starting from 0.  It
150     is an error if ITEM is not a child of the toolbar.
151
152     TOOLBAR
153          a '<gtk-toolbar>'
154
155     ITEM
156          a '<gtk-tool-item>' that is a child of TOOLBAR
157
158     RET
159          the position of item on the toolbar.
160
161     Since 2.4
162
163 -- Function: gtk-toolbar-get-n-items (self '<gtk-toolbar>') =>
164          (ret 'int')
165 -- Method: get-n-items
166     Returns the number of items on the toolbar.
167
168     TOOLBAR
169          a '<gtk-toolbar>'
170
171     RET
172          the number of items on the toolbar
173
174     Since 2.4
175
176 -- Function: gtk-toolbar-get-nth-item (self '<gtk-toolbar>') (n 'int')
177          =>  (ret '<gtk-tool-item>')
178 -- Method: get-nth-item
179     Returns the N'th item on TOOLBAR, or ''#f'' if the toolbar does not
180     contain an N'th item.
181
182     TOOLBAR
183          a '<gtk-toolbar>'
184
185     N
186          A position on the toolbar
187
188     RET
189          The N'th '<gtk-tool-item>' on TOOLBAR, or ''#f'' if there
190          isn't an N'th item.
191
192     Since 2.4
193
194 -- Function: gtk-toolbar-get-drop-index (self '<gtk-toolbar>')
195          (x 'int') (y 'int') =>  (ret 'int')
196 -- Method: get-drop-index
197     Returns the position corresponding to the indicated point on
198     TOOLBAR.  This is useful when dragging items to the toolbar: this
199     function returns the position a new item should be inserted.
200
201     X and Y are in TOOLBAR coordinates.
202
203     TOOLBAR
204          a '<gtk-toolbar>'
205
206     X
207          x coordinate of a point on the toolbar
208
209     Y
210          y coordinate of a point on the toolbar
211
212     RET
213          The position corresponding to the point (X, Y) on the toolbar.
214
215     Since 2.4
216
217 -- Function: gtk-toolbar-set-drop-highlight-item (self '<gtk-toolbar>')
218          (tool_item '<gtk-tool-item>') (index_ 'int')
219 -- Method: set-drop-highlight-item
220     Highlights TOOLBAR to give an idea of what it would look like if
221     ITEM was added to TOOLBAR at the position indicated by INDEX.  If
222     ITEM is ''#f'', highlighting is turned off.  In that case INDEX is
223     ignored.
224
225     The TOOL-ITEM passed to this function must not be part of any
226     widget hierarchy.  When an item is set as drop highlight item it
227     can not added to any widget hierarchy or used as highlight item for
228     another toolbar.
229
230     TOOLBAR
231          a '<gtk-toolbar>'
232
233     TOOL-ITEM
234          a '<gtk-tool-item>', or ''#f'' to turn of highlighting
235
236     INDEX
237          a position on TOOLBAR
238
239     Since 2.4
240
241 -- Function: gtk-toolbar-set-show-arrow (self '<gtk-toolbar>')
242          (show_arrow 'bool')
243 -- Method: set-show-arrow
244     Sets whether to show an overflow menu when TOOLBAR doesn't have
245     room for all items on it.  If ''#t'', items that there are not room
246     are available through an overflow menu.
247
248     TOOLBAR
249          a '<gtk-toolbar>'
250
251     SHOW-ARROW
252          Whether to show an overflow menu
253
254     Since 2.4
255
256 -- Function: gtk-toolbar-set-orientation (self '<gtk-toolbar>')
257          (orientation '<gtk-orientation>')
258 -- Method: set-orientation
259     Sets whether a toolbar should appear horizontally or vertically.
260
261     TOOLBAR
262          a '<gtk-toolbar>'.
263
264     ORIENTATION
265          a new '<gtk-orientation>'.
266
267 -- Function: gtk-toolbar-set-tooltips (self '<gtk-toolbar>')
268          (enable 'bool')
269 -- Method: set-tooltips
270     Sets if the tooltips of a toolbar should be active or not.
271
272     TOOLBAR
273          a '<gtk-toolbar>'.
274
275     ENABLE
276          set to ''#f'' to disable the tooltips, or ''#t'' to enable
277          them.
278
279 -- Function: gtk-toolbar-get-show-arrow (self '<gtk-toolbar>') =>
280          (ret 'bool')
281 -- Method: get-show-arrow
282     Returns whether the toolbar has an overflow menu.  See
283     'gtk-toolbar-set-show-arrow'.
284
285     TOOLBAR
286          a '<gtk-toolbar>'
287
288     RET
289          ''#t'' if the toolbar has an overflow menu.
290
291     Since 2.4
292
293 -- Function: gtk-toolbar-get-orientation (self '<gtk-toolbar>') =>
294          (ret '<gtk-orientation>')
295 -- Method: get-orientation
296     Retrieves the current orientation of the toolbar.  See
297     'gtk-toolbar-set-orientation'.
298
299     TOOLBAR
300          a '<gtk-toolbar>'
301
302     RET
303          the orientation
304
305 -- Function: gtk-toolbar-get-style (self '<gtk-toolbar>') =>
306          (ret '<gtk-toolbar-style>')
307 -- Method: get-style
308     Retrieves whether the toolbar has text, icons, or both .  See
309     'gtk-toolbar-set-style'.
310
311     TOOLBAR
312          a '<gtk-toolbar>'
313
314     RET
315          the current style of TOOLBAR
316
317 -- Function: gtk-toolbar-get-icon-size (self '<gtk-toolbar>') =>
318          (ret '<gtk-icon-size>')
319 -- Method: get-icon-size
320     Retrieves the icon size for the toolbar.  See
321     'gtk-toolbar-set-icon-size'.
322
323     TOOLBAR
324          a '<gtk-toolbar>'
325
326     RET
327          the current icon size for the icons on the toolbar.
328
329 -- Function: gtk-toolbar-get-tooltips (self '<gtk-toolbar>') =>
330          (ret 'bool')
331 -- Method: get-tooltips
332     Retrieves whether tooltips are enabled.  See
333     'gtk-toolbar-set-tooltips'.
334
335     TOOLBAR
336          a '<gtk-toolbar>'
337
338     RET
339          ''#t'' if tooltips are enabled
340
341 -- Function: gtk-toolbar-get-relief-style (self '<gtk-toolbar>') =>
342          (ret '<gtk-relief-style>')
343 -- Method: get-relief-style
344     Returns the relief style of buttons on TOOLBAR.  See
345     'gtk-button-set-relief'.
346
347     TOOLBAR
348          a '<gtk-toolbar>'
349
350     RET
351          The relief style of buttons on TOOLBAR.
352
353     Since 2.4
354
355 -- Function: gtk-toolbar-set-style (self '<gtk-toolbar>')
356          (style '<gtk-toolbar-style>')
357 -- Method: set-style
358     Alters the view of TOOLBAR to display either icons only, text only,
359     or both.
360
361     TOOLBAR
362          a '<gtk-toolbar>'.
363
364     STYLE
365          the new style for TOOLBAR.
366
367 -- Function: gtk-toolbar-unset-style (self '<gtk-toolbar>')
368 -- Method: unset-style
369     Unsets a toolbar style set with 'gtk-toolbar-set-style', so that
370     user preferences will be used to determine the toolbar style.
371
372     TOOLBAR
373          a '<gtk-toolbar>'
374
375
376File: guile-gnome-gtk.info,  Node: GtkToolItem,  Next: GtkSeparatorToolItem,  Prev: GtkToolbar,  Up: Top
377
37866 GtkToolItem
379**************
380
381The base class of widgets that can be added to GtkToolbar
382
38366.1 Overview
384=============
385
386'<gtk-tool-item>'s are widgets that can appear on a toolbar.  To create
387a toolbar item that contain something else than a button, use
388'gtk-tool-item-new'.  Use 'gtk-container-add' to add a child widget to
389the tool item.
390
391   For toolbar items that contain buttons, see the '<gtk-tool-button>',
392'<gtk-toggle-tool-button>' and '<gtk-radio-tool-button>' classes.
393
39466.2 Usage
395==========
396
397 -- Class: <gtk-tool-item>
398     Derives from '<gtk-bin>'.
399
400     This class defines the following slots:
401
402     'visible-horizontal'
403          Whether the toolbar item is visible when the toolbar is in a
404          horizontal orientation.
405
406     'visible-vertical'
407          Whether the toolbar item is visible when the toolbar is in a
408          vertical orientation.
409
410     'is-important'
411          Whether the toolbar item is considered important.  When TRUE,
412          toolbar buttons show text in GTK_TOOLBAR_BOTH_HORIZ mode
413
414 -- Signal on <gtk-tool-item>: create-menu-proxy => '<gboolean>'
415     This signal is emitted when the toolbar needs information from
416     TOOL-ITEM about whether the item should appear in the toolbar
417     overflow menu.  In response the tool item should either
418
419        * call 'gtk-tool-item-set-proxy-menu-item' with a ''#f'' pointer
420          and return ''#t'' to indicate that the item should not appear
421          in the overflow menu
422        * call 'gtk-tool-item-set-proxy-menu-item' with a new menu item
423          and return ''#t'', or
424        * return ''#f'' to indicate that the signal was not handled by
425          the item.  This means that the item will not appear in the
426          overflow menu unless a later handler installs a menu item.
427
428     The toolbar may cache the result of this signal.  When the tool
429     item changes how it will respond to this signal it must call
430     'gtk-tool-item-rebuild-menu' to invalidate the cache and ensure
431     that the toolbar rebuilds its overflow menu.
432
433 -- Signal on <gtk-tool-item>: toolbar-reconfigured
434     This signal is emitted when some property of the toolbar that the
435     item is a child of changes.  For custom subclasses of
436     '<gtk-tool-item>', the default handler of this signal use the
437     functions to find out what the toolbar should look like and change
438     themselves accordingly.
439
440        * 'gtk-toolbar-get-orientation'
441        * 'gtk-toolbar-get-style'
442        * 'gtk-toolbar-get-icon-size'
443        * 'gtk-toolbar-get-relief-style'
444
445 -- Signal on <gtk-tool-item>: set-tooltip (arg0 '<gtk-tooltips>')
446          (arg1 '<gchararray>') (arg2 '<gchararray>') => '<gboolean>'
447     This signal is emitted when the toolitem's tooltip changes.
448     Application developers can use 'gtk-tool-item-set-tooltip' to set
449     the item's tooltip.
450
451 -- Function: gtk-tool-item-new =>  (ret '<gtk-tool-item>')
452     Creates a new '<gtk-tool-item>'
453
454     RET
455          the new '<gtk-tool-item>'
456
457     Since 2.4
458
459 -- Function: gtk-tool-item-set-homogeneous (self '<gtk-tool-item>')
460          (homogeneous 'bool')
461 -- Method: set-homogeneous
462     Sets whether TOOL-ITEM is to be allocated the same size as other
463     homogeneous items.  The effect is that all homogeneous items will
464     have the same width as the widest of the items.
465
466     TOOL-ITEM
467          a '<gtk-tool-item:>'
468
469     HOMOGENEOUS
470          whether TOOL-ITEM is the same size as other homogeneous items
471
472     Since 2.4
473
474 -- Function: gtk-tool-item-get-homogeneous (self '<gtk-tool-item>') =>
475          (ret 'bool')
476 -- Method: get-homogeneous
477     Returns whether TOOL-ITEM is the same size as other homogeneous
478     items.  See 'gtk-tool-item-set-homogeneous'.
479
480     TOOL-ITEM
481          a '<gtk-tool-item:>'
482
483     RET
484          ''#t'' if the item is the same size as other homogeneous
485          item.s
486
487     Since 2.4
488
489 -- Function: gtk-tool-item-set-expand (self '<gtk-tool-item>')
490          (expand 'bool')
491 -- Method: set-expand
492     Sets whether TOOL-ITEM is allocated extra space when there is more
493     room on the toolbar then needed for the items.  The effect is that
494     the item gets bigger when the toolbar gets bigger and smaller when
495     the toolbar gets smaller.
496
497     TOOL-ITEM
498          a '<gtk-tool-item:>'
499
500     EXPAND
501          Whether TOOL-ITEM is allocated extra space
502
503     Since 2.4
504
505 -- Function: gtk-tool-item-get-expand (self '<gtk-tool-item>') =>
506          (ret 'bool')
507 -- Method: get-expand
508     Returns whether TOOL-ITEM is allocated extra space.  See
509     'gtk-tool-item-set-expand'.
510
511     TOOL-ITEM
512          a '<gtk-tool-item:>'
513
514     RET
515          ''#t'' if TOOL-ITEM is allocated extra space.
516
517     Since 2.4
518
519 -- Function: gtk-tool-item-set-tooltip (self '<gtk-tool-item>')
520          (tooltips '<gtk-tooltips>') (tip_text 'mchars')
521          (tip_private 'mchars')
522 -- Method: set-tooltip
523     Sets the '<gtk-tooltips>' object to be used for TOOL-ITEM, the text
524     to be displayed as tooltip on the item and the private text to be
525     used.  See 'gtk-tooltips-set-tip'.
526
527     TOOL-ITEM
528          a '<gtk-tool-item:>'
529
530     TOOLTIPS
531          The '<gtk-tooltips>' object to be used
532
533     TIP-TEXT
534          text to be used as tooltip text for TOOL-ITEM
535
536     TIP-PRIVATE
537          text to be used as private tooltip text
538
539     Since 2.4
540
541 -- Function: gtk-tool-item-set-use-drag-window (self '<gtk-tool-item>')
542          (use_drag_window 'bool')
543 -- Method: set-use-drag-window
544     Sets whether TOOLITEM has a drag window.  When ''#t'' the toolitem
545     can be used as a drag source through 'gtk-drag-source-set'.  When
546     TOOLITEM has a drag window it will intercept all events, even those
547     that would otherwise be sent to a child of TOOLITEM.
548
549     TOOLITEM
550          a '<gtk-tool-item>'
551
552     USE-DRAG-WINDOW
553          Whether TOOLITEM has a drag window.
554
555     Since 2.4
556
557 -- Function: gtk-tool-item-get-use-drag-window (self '<gtk-tool-item>')
558          =>  (ret 'bool')
559 -- Method: get-use-drag-window
560     Returns whether TOOLITEM has a drag window.  See
561     'gtk-tool-item-set-use-drag-window'.
562
563     TOOLITEM
564          a '<gtk-tool-item>'
565
566     RET
567          ''#t'' if TOOLITEM uses a drag window.
568
569     Since 2.4
570
571 -- Function: gtk-tool-item-set-visible-vertical
572          (self '<gtk-tool-item>') (visible_vertical 'bool')
573 -- Method: set-visible-vertical
574     Sets whether TOOLITEM is visible when the toolbar is docked
575     vertically.  Some tool items, such as text entries, are too wide to
576     be useful on a vertically docked toolbar.  If VISIBLE-VERTICAL is
577     ''#f''TOOLITEM will not appear on toolbars that are docked
578     vertically.
579
580     TOOLITEM
581          a '<gtk-tool-item>'
582
583     VISIBLE-VERTICAL
584          whether TOOLITEM is visible when the toolbar is in vertical
585          mode
586
587     Since 2.4
588
589 -- Function: gtk-tool-item-get-visible-vertical
590          (self '<gtk-tool-item>') =>  (ret 'bool')
591 -- Method: get-visible-vertical
592     Returns whether TOOLITEM is visible when the toolbar is docked
593     vertically.  See 'gtk-tool-item-set-visible-vertical'.
594
595     TOOLITEM
596          a '<gtk-tool-item>'
597
598     RET
599          Whether TOOLITEM is visible when the toolbar is docked
600          vertically
601
602     Since 2.4
603
604 -- Function: gtk-tool-item-set-is-important (self '<gtk-tool-item>')
605          (is_important 'bool')
606 -- Method: set-is-important
607     Sets whether TOOL-ITEM should be considered important.  The
608     '<gtk-tool-button>' class uses this property to determine whether
609     to show or hide its label when the toolbar style is
610     'GTK_TOOLBAR_BOTH_HORIZ'.  The result is that only tool buttons
611     with the "is_important" property set have labels, an effect known
612     as "priority text"
613
614     TOOL-ITEM
615          a '<gtk-tool-item>'
616
617     IS-IMPORTANT
618          whether the tool item should be considered important
619
620     Since 2.4
621
622 -- Function: gtk-tool-item-get-is-important (self '<gtk-tool-item>')
623          =>  (ret 'bool')
624 -- Method: get-is-important
625     Returns whether TOOL-ITEM is considered important.  See
626     'gtk-tool-item-set-is-important'
627
628     TOOL-ITEM
629          a '<gtk-tool-item>'
630
631     RET
632          ''#t'' if TOOL-ITEM is considered important.
633
634     Since 2.4
635
636 -- Function: gtk-tool-item-get-icon-size (self '<gtk-tool-item>') =>
637          (ret '<gtk-icon-size>')
638 -- Method: get-icon-size
639     Returns the icon size used for TOOL-ITEM.  Custom subclasses of
640     '<gtk-tool-item>' should call this function to find out what size
641     icons they should use.
642
643     TOOL-ITEM
644          a '<gtk-tool-item:>'
645
646     RET
647          a '<gtk-icon-size>' indicating the icon size used for
648          TOOL-ITEM
649
650     Since 2.4
651
652 -- Function: gtk-tool-item-get-orientation (self '<gtk-tool-item>') =>
653          (ret '<gtk-orientation>')
654 -- Method: get-orientation
655     Returns the orientation used for TOOL-ITEM.  Custom subclasses of
656     '<gtk-tool-item>' should call this function to find out what size
657     icons they should use.
658
659     TOOL-ITEM
660          a '<gtk-tool-item:>'
661
662     RET
663          a '<gtk-orientation>' indicating the orientation used for
664          TOOL-ITEM
665
666     Since 2.4
667
668 -- Function: gtk-tool-item-get-toolbar-style (self '<gtk-tool-item>')
669          =>  (ret '<gtk-toolbar-style>')
670 -- Method: get-toolbar-style
671     Returns the toolbar style used for TOOL-ITEM.  Custom subclasses of
672     '<gtk-tool-item>' should call this function in the handler of the
673     GtkToolItem::toolbar_reconfigured signal to find out in what style
674     the toolbar is displayed and change themselves accordingly
675
676     Possibilities are:
677
678        * GTK_TOOLBAR_BOTH, meaning the tool item should show both an
679          icon and a label, stacked vertically
680        * GTK_TOOLBAR_ICONS, meaning the toolbar shows only icons
681        * GTK_TOOLBAR_TEXT, meaning the tool item should only show text
682        * GTK_TOOLBAR_BOTH_HORIZ, meaning the tool item should show both
683          an icon and a label, arranged horizontally (however, note the
684          '<gtk-tool-button::has-text-horizontally>' that makes tool
685          buttons not show labels when the toolbar style is
686          GTK_TOOLBAR_BOTH_HORIZ.
687
688     TOOL-ITEM
689          a '<gtk-tool-item:>'
690
691     RET
692          A '<gtk-toolbar-style>' indicating the toolbar style used for
693          TOOL-ITEM.
694
695     Since 2.4
696
697 -- Function: gtk-tool-item-get-relief-style (self '<gtk-tool-item>')
698          =>  (ret '<gtk-relief-style>')
699 -- Method: get-relief-style
700     Returns the relief style of TOOL-ITEM.  See
701     'gtk-button-set-relief-style'.  Custom subclasses of
702     '<gtk-tool-item>' should call this function in the handler of the
703     '<gtk-tool-item::toolbar-reconfigured>' signal to find out the
704     relief style of buttons.
705
706     TOOL-ITEM
707          a '<gtk-tool-item:>'
708
709     RET
710          a '<gtk-relief-style>' indicating the relief style used for
711          TOOL-ITEM.
712
713     Since 2.4
714
715 -- Function: gtk-tool-item-get-proxy-menu-item (self '<gtk-tool-item>')
716          (menu_item_id 'mchars') =>  (ret '<gtk-widget>')
717 -- Method: get-proxy-menu-item
718     If MENU-ITEM-ID matches the string passed to
719     'gtk-tool-item-set-proxy-menu-item' return the corresponding
720     '<gtk-menu-item>'.
721
722     Custom subclasses of '<gtk-tool-item>' should use this function to
723     update their menu item when the '<gtk-tool-item>' changes.  That
724     the MENU-ITEM-IDs must match ensures that a '<gtk-tool-item>' will
725     not inadvertently change a menu item that they did not create.
726
727     TOOL-ITEM
728          a '<gtk-tool-item:>'
729
730     MENU-ITEM-ID
731          a string used to identify the menu item
732
733     RET
734          The '<gtk-menu-item>' passed to
735          'gtk-tool-item-set-proxy-menu-item', if the MENU-ITEM-IDs
736          match.
737
738     Since 2.4
739
740 -- Function: gtk-tool-item-set-proxy-menu-item (self '<gtk-tool-item>')
741          (menu_item_id 'mchars') (menu_item '<gtk-widget>')
742 -- Method: set-proxy-menu-item
743     Sets the '<gtk-menu-item>' used in the toolbar overflow menu.  The
744     MENU-ITEM-ID is used to identify the caller of this function and
745     should also be used with 'gtk-tool-item-get-proxy-menu-item'.
746
747     TOOL-ITEM
748          a '<gtk-tool-item:>'
749
750     MENU-ITEM-ID
751          a string used to identify MENU-ITEM
752
753     MENU-ITEM
754          a '<gtk-menu-item>' to be used in the overflow menu
755
756     Since 2.4
757
758 -- Function: gtk-tool-item-rebuild-menu (self '<gtk-tool-item>')
759 -- Method: rebuild-menu
760     Calling this function signals to the toolbar that the overflow menu
761     item for TOOL-ITEM has changed.  If the overflow menu is visible
762     when this function it called, the menu will be rebuilt.
763
764     The function must be called when the tool item changes what it will
765     do in response to the "create_menu_proxy" signal.
766
767     TOOL-ITEM
768          a '<gtk-tool-item>'
769
770     Since 2.6
771
772
773File: guile-gnome-gtk.info,  Node: GtkSeparatorToolItem,  Next: GtkToolButton,  Prev: GtkToolItem,  Up: Top
774
77567 GtkSeparatorToolItem
776***********************
777
778A toolbar item that separates groups of other toolbar items
779
78067.1 Overview
781=============
782
783A '<gtk-separator-item>' is a '<gtk-tool-item>' that separates groups of
784other '<gtk-tool-items>'.  Depending on the theme, a
785'<gtk-separator-tool-item>' will often look like a vertical line on
786horizontally docked toolbars.
787
788   If the property "expand" is '#t' and the property "draw" is '#f', a
789'<gtk-separator-tool-item>' will act as a "spring" that forces other
790items to the ends of the toolbar.
791
792   Use 'gtk-separator-tool-item-new' to create a new
793'<gtk-separator-tool-item>'.
794
79567.2 Usage
796==========
797
798 -- Class: <gtk-separator-tool-item>
799     Derives from '<gtk-tool-item>'.
800
801     This class defines the following slots:
802
803     'draw'
804          Whether the separator is drawn, or just blank
805
806 -- Function: gtk-separator-tool-item-new =>  (ret '<gtk-tool-item>')
807     Create a new '<gtk-separator-tool-item>'
808
809     RET
810          the new '<gtk-separator-tool-item>'
811
812     Since 2.4
813
814 -- Function: gtk-separator-tool-item-set-draw
815          (self '<gtk-separator-tool-item>') (draw 'bool')
816 -- Method: set-draw
817     When SEPARATOR-TOOL-ITEMS is drawn as a vertical line, or just
818     blank.  Setting this '#f' along with 'gtk-tool-item-set-expand' is
819     useful to create an item that forces following items to the end of
820     the toolbar.
821
822     ITEM
823          a '<gtk-separator-tool-item>'
824
825     DRAW
826          whether SEPARATOR-TOOL-ITEM is drawn as a vertical line
827
828     Since 2.4
829
830 -- Function: gtk-separator-tool-item-get-draw
831          (self '<gtk-separator-tool-item>') =>  (ret 'bool')
832 -- Method: get-draw
833     Returns whether SEPARATOR-TOOL-ITEM is drawn as a line, or just
834     blank.  See 'gtk-separator-tool-item-set-draw'.
835
836     ITEM
837          a '<gtk-separator-tool-item>'
838
839     RET
840          '#t' if SEPARATOR-TOOL-ITEM is drawn as a line, or just blank.
841
842     Since 2.4
843
844
845File: guile-gnome-gtk.info,  Node: GtkToolButton,  Next: GtkMenuToolButton,  Prev: GtkSeparatorToolItem,  Up: Top
846
84768 GtkToolButton
848****************
849
850A GtkToolItem subclass that displays buttons
851
85268.1 Overview
853=============
854
855'<gtk-tool-button>'s are '<gtk-tool-items>' containing buttons.
856
857   Use 'gtk-tool-button-new' to create a new '<gtk-tool-button>'.  Use
858'gtk-tool-button-new-with-stock' to create a '<gtk-tool-button>'
859containing a stock item.
860
861   The label of a '<gtk-tool-button>' is determined by the properties
862"label_widget", "label", and "stock_id".  If "label_widget" is
863non-''#f'', then that widget is used as the label.  Otherwise, if
864"label" is non-''#f'', that string is used as the label.  Otherwise, if
865"stock_id" is non-''#f'', the label is determined by the stock item.
866Otherwise, the button does not have a label.
867
868   The icon of a '<gtk-tool-button>' is determined by the properties
869"icon_widget" and "stock_id".  If "icon_widget" is non-''#f'', then that
870widget is used as the icon.  Otherwise, if "stock_id" is non-''#f'', the
871icon is determined by the stock item.  Otherwise, the button does not
872have a label.
873
87468.2 Usage
875==========
876
877 -- Class: <gtk-tool-button>
878     Derives from '<gtk-tool-item>'.
879
880     This class defines the following slots:
881
882     'label'
883          Text to show in the item.
884
885     'use-underline'
886          If set, an underline in the label property indicates that the
887          next character should be used for the mnemonic accelerator key
888          in the overflow menu
889
890     'label-widget'
891          Widget to use as the item label
892
893     'stock-id'
894          The stock icon displayed on the item
895
896     'icon-name'
897          The name of the themed icon displayed on the item
898
899     'icon-widget'
900          Icon widget to display in the item
901
902 -- Signal on <gtk-tool-button>: clicked
903     This signal is emitted when the tool button is clicked with the
904     mouse or activated with the keyboard.
905
906 -- Function: gtk-tool-button-new (icon_widget '<gtk-widget>')
907          (label 'mchars') =>  (ret '<gtk-tool-item>')
908     Creates a new 'GtkToolButton' using ICON-WIDGET as icon and LABEL
909     as label.
910
911     ICON-WIDGET
912          a widget that will be used as icon widget, or ''#f''
913
914     LABEL
915          a string that will be used as label, or ''#f''
916
917     RET
918          A new '<gtk-tool-button>'
919
920     Since 2.4
921
922 -- Function: gtk-tool-button-new-from-stock (stock_id 'mchars') =>
923          (ret '<gtk-tool-item>')
924     Creates a new '<gtk-tool-button>' containing the image and text
925     from a stock item.  Some stock ids have preprocessor macros like
926     '<gtk-stock-ok>' and '<gtk-stock-apply>'.
927
928     It is an error if STOCK-ID is not a name of a stock item.
929
930     STOCK-ID
931          the name of the stock item
932
933     RET
934          A new '<gtk-tool-button>'
935
936     Since 2.4
937
938 -- Function: gtk-tool-button-set-label (self '<gtk-tool-button>')
939          (label 'mchars')
940 -- Method: set-label
941     Sets LABEL as the label used for the tool button.  The "label"
942     property only has an effect if not overridden by a non-''#f''
943     "label_widget" property.  If both the "label_widget" and "label"
944     properties are ''#f'', the label is determined by the "stock_id"
945     property.  If the "stock_id" property is also ''#f'', BUTTON will
946     not have a label.
947
948     BUTTON
949          a '<gtk-tool-button>'
950
951     LABEL
952          a string that will be used as label, or ''#f''.
953
954     Since 2.4
955
956 -- Function: gtk-tool-button-get-label (self '<gtk-tool-button>') =>
957          (ret 'mchars')
958 -- Method: get-label
959     Returns the label used by the tool button, or ''#f'' if the tool
960     button doesn't have a label.  or uses a the label from a stock
961     item.  The returned string is owned by GTK+, and must not be
962     modified or freed.
963
964     BUTTON
965          a '<gtk-tool-button>'
966
967     RET
968          The label, or ''#f''
969
970     Since 2.4
971
972 -- Function: gtk-tool-button-set-use-underline
973          (self '<gtk-tool-button>') (use_underline 'bool')
974 -- Method: set-use-underline
975     If set, an underline in the label property indicates that the next
976     character should be used for the mnemonic accelerator key in the
977     overflow menu.  For example, if the label property is "_Open" and
978     USE-UNDERLINE is ''#t'', the label on the tool button will be
979     "Open" and the item on the overflow menu will have an underlined
980     'O'.
981
982     Labels shown on tool buttons never have mnemonics on them; this
983     property only affects the menu item on the overflow menu.
984
985     BUTTON
986          a '<gtk-tool-button>'
987
988     USE-UNDERLINE
989          whether the button label has the form "_Open"
990
991     Since 2.4
992
993 -- Function: gtk-tool-button-get-use-underline
994          (self '<gtk-tool-button>') =>  (ret 'bool')
995 -- Method: get-use-underline
996     Returns whether underscores in the label property are used as
997     mnemonics on menu items on the overflow menu.  See
998     'gtk-tool-button-set-use-underline'.
999
1000     BUTTON
1001          a '<gtk-tool-button>'
1002
1003     RET
1004          ''#t'' if underscores in the label property are used as
1005          mnemonics on menu items on the overflow menu.
1006
1007     Since 2.4
1008
1009 -- Function: gtk-tool-button-set-stock-id (self '<gtk-tool-button>')
1010          (stock_id 'mchars')
1011 -- Method: set-stock-id
1012     Sets the name of the stock item.  See
1013     'gtk-tool-button-new-from-stock'.  The stock_id property only has
1014     an effect if not overridden by non-''#f'' "label" and "icon_widget"
1015     properties.
1016
1017     BUTTON
1018          a '<gtk-tool-button>'
1019
1020     STOCK-ID
1021          a name of a stock item, or ''#f''
1022
1023     Since 2.4
1024
1025 -- Function: gtk-tool-button-get-stock-id (self '<gtk-tool-button>')
1026          =>  (ret 'mchars')
1027 -- Method: get-stock-id
1028     Returns the name of the stock item.  See
1029     'gtk-tool-button-set-stock-id'.  The returned string is owned by
1030     GTK+ and must not be freed or modifed.
1031
1032     BUTTON
1033          a '<gtk-tool-button>'
1034
1035     RET
1036          the name of the stock item for BUTTON.
1037
1038     Since 2.4
1039
1040 -- Function: gtk-tool-button-set-icon-name (self '<gtk-tool-button>')
1041          (icon_name 'mchars')
1042 -- Method: set-icon-name
1043     Sets the icon for the tool button from a named themed icon.  See
1044     the docs for '<gtk-icon-theme>' for more details.  The "icon_name"
1045     property only has an effect if not overridden by non-''#f''
1046     "label", "icon_widget" and "stock_id" properties.
1047
1048     BUTTON
1049          a '<gtk-tool-button>'
1050
1051     ICON-NAME
1052          the name of the themed icon
1053
1054     Since 2.8
1055
1056 -- Function: gtk-tool-button-get-icon-name (self '<gtk-tool-button>')
1057          =>  (ret 'mchars')
1058 -- Method: get-icon-name
1059     Returns the name of the themed icon for the tool button, see
1060     'gtk-tool-button-set-icon-name'.
1061
1062     BUTTON
1063          a '<gtk-tool-button>'
1064
1065     RET
1066          the icon name or ''#f'' if the tool button has no themed icon
1067
1068     Since 2.8
1069
1070 -- Function: gtk-tool-button-set-icon-widget (self '<gtk-tool-button>')
1071          (icon_widget '<gtk-widget>')
1072 -- Method: set-icon-widget
1073     Sets ICON as the widget used as icon on BUTTON.  If ICON-WIDGET is
1074     ''#f'' the icon is determined by the "stock_id" property.  If the
1075     "stock_id" property is also ''#f'', BUTTON will not have an icon.
1076
1077     BUTTON
1078          a '<gtk-tool-button>'
1079
1080     ICON-WIDGET
1081          the widget used as icon, or ''#f''
1082
1083     Since 2.4
1084
1085 -- Function: gtk-tool-button-get-icon-widget (self '<gtk-tool-button>')
1086          =>  (ret '<gtk-widget>')
1087 -- Method: get-icon-widget
1088     Return the widget used as icon widget on BUTTON.  See
1089     'gtk-tool-button-set-icon-widget'.
1090
1091     BUTTON
1092          a '<gtk-tool-button>'
1093
1094     RET
1095          The widget used as icon on BUTTON, or ''#f''.
1096
1097     Since 2.4
1098
1099 -- Function: gtk-tool-button-set-label-widget
1100          (self '<gtk-tool-button>') (label_widget '<gtk-widget>')
1101 -- Method: set-label-widget
1102     Sets LABEL-WIDGET as the widget that will be used as the label for
1103     BUTTON.  If LABEL-WIDGET is ''#f'' the "label" property is used as
1104     label.  If "label" is also ''#f'', the label in the stock item
1105     determined by the "stock_id" property is used as label.  If
1106     "stock_id" is also ''#f'', BUTTON does not have a label.
1107
1108     BUTTON
1109          a '<gtk-tool-button>'
1110
1111     LABEL-WIDGET
1112          the widget used as label, or ''#f''
1113
1114     Since 2.4
1115
1116 -- Function: gtk-tool-button-get-label-widget
1117          (self '<gtk-tool-button>') =>  (ret '<gtk-widget>')
1118 -- Method: get-label-widget
1119     Returns the widget used as label on BUTTON.  See
1120     'gtk-tool-button-set-label-widget'.
1121
1122     BUTTON
1123          a '<gtk-tool-button>'
1124
1125     RET
1126          The widget used as label on BUTTON, or ''#f''.
1127
1128     Since 2.4
1129
1130
1131File: guile-gnome-gtk.info,  Node: GtkMenuToolButton,  Next: GtkToggleToolButton,  Prev: GtkToolButton,  Up: Top
1132
113369 GtkMenuToolButton
1134********************
1135
1136A GtkToolItem containing a button with an additional dropdown menu
1137
113869.1 Overview
1139=============
1140
1141A '<gtk-menu-tool-button>' is a '<gtk-tool-item>' that contains a button
1142and a small additional button with an arrow.  When clicked, the arrow
1143button pops up a dropdown menu.
1144
1145   Use 'gtk-menu-tool-button-new' to create a new
1146'<gtk-menu-tool-button>'.  Use 'gtk-menu-tool-button-new-from-stock' to
1147create a new '<gtk-menu-tool-button>' containing a stock item.
1148
114969.2 Usage
1150==========
1151
1152 -- Class: <gtk-menu-tool-button>
1153     Derives from '<gtk-tool-button>'.
1154
1155     This class defines the following slots:
1156
1157     'menu'
1158          The dropdown menu
1159
1160 -- Signal on <gtk-menu-tool-button>: show-menu
1161
1162 -- Function: gtk-menu-tool-button-new (icon_widget '<gtk-widget>')
1163          (label 'mchars') =>  (ret '<gtk-tool-item>')
1164     Creates a new '<gtk-menu-tool-button>' using ICON-WIDGET as icon
1165     and LABEL as label.
1166
1167     ICON-WIDGET
1168          a widget that will be used as icon widget, or ''#f''
1169
1170     LABEL
1171          a string that will be used as label, or ''#f''
1172
1173     RET
1174          the new '<gtk-menu-tool-button>'
1175
1176     Since 2.6
1177
1178 -- Function: gtk-menu-tool-button-new-from-stock (stock_id 'mchars')
1179          =>  (ret '<gtk-tool-item>')
1180     Creates a new '<gtk-menu-tool-button>'.  The new
1181     '<gtk-menu-tool-button>' will contain an icon and label from the
1182     stock item indicated by STOCK-ID.
1183
1184     STOCK-ID
1185          the name of a stock item
1186
1187     RET
1188          the new '<gtk-menu-tool-button>'
1189
1190     Since 2.6
1191
1192 -- Function: gtk-menu-tool-button-set-menu
1193          (self '<gtk-menu-tool-button>') (menu '<gtk-widget>')
1194 -- Method: set-menu
1195     Sets the '<gtk-menu>' that is popped up when the user clicks on the
1196     arrow.  If MENU is NULL, the arrow button becomes insensitive.
1197
1198     BUTTON
1199          a '<gtk-menu-tool-button>'
1200
1201     MENU
1202          the '<gtk-menu>' associated with '<gtk-menu-tool-button>'
1203
1204     Since 2.6
1205
1206 -- Function: gtk-menu-tool-button-get-menu
1207          (self '<gtk-menu-tool-button>') =>  (ret '<gtk-widget>')
1208 -- Method: get-menu
1209     Gets the '<gtk-menu>' associated with '<gtk-menu-tool-button>'.
1210
1211     BUTTON
1212          a '<gtk-menu-tool-button>'
1213
1214     RET
1215          the '<gtk-menu>' associated with '<gtk-menu-tool-button>'
1216
1217     Since 2.6
1218
1219
1220File: guile-gnome-gtk.info,  Node: GtkToggleToolButton,  Next: GtkRadioToolButton,  Prev: GtkMenuToolButton,  Up: Top
1221
122270 GtkToggleToolButton
1223**********************
1224
1225A GtkToolItem containing a toggle button
1226
122770.1 Overview
1228=============
1229
1230A '<gtk-toggle-tool-button>' is a '<gtk-tool-item>' that contains a
1231toggle button.
1232
1233   Use 'gtk-toggle-tool-button-new' to create a new
1234'<gtk-toggle-tool-button>'.  Use 'gtk-toggle-tool-button-new-from-stock'
1235to create a new '<gtk-toggle-tool-button>' containing a stock item.
1236
123770.2 Usage
1238==========
1239
1240 -- Class: <gtk-toggle-tool-button>
1241     Derives from '<gtk-tool-button>'.
1242
1243     This class defines the following slots:
1244
1245     'active'
1246          If the toggle button should be pressed in or not
1247
1248 -- Signal on <gtk-toggle-tool-button>: toggled
1249     Emitted whenever the toggle tool button changes state.
1250
1251 -- Function: gtk-toggle-tool-button-new =>  (ret '<gtk-tool-item>')
1252     Returns a new '<gtk-toggle-tool-button>'
1253
1254     RET
1255          a newly created '<gtk-toggle-tool-button>'
1256
1257     Since 2.4
1258
1259 -- Function: gtk-toggle-tool-button-set-active
1260          (self '<gtk-toggle-tool-button>') (is_active 'bool')
1261 -- Method: set-active
1262     Sets the status of the toggle tool button.  Set to ''#t'' if you
1263     want the GtkToggleButton to be 'pressed in', and ''#f'' to raise
1264     it.  This action causes the toggled signal to be emitted.
1265
1266     BUTTON
1267          a '<gtk-toggle-tool-button>'
1268
1269     IS-ACTIVE
1270          whether BUTTON should be active
1271
1272     Since 2.4
1273
1274 -- Function: gtk-toggle-tool-button-get-active
1275          (self '<gtk-toggle-tool-button>') =>  (ret 'bool')
1276 -- Method: get-active
1277     Queries a '<gtk-toggle-tool-button>' and returns its current state.
1278     Returns ''#t'' if the toggle button is pressed in and ''#f'' if it
1279     is raised.
1280
1281     BUTTON
1282          a '<gtk-toggle-tool-button>'
1283
1284     RET
1285          ''#t'' if the toggle tool button is pressed in, ''#f'' if not
1286
1287     Since 2.4
1288
1289
1290File: guile-gnome-gtk.info,  Node: GtkRadioToolButton,  Next: GtkUIManager,  Prev: GtkToggleToolButton,  Up: Top
1291
129271 GtkRadioToolButton
1293*********************
1294
1295A toolbar item that contains a radio button
1296
129771.1 Overview
1298=============
1299
1300A '<gtk-radio-tool-button>' is a '<gtk-tool-item>' that contains a radio
1301button, that is, a button that is part of a group of toggle buttons
1302where only one button can be active at a time.
1303
1304   Use 'gtk-radio-tool-button-new' to create a new
1305'<gtk-radio-tool-button>'.  use 'gtk-radio-tool-button-new-from-widget'
1306to create a new '<gtk-radio-tool-button>' that is part of the same group
1307as an existing '<gtk-radio-tool-button>'.  Use
1308'gtk-radio-tool-button-new-from-stock' or
1309'gtk-radio-tool-button-new-from-widget-with-stock' to create a new
1310'<gtk-radio-tool-button>' containing a stock item.
1311
131271.2 Usage
1313==========
1314
1315 -- Class: <gtk-radio-tool-button>
1316     Derives from '<gtk-toggle-tool-button>'.
1317
1318     This class defines the following slots:
1319
1320     'group'
1321          The radio tool button whose group this button belongs to.
1322
1323 -- Function: gtk-radio-tool-button-new (group '<gtk-radio-group*>') =>
1324          (ret '<gtk-tool-item>')
1325     Creates a new '<gtk-radio-tool-button>', adding it to GROUP.
1326
1327     GROUP
1328          An existing radio button group, or ''#f'' if you are creating
1329          a new group
1330
1331     RET
1332          The new '<gtk-radio-tool-button>'
1333
1334     Since 2.4
1335
1336 -- Function: gtk-radio-tool-button-get-group
1337          (self '<gtk-radio-tool-button>') =>
1338          (ret '<gtk-radio-group*>')
1339 -- Method: get-group
1340     Returns the radio button group BUTTON belongs to.
1341
1342     BUTTON
1343          a '<gtk-radio-tool-button>'
1344
1345     RET
1346          The group BUTTON belongs to.
1347
1348     Since 2.4
1349
1350 -- Function: gtk-radio-tool-button-set-group
1351          (self '<gtk-radio-tool-button>') (group '<gtk-radio-group*>')
1352 -- Method: set-group
1353     Adds BUTTON to GROUP, removing it from the group it belonged to
1354     before.
1355
1356     BUTTON
1357          a '<gtk-radio-tool-button>'
1358
1359     GROUP
1360          an existing radio button group
1361
1362     Since 2.4
1363
1364
1365File: guile-gnome-gtk.info,  Node: GtkUIManager,  Next: GtkActionGroup,  Prev: GtkRadioToolButton,  Up: Top
1366
136772 GtkUIManager
1368***************
1369
1370Constructing menus and toolbars from an XML description
1371
137272.1 Overview
1373=============
1374
1375A '<gtk-ui-manager>' constructs a user interface (menus and toolbars)
1376from one or more UI definitions, which reference actions from one or
1377more action groups.
1378
137972.2 UI Definitions
1380===================
1381
1382The UI definitions are specified in an XML format which can be roughly
1383described by the following DTD. There are some additional restrictions
1384beyond those specified in the DTD, e.g.  every toolitem must have a
1385toolbar in its anchestry and every menuitem must have a menubar or popup
1386in its anchestry.  Since a '<g-markup>' parser is used to parse the UI
1387description, it must not only be valid XML, but valid '<g-markup>'.
1388
1389
1390     <!ELEMENT ui          (menubar|toolbar|popup|accelerator)* >
1391     <!ELEMENT menubar     (menuitem|separator|placeholder|menu)* >
1392     <!ELEMENT menu        (menuitem|separator|placeholder|menu)* >
1393     <!ELEMENT popup       (menuitem|separator|placeholder|menu)* >
1394     <!ELEMENT toolbar     (toolitem|separator|placeholder)* >
1395     <!ELEMENT placeholder (menuitem|toolitem|separator|placeholder|menu)* >
1396     <!ELEMENT menuitem     EMPTY >
1397     <!ELEMENT toolitem     (menu?) >
1398     <!ELEMENT separator    EMPTY >
1399     <!ELEMENT accelerator  EMPTY >
1400     <!ATTLIST menubar      name                  &#x0023;IMPLIED
1401                            action                &#x0023;IMPLIED >
1402     <!ATTLIST toolbar      name                  &#x0023;IMPLIED
1403                            action                &#x0023;IMPLIED >
1404     <!ATTLIST popup        name                  &#x0023;IMPLIED
1405                            action                &#x0023;IMPLIED >
1406     <!ATTLIST placeholder  name                  &#x0023;IMPLIED
1407                            action                &#x0023;IMPLIED >
1408     <!ATTLIST separator    name                  &#x0023;IMPLIED
1409                            action                &#x0023;IMPLIED
1410                            expand   (true|false) &#x0023;IMPLIED >
1411     <!ATTLIST menu         name                  &#x0023;IMPLIED
1412                            action                &#x0023;REQUIRED
1413                            position (top|bot)    &#x0023;IMPLIED >
1414     <!ATTLIST menuitem     name                  &#x0023;IMPLIED
1415                            action                &#x0023;REQUIRED
1416                            position (top|bot)    &#x0023;IMPLIED >
1417     <!ATTLIST toolitem     name                  &#x0023;IMPLIED
1418                            action                &#x0023;REQUIRED
1419                            position (top|bot)    &#x0023;IMPLIED >
1420     <!ATTLIST accelerator  name                  &#x0023;IMPLIED
1421                            action                &#x0023;REQUIRED >
1422
1423   If a name is not specified, it defaults to the action.  If an action
1424is not specified either, the element name is used.  The name and action
1425attributes must not contain '/' characters after parsing (since that
1426would mess up path lookup) and must be usable as XML attributes when
1427enclosed in doublequotes, thus they must not '"' characters or
1428references to the &quot; entity.
1429
1430
1431     <ui>
1432       <menubar>
1433         <menu name="FileMenu" action="FileMenuAction">
1434           <menuitem name="New" action="New2Action" />
1435           <placeholder name="FileMenuAdditions" />
1436         </menu>
1437         <menu name="JustifyMenu" action="JustifyMenuAction">
1438           <menuitem name="Left" action="justify-left"/>
1439           <menuitem name="Centre" action="justify-center"/>
1440           <menuitem name="Right" action="justify-right"/>
1441           <menuitem name="Fill" action="justify-fill"/>
1442         </menu>
1443       </menubar>
1444       <toolbar action="toolbar1">
1445         <placeholder name="JustifyToolItems">
1446           <separator/>
1447           <toolitem name="Left" action="justify-left"/>
1448           <toolitem name="Centre" action="justify-center"/>
1449           <toolitem name="Right" action="justify-right"/>
1450           <toolitem name="Fill" action="justify-fill"/>
1451           <separator/>
1452         </placeholder>
1453       </toolbar>
1454     </ui>
1455
1456   The constructed widget hierarchy is very similar to the element tree
1457of the XML, with the exception that placeholders are merged into their
1458parents.  The correspondence of XML elements to widgets should be almost
1459obvious:
1460
1461TOOLBAR
1462
1463POPUP
1464
1465MENU
1466
1467MENUITEM
1468
1469TOOLITEM
1470
1471SEPARATOR
1472
1473ACCELERATOR
1474
1475   a '<gtk-menu-bar>'
1476
1477   a '<gtk-toolbar>'
1478
1479   a toplevel '<gtk-menu>'
1480
1481   a '<gtk-menu>' attached to a menuitem
1482
1483   a '<gtk-menu-item>' subclass, the exact type depends on the action
1484
1485   a '<gtk-tool-item>' subclass, the exact type depends on the action.
1486Note that toolitem elements may contain a menu element, but only if
1487their associated action specifies a '<gtk-menu-tool-button>' as proxy.
1488
1489   a '<gtk-separator-menu-item>' or '<gtk-separator-tool-item>'
1490
1491   a keyboard accelerator
1492
1493   The "position" attribute determines where a constructed widget is
1494positioned wrt.  to its siblings in the partially constructed tree.  If
1495it is "top", the widget is prepended, otherwise it is appended.
1496
149772.3 UI Merging
1498===============
1499
1500The most remarkable feature of '<gtk-ui-manager>' is that it can overlay
1501a set of menuitems and toolitems over another one, and demerge them
1502later.
1503
1504   Merging is done based on the names of the XML elements.  Each element
1505is identified by a path which consists of the names of its anchestors,
1506separated by slashes.  For example, the menuitem named "Left" in the
1507example above has the path '/ui/menubar/JustifyMenu/Left' and the
1508toolitem with the same name has path
1509'/ui/toolbar1/JustifyToolItems/Left'.
1510
151172.4 Accelerators
1512=================
1513
1514Every action has an accelerator path.  Accelerators are installed
1515together with menuitem proxies, but they can also be explicitly added
1516with <accelerator> elements in the UI definition.  This makes it
1517possible to have accelerators for actions even if they have no visible
1518proxies.
1519
152072.5 Smart Separators
1521=====================
1522
1523The separators created by '<gtk-ui-manager>' are "smart", i.e.  they do
1524not show up in the UI unless they end up between two visible menu or
1525tool items.  Separators which are located at the very beginning or end
1526of the menu or toolbar containing them, or multiple separators next to
1527each other, are hidden.  This is a useful feature, since the merging of
1528UI elements from multiple sources can make it hard or impossible to
1529determine in advance whether a separator will end up in such an
1530unfortunate position.
1531
1532   For separators in toolbars, you can set 'expand="true"' to turn them
1533from a small, visible separator to an expanding, invisible one.
1534Toolitems following an expanding separator are effectively
1535right-aligned.
1536
153772.6 Empty Menus
1538================
1539
1540Submenus pose similar problems to separators inconnection with merging.
1541It is impossible to know in advance whether they will end up empty after
1542merging.  '<gtk-ui-manager>' offers two ways to treat empty submenus:
1543The behaviour is chosen based on the "hide_if_empty" property of the
1544action to which the submenu is associated.
1545
1546   make them disappear by hiding the menu item they're attached to
1547
1548   add an insensitive "Empty" item
1549
155072.7 Usage
1551==========
1552
1553 -- Class: <gtk-ui-manager>
1554     Derives from '<gtk-buildable>', '<gobject>'.
1555
1556     This class defines the following slots:
1557
1558     'add-tearoffs'
1559          Whether tearoff menu items should be added to menus
1560
1561     'ui'
1562          An XML string describing the merged UI
1563
1564 -- Signal on <gtk-ui-manager>: connect-proxy (arg0 '<gtk-action>')
1565          (arg1 '<gtk-widget>')
1566     The connect_proxy signal is emitted after connecting a proxy to an
1567     action in the group.
1568
1569     This is intended for simple customizations for which a custom
1570     action class would be too clumsy, e.g.  showing tooltips for
1571     menuitems in the statusbar.
1572
1573     Since 2.4
1574
1575 -- Signal on <gtk-ui-manager>: disconnect-proxy (arg0 '<gtk-action>')
1576          (arg1 '<gtk-widget>')
1577     The disconnect_proxy signal is emitted after disconnecting a proxy
1578     from an action in the group.
1579
1580     Since 2.4
1581
1582 -- Signal on <gtk-ui-manager>: pre-activate (arg0 '<gtk-action>')
1583     The pre_activate signal is emitted just before the ACTION is
1584     activated.
1585
1586     This is intended for applications to get notification just before
1587     any action is activated.
1588
1589     Since 2.4
1590
1591 -- Signal on <gtk-ui-manager>: post-activate (arg0 '<gtk-action>')
1592     The post_activate signal is emitted just after the ACTION is
1593     activated.
1594
1595     This is intended for applications to get notification just after
1596     any action is activated.
1597
1598     Since 2.4
1599
1600 -- Signal on <gtk-ui-manager>: add-widget (arg0 '<gtk-widget>')
1601     The add_widget signal is emitted for each generated menubar and
1602     toolbar.  It is not emitted for generated popup menus, which can be
1603     obtained by 'gtk-ui-manager-get-widget'.
1604
1605     Since 2.4
1606
1607 -- Signal on <gtk-ui-manager>: actions-changed
1608     The "actions-changed" signal is emitted whenever the set of actions
1609     changes.
1610
1611     Since 2.4
1612
1613 -- Function: gtk-ui-manager-new =>  (ret '<gtk-ui-manager>')
1614     Creates a new ui manager object.
1615
1616     RET
1617          a new ui manager object.
1618
1619     Since 2.4
1620
1621 -- Function: gtk-ui-manager-set-add-tearoffs (self '<gtk-ui-manager>')
1622          (add_tearoffs 'bool')
1623 -- Method: set-add-tearoffs
1624     Sets the "add_tearoffs" property, which controls whether menus
1625     generated by this '<gtk-ui-manager>' will have tearoff menu items.
1626
1627     Note that this only affects regular menus.  Generated popup menus
1628     never have tearoff menu items.
1629
1630     SELF
1631          a '<gtk-ui-manager>'
1632
1633     ADD-TEAROFFS
1634          whether tearoff menu items are added
1635
1636     Since 2.4
1637
1638 -- Function: gtk-ui-manager-get-add-tearoffs (self '<gtk-ui-manager>')
1639          =>  (ret 'bool')
1640 -- Method: get-add-tearoffs
1641     Returns whether menus generated by this '<gtk-ui-manager>' will
1642     have tearoff menu items.
1643
1644     SELF
1645          a '<gtk-ui-manager>'
1646
1647     RET
1648          whether tearoff menu items are added
1649
1650     Since 2.4
1651
1652 -- Function: gtk-ui-manager-insert-action-group
1653          (self '<gtk-ui-manager>') (action_group '<gtk-action-group>')
1654          (pos 'int')
1655 -- Method: insert-action-group
1656     Inserts an action group into the list of action groups associated
1657     with SELF.  Actions in earlier groups hide actions with the same
1658     name in later groups.
1659
1660     SELF
1661          a '<gtk-ui-manager>' object
1662
1663     ACTION-GROUP
1664          the action group to be inserted
1665
1666     POS
1667          the position at which the group will be inserted.
1668
1669     Since 2.4
1670
1671 -- Function: gtk-ui-manager-remove-action-group
1672          (self '<gtk-ui-manager>') (action_group '<gtk-action-group>')
1673 -- Method: remove-action-group
1674     Removes an action group from the list of action groups associated
1675     with SELF.
1676
1677     SELF
1678          a '<gtk-ui-manager>' object
1679
1680     ACTION-GROUP
1681          the action group to be removed
1682
1683     Since 2.4
1684
1685 -- Function: gtk-ui-manager-get-action-groups (self '<gtk-ui-manager>')
1686          =>  (ret 'glist-of')
1687 -- Method: get-action-groups
1688     Returns the list of action groups associated with SELF.
1689
1690     SELF
1691          a '<gtk-ui-manager>' object
1692
1693     RET
1694          a '<g-list>' of action groups.  The list is owned by GTK+ and
1695          should not be modified.
1696
1697     Since 2.4
1698
1699 -- Function: gtk-ui-manager-get-accel-group (self '<gtk-ui-manager>')
1700          =>  (ret '<gtk-accel-group>')
1701 -- Method: get-accel-group
1702     Returns the '<gtk-accel-group>' associated with SELF.
1703
1704     SELF
1705          a '<gtk-ui-manager>' object
1706
1707     RET
1708          the '<gtk-accel-group>'.
1709
1710     Since 2.4
1711
1712 -- Function: gtk-ui-manager-get-widget (self '<gtk-ui-manager>')
1713          (path 'mchars') =>  (ret '<gtk-widget>')
1714 -- Method: get-widget
1715     Looks up a widget by following a path.  The path consists of the
1716     names specified in the XML description of the UI. separated by '/'.
1717     Elements which don't have a name or action attribute in the XML
1718     (e.g.  <popup>) can be addressed by their XML element name (e.g.
1719     "popup").  The root element ("/ui") can be omitted in the path.
1720
1721     Note that the widget found by following a path that ends in a
1722     <menu> element is the menuitem to which the menu is attached, not
1723     the menu itself.
1724
1725     Also note that the widgets constructed by a ui manager are not tied
1726     to the lifecycle of the ui manager.  If you add the widgets
1727     returned by this function to some container or explicitly ref them,
1728     they will survive the destruction of the ui manager.
1729
1730     SELF
1731          a '<gtk-ui-manager>'
1732
1733     PATH
1734          a path
1735
1736     RET
1737          the widget found by following the path, or ''#f'' if no widget
1738          was found.
1739
1740     Since 2.4
1741
1742 -- Function: gtk-ui-manager-get-toplevels (self '<gtk-ui-manager>')
1743          (types '<gtk-ui-manager-item-type>') =>  (ret 'gslist-of')
1744 -- Method: get-toplevels
1745     Obtains a list of all toplevel widgets of the requested types.
1746
1747     SELF
1748          a '<gtk-ui-manager>'
1749
1750     TYPES
1751          specifies the types of toplevel widgets to include.  Allowed
1752          types are '<gtk-ui-manager-menubar>',
1753          '<gtk-ui-manager-toolbar>' and '<gtk-ui-manager-popup>'.
1754
1755     RET
1756          a newly-allocated of all toplevel widgets of the requested
1757          types.
1758
1759     Since 2.4
1760
1761 -- Function: gtk-ui-manager-get-action (self '<gtk-ui-manager>')
1762          (path 'mchars') =>  (ret '<gtk-action>')
1763 -- Method: get-action
1764     Looks up an action by following a path.  See
1765     'gtk-ui-manager-get-widget' for more information about paths.
1766
1767     SELF
1768          a '<gtk-ui-manager>'
1769
1770     PATH
1771          a path
1772
1773     RET
1774          the action whose proxy widget is found by following the path,
1775          or ''#f'' if no widget was found.
1776
1777     Since 2.4
1778
1779 -- Function: gtk-ui-manager-add-ui-from-string
1780          (self '<gtk-ui-manager>') (buffer 'mchars') =>
1781          (ret 'unsigned-int')
1782 -- Method: add-ui-from-string
1783     Parses a string containing a UI definition and merges it with the
1784     current contents of SELF.  An enclosing <ui> element is added if it
1785     is missing.
1786
1787     SELF
1788          a '<gtk-ui-manager>' object
1789
1790     BUFFER
1791          the string to parse
1792
1793     LENGTH
1794          the length of BUFFER (may be -1 if BUFFER is nul-terminated)
1795
1796     ERROR
1797          return location for an error
1798
1799     RET
1800          The merge id for the merged UI. The merge id can be used to
1801          unmerge the UI with 'gtk-ui-manager-remove-ui'.  If an error
1802          occurred, the return value is 0.
1803
1804     Since 2.4
1805
1806 -- Function: gtk-ui-manager-add-ui-from-file (self '<gtk-ui-manager>')
1807          (filename 'mchars') =>  (ret 'unsigned-int')
1808 -- Method: add-ui-from-file
1809     Parses a file containing a UI definition and merges it with the
1810     current contents of SELF.
1811
1812     SELF
1813          a '<gtk-ui-manager>' object
1814
1815     FILENAME
1816          the name of the file to parse
1817
1818     ERROR
1819          return location for an error
1820
1821     RET
1822          The merge id for the merged UI. The merge id can be used to
1823          unmerge the UI with 'gtk-ui-manager-remove-ui'.  If an error
1824          occurred, the return value is 0.
1825
1826     Since 2.4
1827
1828 -- Function: gtk-ui-manager-new-merge-id (self '<gtk-ui-manager>') =>
1829          (ret 'unsigned-int')
1830 -- Method: new-merge-id
1831     Returns an unused merge id, suitable for use with
1832     'gtk-ui-manager-add-ui'.
1833
1834     SELF
1835          a '<gtk-ui-manager>'
1836
1837     RET
1838          an unused merge id.
1839
1840     Since 2.4
1841
1842 -- Function: gtk-ui-manager-add-ui (self '<gtk-ui-manager>')
1843          (merge_id 'unsigned-int') (path 'mchars') (name 'mchars')
1844          (action 'mchars') (type '<gtk-ui-manager-item-type>')
1845          (top 'bool')
1846 -- Method: add-ui
1847     Adds a UI element to the current contents of SELF.
1848
1849     If TYPE is 'GTK_UI_MANAGER_AUTO', GTK+ inserts a menuitem, toolitem
1850     or separator if such an element can be inserted at the place
1851     determined by PATH.  Otherwise TYPE must indicate an element that
1852     can be inserted at the place determined by PATH.
1853
1854     If PATH points to a menuitem or toolitem, the new element will be
1855     inserted before or after this item, depending on TOP.
1856
1857     SELF
1858          a '<gtk-ui-manager>'
1859
1860     MERGE-ID
1861          the merge id for the merged UI, see
1862          'gtk-ui-manager-new-merge-id'
1863
1864     PATH
1865          a path
1866
1867     NAME
1868          the name for the added UI element
1869
1870     ACTION
1871          the name of the action to be proxied, or ''#f'' to add a
1872          separator
1873
1874     TYPE
1875          the type of UI element to add.
1876
1877     TOP
1878          if ''#t'', the UI element is added before its siblings,
1879          otherwise it is added after its siblings.
1880
1881     Since 2.4
1882
1883 -- Function: gtk-ui-manager-remove-ui (self '<gtk-ui-manager>')
1884          (merge_id 'unsigned-int')
1885 -- Method: remove-ui
1886     Unmerges the part of SELFs content identified by MERGE-ID.
1887
1888     SELF
1889          a '<gtk-ui-manager>' object
1890
1891     MERGE-ID
1892          a merge id as returned by 'gtk-ui-manager-add-ui-from-string'
1893
1894     Since 2.4
1895
1896 -- Function: gtk-ui-manager-get-ui (self '<gtk-ui-manager>') =>
1897          (ret 'mchars')
1898 -- Method: get-ui
1899     Creates a UI definition of the merged UI.
1900
1901     SELF
1902          a '<gtk-ui-manager>'
1903
1904     RET
1905          A newly allocated string containing an XML representation of
1906          the merged UI.
1907
1908     Since 2.4
1909
1910 -- Function: gtk-ui-manager-ensure-update (self '<gtk-ui-manager>')
1911 -- Method: ensure-update
1912     Makes sure that all pending updates to the UI have been completed.
1913
1914     This may occasionally be necessary, since '<gtk-ui-manager>'
1915     updates the UI in an idle function.  A typical example where this
1916     function is useful is to enforce that the menubar and toolbar have
1917     been added to the main window before showing it:
1918
1919
1920          gtk_container_add (GTK_CONTAINER (window), vbox);
1921          g_signal_connect (merge, "add_widget",
1922                            G_CALLBACK (add_widget), vbox);
1923          gtk_ui_manager_add_ui_from_file (merge, "my-menus");
1924          gtk_ui_manager_add_ui_from_file (merge, "my-toolbars");
1925          gtk_ui_manager_ensure_update (merge);
1926          gtk_widget_show (window);
1927
1928     SELF
1929          a '<gtk-ui-manager>'
1930
1931     Since 2.4
1932
1933
1934File: guile-gnome-gtk.info,  Node: GtkActionGroup,  Next: GtkAction,  Prev: GtkUIManager,  Up: Top
1935
193673 GtkActionGroup
1937*****************
1938
1939A group of actions
1940
194173.1 Overview
1942=============
1943
1944Actions are organised into groups.  An action group is essentially a map
1945from names to '<gtk-action>' objects.
1946
1947   All actions that would make sense to use in a particular context
1948should be in a single group.  Multiple action groups may be used for a
1949particular user interface.  In fact, it is expected that most nontrivial
1950applications will make use of multiple groups.  For example, in an
1951application that can edit multiple documents, one group holding global
1952actions (e.g.  quit, about, new), and one group per document holding
1953actions that act on that document (eg.  save, cut/copy/paste, etc).
1954Each window's menus would be constructed from a combination of two
1955action groups.
1956
1957   Accelerators are handled by the GTK+ accelerator map.  All actions
1958are assigned an accelerator path (which normally has the form
1959'<Actions>//') and a shortcut is associated with this accelerator path.
1960All menuitems and toolitems take on this accelerator path.  The GTK+
1961accelerator map code makes sure that the correct shortcut is displayed
1962next to the menu item.
1963
196473.2 Usage
1965==========
1966
1967 -- Class: <gtk-action-group>
1968     Derives from '<gtk-buildable>', '<gobject>'.
1969
1970     This class defines the following slots:
1971
1972     'name'
1973          A name for the action group.
1974
1975     'sensitive'
1976          Whether the action group is enabled.
1977
1978     'visible'
1979          Whether the action group is visible.
1980
1981 -- Signal on <gtk-action-group>: connect-proxy (arg0 '<gtk-action>')
1982          (arg1 '<gtk-widget>')
1983     The connect_proxy signal is emitted after connecting a proxy to an
1984     action in the group.  Note that the proxy may have been connected
1985     to a different action before.
1986
1987     This is intended for simple customizations for which a custom
1988     action class would be too clumsy, e.g.  showing tooltips for
1989     menuitems in the statusbar.
1990
1991     '<gtk-ui-manager>' proxies the signal and provides global
1992     notification just before any action is connected to a proxy, which
1993     is probably more convenient to use.
1994
1995     Since 2.4
1996
1997 -- Signal on <gtk-action-group>: disconnect-proxy (arg0 '<gtk-action>')
1998          (arg1 '<gtk-widget>')
1999     The disconnect_proxy signal is emitted after disconnecting a proxy
2000     from an action in the group.
2001
2002     '<gtk-ui-manager>' proxies the signal and provides global
2003     notification just before any action is connected to a proxy, which
2004     is probably more convenient to use.
2005
2006     Since 2.4
2007
2008 -- Signal on <gtk-action-group>: pre-activate (arg0 '<gtk-action>')
2009     The pre_activate signal is emitted just before the ACTION in the
2010     ACTION-GROUP is activated
2011
2012     This is intended for '<gtk-ui-manager>' to proxy the signal and
2013     provide global notification just before any action is activated.
2014
2015     Since 2.4
2016
2017 -- Signal on <gtk-action-group>: post-activate (arg0 '<gtk-action>')
2018     The post_activate signal is emitted just after the ACTION in the
2019     ACTION-GROUP is activated
2020
2021     This is intended for '<gtk-ui-manager>' to proxy the signal and
2022     provide global notification just after any action is activated.
2023
2024     Since 2.4
2025
2026 -- Function: gtk-action-group-new (name 'mchars') =>
2027          (ret '<gtk-action-group>')
2028     Creates a new '<gtk-action-group>' object.  The name of the action
2029     group is used when associating keybindings with the actions.
2030
2031     NAME
2032          the name of the action group.
2033
2034     RET
2035          the new '<gtk-action-group>'
2036
2037     Since 2.4
2038
2039 -- Function: gtk-action-group-get-name (self '<gtk-action-group>') =>
2040          (ret 'mchars')
2041 -- Method: get-name
2042     Gets the name of the action group.
2043
2044     ACTION-GROUP
2045          the action group
2046
2047     RET
2048          the name of the action group.
2049
2050     Since 2.4
2051
2052 -- Function: gtk-action-group-get-sensitive (self '<gtk-action-group>')
2053          =>  (ret 'bool')
2054 -- Method: get-sensitive
2055     Returns ''#t'' if the group is sensitive.  The constituent actions
2056     can only be logically sensitive (see 'gtk-action-is-sensitive') if
2057     they are sensitive (see 'gtk-action-get-sensitive') and their group
2058     is sensitive.
2059
2060     ACTION-GROUP
2061          the action group
2062
2063     RET
2064          ''#t'' if the group is sensitive.
2065
2066     Since 2.4
2067
2068 -- Function: gtk-action-group-set-sensitive (self '<gtk-action-group>')
2069          (sensitive 'bool')
2070 -- Method: set-sensitive
2071     Changes the sensitivity of ACTION-GROUP
2072
2073     ACTION-GROUP
2074          the action group
2075
2076     SENSITIVE
2077          new sensitivity
2078
2079     Since 2.4
2080
2081 -- Function: gtk-action-group-get-visible (self '<gtk-action-group>')
2082          =>  (ret 'bool')
2083 -- Method: get-visible
2084     Returns ''#t'' if the group is visible.  The constituent actions
2085     can only be logically visible (see 'gtk-action-is-visible') if they
2086     are visible (see 'gtk-action-get-visible') and their group is
2087     visible.
2088
2089     ACTION-GROUP
2090          the action group
2091
2092     RET
2093          ''#t'' if the group is visible.
2094
2095     Since 2.4
2096
2097 -- Function: gtk-action-group-set-visible (self '<gtk-action-group>')
2098          (visible 'bool')
2099 -- Method: set-visible
2100     Changes the visible of ACTION-GROUP.
2101
2102     ACTION-GROUP
2103          the action group
2104
2105     VISIBLE
2106          new visiblity
2107
2108     Since 2.4
2109
2110 -- Function: gtk-action-group-get-action (self '<gtk-action-group>')
2111          (action_name 'mchars') =>  (ret '<gtk-action>')
2112 -- Method: get-action
2113     Looks up an action in the action group by name.
2114
2115     ACTION-GROUP
2116          the action group
2117
2118     ACTION-NAME
2119          the name of the action
2120
2121     RET
2122          the action, or ''#f'' if no action by that name exists
2123
2124     Since 2.4
2125
2126 -- Function: gtk-action-group-list-actions (self '<gtk-action-group>')
2127          =>  (ret 'glist-of')
2128 -- Method: list-actions
2129     Lists the actions in the action group.
2130
2131     ACTION-GROUP
2132          the action group
2133
2134     RET
2135          an allocated list of the action objects in the action group
2136
2137     Since 2.4
2138
2139 -- Function: gtk-action-group-add-action (self '<gtk-action-group>')
2140          (action '<gtk-action>')
2141 -- Method: add-action
2142     Adds an action object to the action group.  Note that this function
2143     does not set up the accel path of the action, which can lead to
2144     problems if a user tries to modify the accelerator of a menuitem
2145     associated with the action.  Therefore you must either set the
2146     accel path yourself with 'gtk-action-set-accel-path', or use
2147     'gtk_action_group_add_action_with_accel (..., NULL)'.
2148
2149     ACTION-GROUP
2150          the action group
2151
2152     ACTION
2153          an action
2154
2155     Since 2.4
2156
2157 -- Function: gtk-action-group-remove-action (self '<gtk-action-group>')
2158          (action '<gtk-action>')
2159 -- Method: remove-action
2160     Removes an action object from the action group.
2161
2162     ACTION-GROUP
2163          the action group
2164
2165     ACTION
2166          an action
2167
2168     Since 2.4
2169
2170 -- Function: gtk-action-group-add-actions (self '<gtk-action-group>')
2171          (entries 'scm')
2172 -- Method: add-actions
2173     This is a convenience function to create a number of actions and
2174     add them to the action group.
2175
2176     The "activate" signals of the actions are connected to the
2177     callbacks and their accel paths are set to '<Actions>//'.
2178
2179     ACTION-GROUP
2180          The action group
2181
2182     SCM
2183          An list of actions.  The actions are of the form '(NAME
2184          STOCK-ID label accelerator tooltip proc?)'.  All values are
2185          strings except the PROC, which should be a procedure suitable
2186          for connecting to the 'activate' signal on the action.
2187          STOCK-ID, LABEL, ACCELERATOR, TOOLTIP, and PROC may be '#f'.
2188
2189     Since 2.4
2190
2191 -- Function: gtk-action-group-add-toggle-actions
2192          (self '<gtk-action-group>') (entries 'scm')
2193 -- Method: add-toggle-actions
2194     This is a convenience function to create a number of toggle actions
2195     and add them to the action group.
2196
2197     The "activate" signals of the actions are connected to the
2198     callbacks and their accel paths are set to
2199     '<Actions>/GROUP-NAME/ACTION-NAME'.
2200
2201     ACTION-GROUP
2202          the action group
2203
2204     ENTRIES
2205          an array of toggle action descriptions
2206
2207     N-ENTRIES
2208          the number of entries
2209
2210     USER-DATA
2211          data to pass to the action callbacks
2212
2213     Since 2.4
2214
2215 -- Function: gtk-action-group-add-radio-actions
2216          (self '<gtk-action-group>') (entries 'scm') (value 'int')
2217          (on_change 'scm')
2218 -- Method: add-radio-actions
2219     This is a convenience routine to create a group of radio actions
2220     and add them to the action group.
2221
2222     The "changed" signal of the first radio action is connected to the
2223     ON-CHANGE callback and the accel paths of the actions are set to
2224     '<Actions>/GROUP-NAME/ACTION-NAME'.
2225
2226     ACTION-GROUP
2227          the action group
2228
2229     ENTRIES
2230          an array of radio action descriptions
2231
2232     N-ENTRIES
2233          the number of entries
2234
2235     VALUE
2236          the value of the action to activate initially, or -1 if no
2237          action should be activated
2238
2239     ON-CHANGE
2240          the callback to connect to the changed signal
2241
2242     USER-DATA
2243          data to pass to the action callbacks
2244
2245     Since 2.4
2246
2247 -- Function: gtk-action-group-translate-string
2248          (self '<gtk-action-group>') (string 'mchars') =>
2249          (ret 'mchars')
2250 -- Method: translate-string
2251     Translates a string using the specified 'translate-func'.  This is
2252     mainly intended for language bindings.
2253
2254     ACTION-GROUP
2255          a '<gtk-action-group>'
2256
2257     STRING
2258          a string
2259
2260     RET
2261          the translation of STRING
2262
2263     Since 2.6
2264
2265
2266File: guile-gnome-gtk.info,  Node: GtkAction,  Next: GtkToggleAction,  Prev: GtkActionGroup,  Up: Top
2267
226874 GtkAction
2269************
2270
2271An action which can be triggered by a menu or toolbar item
2272
227374.1 Overview
2274=============
2275
2276Actions represent operations that the user can be perform, along with
2277some information how it should be presented in the interface.  Each
2278action provides methods to create icons, menu items and toolbar items
2279representing itself.
2280
2281   As well as the callback that is called when the action gets
2282activated, the following also gets associated with the action: The
2283action will also have some state information:
2284
2285   a name (not translated, for path lookup)
2286
2287   a label (translated, for display)
2288
2289   an accelerator
2290
2291   whether label indicates a stock id
2292
2293   a tooltip (optional, translated)
2294
2295   a toolbar label (optional, shorter than label)
2296
2297   visible (shown/hidden)
2298
2299   sensitive (enabled/disabled)
2300
2301   Apart from regular actions, there are toggle actions, which can be
2302toggled between two states and radio actions, of which only one in a
2303group can be in the "active" state.  Other actions can be implemented as
2304'<gtk-action>' subclasses.
2305
2306   Each action can have one or more proxy menu item, toolbar button or
2307other proxy widgets.  Proxies mirror the state of the action (text
2308label, tooltip, icon, visible, sensitive, etc), and should change when
2309the action's state changes.  When the proxy is activated, it should
2310activate its action.
2311
231274.2 Usage
2313==========
2314
2315 -- Class: <gtk-action>
2316     Derives from '<gtk-buildable>', '<gobject>'.
2317
2318     This class defines the following slots:
2319
2320     'name'
2321          A unique name for the action.
2322
2323     'label'
2324          The label used for menu items and buttons that activate this
2325          action.
2326
2327     'short-label'
2328          A shorter label that may be used on toolbar buttons.
2329
2330     'tooltip'
2331          A tooltip for this action.
2332
2333     'stock-id'
2334          The stock icon displayed in widgets representing this action.
2335
2336     'icon-name'
2337          The name of the icon from the icon theme
2338
2339     'visible-horizontal'
2340          Whether the toolbar item is visible when the toolbar is in a
2341          horizontal orientation.
2342
2343     'visible-vertical'
2344          Whether the toolbar item is visible when the toolbar is in a
2345          vertical orientation.
2346
2347     'visible-overflown'
2348          When TRUE, toolitem proxies for this action are represented in
2349          the toolbar overflow menu.
2350
2351     'is-important'
2352          Whether the action is considered important.  When TRUE,
2353          toolitem proxies for this action show text in
2354          GTK_TOOLBAR_BOTH_HORIZ mode.
2355
2356     'hide-if-empty'
2357          When TRUE, empty menu proxies for this action are hidden.
2358
2359     'sensitive'
2360          Whether the action is enabled.
2361
2362     'visible'
2363          Whether the action is visible.
2364
2365     'action-group'
2366          The GtkActionGroup this GtkAction is associated with, or NULL
2367          (for internal use).
2368
2369 -- Signal on <gtk-action>: activate
2370     The "activate" signal is emitted when the action is activated.
2371
2372     Since 2.4
2373
2374 -- Function: gtk-action-new (name 'mchars') (label 'mchars')
2375          (tooltip 'mchars') (stock_id 'mchars') =>
2376          (ret '<gtk-action>')
2377     Creates a new '<gtk-action>' object.  To add the action to a
2378     '<gtk-action-group>' and set the accelerator for the action, call
2379     'gtk-action-group-add-action-with-accel'.  See _(the missing
2380     figure, XML-UI_ for information on allowed action names.
2381
2382     NAME
2383          A unique name for the action
2384
2385     LABEL
2386          the label displayed in menu items and on buttons
2387
2388     TOOLTIP
2389          a tooltip for the action
2390
2391     STOCK-ID
2392          the stock icon to display in widgets representing the action
2393
2394     RET
2395          a new '<gtk-action>'
2396
2397     Since 2.4
2398
2399 -- Function: gtk-action-get-name (self '<gtk-action>') =>
2400          (ret 'mchars')
2401 -- Method: get-name
2402     Returns the name of the action.
2403
2404     ACTION
2405          the action object
2406
2407     RET
2408          the name of the action.  The string belongs to GTK+ and should
2409          not be freed.
2410
2411     Since 2.4
2412
2413 -- Function: gtk-action-is-sensitive (self '<gtk-action>') =>
2414          (ret 'bool')
2415 -- Method: is-sensitive
2416     Returns whether the action is effectively sensitive.
2417
2418     ACTION
2419          the action object
2420
2421     RET
2422          ''#t'' if the action and its associated action group are both
2423          sensitive.
2424
2425     Since 2.4
2426
2427 -- Function: gtk-action-get-sensitive (self '<gtk-action>') =>
2428          (ret 'bool')
2429 -- Method: get-sensitive
2430     Returns whether the action itself is sensitive.  Note that this
2431     doesn't necessarily mean effective sensitivity.  See
2432     'gtk-action-is-sensitive' for that.
2433
2434     ACTION
2435          the action object
2436
2437     RET
2438          ''#t'' if the action itself is sensitive.
2439
2440     Since 2.4
2441
2442 -- Function: gtk-action-set-sensitive (self '<gtk-action>')
2443          (sensitive 'bool')
2444 -- Method: set-sensitive
2445     Sets the ::sensitive property of the action to SENSITIVE.  Note
2446     that this doesn't necessarily mean effective sensitivity.  See
2447     'gtk-action-is-sensitive' for that.
2448
2449     ACTION
2450          the action object
2451
2452     SENSITIVE
2453          ''#t'' to make the action sensitive
2454
2455     Since 2.6
2456
2457 -- Function: gtk-action-is-visible (self '<gtk-action>') =>
2458          (ret 'bool')
2459 -- Method: is-visible
2460     Returns whether the action is effectively visible.
2461
2462     ACTION
2463          the action object
2464
2465     RET
2466          ''#t'' if the action and its associated action group are both
2467          visible.
2468
2469     Since 2.4
2470
2471 -- Function: gtk-action-get-visible (self '<gtk-action>') =>
2472          (ret 'bool')
2473 -- Method: get-visible
2474     Returns whether the action itself is visible.  Note that this
2475     doesn't necessarily mean effective visibility.  See
2476     'gtk-action-is-sensitive' for that.
2477
2478     ACTION
2479          the action object
2480
2481     RET
2482          ''#t'' if the action itself is visible.
2483
2484     Since 2.4
2485
2486 -- Function: gtk-action-set-visible (self '<gtk-action>')
2487          (visible 'bool')
2488 -- Method: set-visible
2489     Sets the ::visible property of the action to VISIBLE.  Note that
2490     this doesn't necessarily mean effective visibility.  See
2491     'gtk-action-is-visible' for that.
2492
2493     ACTION
2494          the action object
2495
2496     VISIBLE
2497          ''#t'' to make the action visible
2498
2499     Since 2.6
2500
2501 -- Function: gtk-action-activate (self '<gtk-action>')
2502 -- Method: activate
2503     Emits the "activate" signal on the specified action, if it isn't
2504     insensitive.  This gets called by the proxy widgets when they get
2505     activated.
2506
2507     It can also be used to manually activate an action.
2508
2509     ACTION
2510          the action object
2511
2512     Since 2.4
2513
2514 -- Function: gtk-action-create-icon (self '<gtk-action>')
2515          (icon_size '<gtk-icon-size>') =>  (ret '<gtk-widget>')
2516 -- Method: create-icon
2517     This function is intended for use by action implementations to
2518     create icons displayed in the proxy widgets.
2519
2520     ACTION
2521          the action object
2522
2523     ICON-SIZE
2524          the size of the icon that should be created.
2525
2526     RET
2527          a widget that displays the icon for this action.
2528
2529     Since 2.4
2530
2531 -- Function: gtk-action-create-menu-item (self '<gtk-action>') =>
2532          (ret '<gtk-widget>')
2533 -- Method: create-menu-item
2534     Creates a menu item widget that proxies for the given action.
2535
2536     ACTION
2537          the action object
2538
2539     RET
2540          a menu item connected to the action.
2541
2542     Since 2.4
2543
2544 -- Function: gtk-action-create-tool-item (self '<gtk-action>') =>
2545          (ret '<gtk-widget>')
2546 -- Method: create-tool-item
2547     Creates a toolbar item widget that proxies for the given action.
2548
2549     ACTION
2550          the action object
2551
2552     RET
2553          a toolbar item connected to the action.
2554
2555     Since 2.4
2556
2557 -- Function: gtk-action-connect-proxy (self '<gtk-action>')
2558          (proxy '<gtk-widget>')
2559 -- Method: connect-proxy
2560     Connects a widget to an action object as a proxy.  Synchronises
2561     various properties of the action with the widget (such as label
2562     text, icon, tooltip, etc), and attaches a callback so that the
2563     action gets activated when the proxy widget does.
2564
2565     If the widget is already connected to an action, it is disconnected
2566     first.
2567
2568     ACTION
2569          the action object
2570
2571     PROXY
2572          the proxy widget
2573
2574     Since 2.4
2575
2576 -- Function: gtk-action-disconnect-proxy (self '<gtk-action>')
2577          (proxy '<gtk-widget>')
2578 -- Method: disconnect-proxy
2579     Disconnects a proxy widget from an action.  Does _not_ destroy the
2580     widget, however.
2581
2582     ACTION
2583          the action object
2584
2585     PROXY
2586          the proxy widget
2587
2588     Since 2.4
2589
2590 -- Function: gtk-action-get-proxies (self '<gtk-action>') =>
2591          (ret 'gslist-of')
2592 -- Method: get-proxies
2593     Returns the proxy widgets for an action.  See also
2594     'gtk-widget-get-action'.
2595
2596     ACTION
2597          the action object
2598
2599     RET
2600          a '<gs-list>' of proxy widgets.  The list is owned by GTK+ and
2601          must not be modified.
2602
2603     Since 2.4
2604
2605 -- Function: gtk-action-connect-accelerator (self '<gtk-action>')
2606 -- Method: connect-accelerator
2607     Installs the accelerator for ACTION if ACTION has an accel path and
2608     group.  See 'gtk-action-set-accel-path' and
2609     'gtk-action-set-accel-group'
2610
2611     Since multiple proxies may independently trigger the installation
2612     of the accelerator, the ACTION counts the number of times this
2613     function has been called and doesn't remove the accelerator until
2614     'gtk-action-disconnect-accelerator' has been called as many times.
2615
2616     ACTION
2617          a '<gtk-action>'
2618
2619     Since 2.4
2620
2621 -- Function: gtk-action-disconnect-accelerator (self '<gtk-action>')
2622 -- Method: disconnect-accelerator
2623     Undoes the effect of one call to 'gtk-action-connect-accelerator'.
2624
2625     ACTION
2626          a '<gtk-action>'
2627
2628     Since 2.4
2629
2630 -- Function: gtk-action-block-activate-from (self '<gtk-action>')
2631          (proxy '<gtk-widget>')
2632 -- Method: block-activate-from
2633     Disables calls to the 'gtk-action-activate' function by signals on
2634     the given proxy widget.  This is used to break notification loops
2635     for things like check or radio actions.
2636
2637     This function is intended for use by action implementations.
2638
2639     ACTION
2640          the action object
2641
2642     PROXY
2643          a proxy widget
2644
2645     Since 2.4
2646
2647 -- Function: gtk-action-unblock-activate-from (self '<gtk-action>')
2648          (proxy '<gtk-widget>')
2649 -- Method: unblock-activate-from
2650     Re-enables calls to the 'gtk-action-activate' function by signals
2651     on the given proxy widget.  This undoes the blocking done by
2652     'gtk-action-block-activate-from'.
2653
2654     This function is intended for use by action implementations.
2655
2656     ACTION
2657          the action object
2658
2659     PROXY
2660          a proxy widget
2661
2662     Since 2.4
2663
2664 -- Function: gtk-action-get-accel-path (self '<gtk-action>') =>
2665          (ret 'mchars')
2666 -- Method: get-accel-path
2667     Returns the accel path for this action.
2668
2669     ACTION
2670          the action object
2671
2672     RET
2673          the accel path for this action, or ''#f'' if none is set.  The
2674          returned string is owned by GTK+ and must not be freed or
2675          modified.
2676
2677     Since 2.6
2678
2679 -- Function: gtk-action-set-accel-path (self '<gtk-action>')
2680          (accel_path 'mchars')
2681 -- Method: set-accel-path
2682     Sets the accel path for this action.  All proxy widgets associated
2683     with the action will have this accel path, so that their
2684     accelerators are consistent.
2685
2686     ACTION
2687          the action object
2688
2689     ACCEL-PATH
2690          the accelerator path
2691
2692     Since 2.4
2693
2694 -- Function: gtk-action-get-accel-closure (self '<gtk-action>') =>
2695          (ret '<gclosure>')
2696 -- Method: get-accel-closure
2697     Returns the accel closure for this action.
2698
2699     ACTION
2700          the action object
2701
2702     RET
2703          the accel closure for this action.  The returned closure is
2704          owned by GTK+ and must not be unreffed or modified.
2705
2706     Since 2.8
2707
2708 -- Function: gtk-action-set-accel-group (self '<gtk-action>')
2709          (accel_group '<gtk-accel-group>')
2710 -- Method: set-accel-group
2711     Sets the '<gtk-accel-group>' in which the accelerator for this
2712     action will be installed.
2713
2714     ACTION
2715          the action object
2716
2717     ACCEL-GROUP
2718          a '<gtk-accel-group>' or ''#f''
2719
2720     Since 2.4
2721
2722
2723File: guile-gnome-gtk.info,  Node: GtkToggleAction,  Next: GtkRadioAction,  Prev: GtkAction,  Up: Top
2724
272575 GtkToggleAction
2726******************
2727
2728An action which can be toggled between two states
2729
273075.1 Overview
2731=============
2732
2733A '<gtk-toggle-action>' corresponds roughly to a
2734'<gtk-check-menu-item>'.  It has an "active" state specifying whether
2735the action has been checked or not.
2736
273775.2 Usage
2738==========
2739
2740 -- Class: <gtk-toggle-action>
2741     Derives from '<gtk-action>'.
2742
2743     This class defines the following slots:
2744
2745     'draw-as-radio'
2746          Whether the proxies for this action look like radio action
2747          proxies
2748
2749     'active'
2750          If the toggle action should be active in or not
2751
2752 -- Signal on <gtk-toggle-action>: toggled
2753
2754 -- Function: gtk-toggle-action-new (name 'mchars') (label 'mchars')
2755          (tooltip 'mchars') (stock_id 'mchars') =>
2756          (ret '<gtk-toggle-action>')
2757     Creates a new '<gtk-toggle-action>' object.  To add the action to a
2758     '<gtk-action-group>' and set the accelerator for the action, call
2759     'gtk-action-group-add-action-with-accel'.
2760
2761     NAME
2762          A unique name for the action
2763
2764     LABEL
2765          The label displayed in menu items and on buttons
2766
2767     TOOLTIP
2768          A tooltip for the action
2769
2770     STOCK-ID
2771          The stock icon to display in widgets representing the action
2772
2773     RET
2774          a new '<gtk-toggle-action>'
2775
2776     Since 2.4
2777
2778 -- Function: gtk-toggle-action-toggled (self '<gtk-toggle-action>')
2779 -- Method: toggled
2780     Emits the "toggled" signal on the toggle action.
2781
2782     ACTION
2783          the action object
2784
2785     Since 2.4
2786
2787 -- Function: gtk-toggle-action-set-active (self '<gtk-toggle-action>')
2788          (is_active 'bool')
2789 -- Method: set-active
2790     Sets the checked state on the toggle action.
2791
2792     ACTION
2793          the action object
2794
2795     IS-ACTIVE
2796          whether the action should be checked or not
2797
2798     Since 2.4
2799
2800 -- Function: gtk-toggle-action-get-active (self '<gtk-toggle-action>')
2801          =>  (ret 'bool')
2802 -- Method: get-active
2803     Returns the checked state of the toggle action.
2804
2805     ACTION
2806          the action object
2807
2808     RET
2809          the checked state of the toggle action
2810
2811     Since 2.4
2812
2813 -- Function: gtk-toggle-action-set-draw-as-radio
2814          (self '<gtk-toggle-action>') (draw_as_radio 'bool')
2815 -- Method: set-draw-as-radio
2816     Sets whether the action should have proxies like a radio action.
2817
2818     ACTION
2819          the action object
2820
2821     DRAW-AS-RADIO
2822          whether the action should have proxies like a radio action
2823
2824     Since 2.4
2825
2826 -- Function: gtk-toggle-action-get-draw-as-radio
2827          (self '<gtk-toggle-action>') =>  (ret 'bool')
2828 -- Method: get-draw-as-radio
2829     Returns whether the action should have proxies like a radio action.
2830
2831     ACTION
2832          the action object
2833
2834     RET
2835          whether the action should have proxies like a radio action.
2836
2837     Since 2.4
2838
2839
2840File: guile-gnome-gtk.info,  Node: GtkRadioAction,  Next: GtkColorButton,  Prev: GtkToggleAction,  Up: Top
2841
284276 GtkRadioAction
2843*****************
2844
2845An action of which only one in a group can be active
2846
284776.1 Overview
2848=============
2849
2850A '<gtk-radio-action>' is similar to '<gtk-radio-menu-item>'.  A number
2851of radio actions can be linked together so that only one may be active
2852at any one time.
2853
285476.2 Usage
2855==========
2856
2857 -- Class: <gtk-radio-action>
2858     Derives from '<gtk-toggle-action>'.
2859
2860     This class defines the following slots:
2861
2862     'value'
2863          The value returned by gtk_radio_action_get_current_value()
2864          when this action is the current action of its group.
2865
2866     'group'
2867          The radio action whose group this action belongs to.
2868
2869     'current-value'
2870          The value property of the currently active member of the group
2871          to which this action belongs.
2872
2873 -- Signal on <gtk-radio-action>: changed (arg0 '<gtk-radio-action>')
2874     The ::changed signal is emitted on every member of a radio group
2875     when the active member is changed.  The signal gets emitted after
2876     the ::activate signals for the previous and current active members.
2877
2878     Since 2.4
2879
2880 -- Function: gtk-radio-action-new (name 'mchars') (label 'mchars')
2881          (tooltip 'mchars') (stock_id 'mchars') (value 'int') =>
2882          (ret '<gtk-radio-action>')
2883     Creates a new '<gtk-radio-action>' object.  To add the action to a
2884     '<gtk-action-group>' and set the accelerator for the action, call
2885     'gtk-action-group-add-action-with-accel'.
2886
2887     NAME
2888          A unique name for the action
2889
2890     LABEL
2891          The label displayed in menu items and on buttons
2892
2893     TOOLTIP
2894          A tooltip for this action
2895
2896     STOCK-ID
2897          The stock icon to display in widgets representing this action
2898
2899     VALUE
2900          The value which 'gtk-radio-action-get-current-value' should
2901          return if this action is selected.
2902
2903     RET
2904          a new '<gtk-radio-action>'
2905
2906     Since 2.4
2907
2908 -- Function: gtk-radio-action-get-group (self '<gtk-radio-action>') =>
2909          (ret '<gtk-radio-group*>')
2910 -- Method: get-group
2911     Returns the list representing the radio group for this object.
2912     Note that the returned list is only valid until the next change to
2913     the group.
2914
2915     A common way to set up a group of radio group is the following:
2916
2917
2918            GSList *group = NULL;
2919            GtkRadioAction *action;
2920
2921            while (/* more actions to add */)
2922              {
2923                 action = gtk_radio_action_new (...);
2924
2925                 gtk_radio_action_set_group (action, group);
2926                 group = gtk_radio_action_get_group (action);
2927              }
2928
2929     ACTION
2930          the action object
2931
2932     RET
2933          the list representing the radio group for this object
2934
2935     Since 2.4
2936
2937 -- Function: gtk-radio-action-set-group (self '<gtk-radio-action>')
2938          (group '<gtk-radio-group*>')
2939 -- Method: set-group
2940     Sets the radio group for the radio action object.
2941
2942     ACTION
2943          the action object
2944
2945     GROUP
2946          a list representing a radio group
2947
2948     Since 2.4
2949
2950 -- Function: gtk-radio-action-get-current-value
2951          (self '<gtk-radio-action>') =>  (ret 'int')
2952 -- Method: get-current-value
2953     Obtains the value property of the currently active member of the
2954     group to which ACTION belongs.
2955
2956     ACTION
2957          a '<gtk-radio-action>'
2958
2959     RET
2960          The value of the currently active group member
2961
2962     Since 2.4
2963
2964 -- Function: gtk-radio-action-set-current-value
2965          (self '<gtk-radio-action>') (current_value 'int')
2966 -- Method: set-current-value
2967     Sets the currently active group member to the member with value
2968     property CURRENT-VALUE.
2969
2970     ACTION
2971          a '<gtk-radio-action>'
2972
2973     CURRENT-VALUE
2974          the new value
2975
2976     Since 2.10
2977
2978
2979File: guile-gnome-gtk.info,  Node: GtkColorButton,  Next: GtkColorSelection,  Prev: GtkRadioAction,  Up: Top
2980
298177 GtkColorButton
2982*****************
2983
2984A button to launch a color selection dialog
2985
298677.1 Overview
2987=============
2988
2989The '<gtk-color-button>' is a button which displays the currently
2990selected color an allows to open a color selection dialog to change the
2991color.  It is suitable widget for selecting a color in a preference
2992dialog.
2993
299477.2 Usage
2995==========
2996
2997 -- Class: <gtk-color-button>
2998     Derives from '<gtk-button>'.
2999
3000     This class defines the following slots:
3001
3002     'use-alpha'
3003          Whether or not to give the color an alpha value
3004
3005     'title'
3006          The title of the color selection dialog
3007
3008     'color'
3009          The selected color
3010
3011     'alpha'
3012          The selected opacity value (0 fully transparent, 65535 fully
3013          opaque)
3014
3015 -- Signal on <gtk-color-button>: color-set
3016     The ::color-set signal is emitted when the user selects a color.
3017     When handling this signal, use 'gtk-color-button-get-color' and
3018     'gtk-color-button-get-alpha' to find out which color was just
3019     selected.
3020
3021     Note that this signal is only emitted when the _user_ changes the
3022     color.  If you need to react to programmatic color changes as well,
3023     use the notify::color signal.
3024
3025     Since 2.4
3026
3027 -- Function: gtk-color-button-new =>  (ret '<gtk-widget>')
3028     Creates a new color button.  This returns a widget in the form of a
3029     small button containing a swatch representing the current selected
3030     color.  When the button is clicked, a color-selection dialog will
3031     open, allowing the user to select a color.  The swatch will be
3032     updated to reflect the new color when the user finishes.
3033
3034     RET
3035          a new color button.
3036
3037     Since 2.4
3038
3039 -- Function: gtk-color-button-new-with-color (color '<gdk-color>') =>
3040          (ret '<gtk-widget>')
3041     Creates a new color button.
3042
3043     COLOR
3044          A '<gdk-color>' to set the current color with.
3045
3046     RET
3047          a new color button.
3048
3049     Since 2.4
3050
3051 -- Function: gtk-color-button-set-color (self '<gtk-color-button>')
3052          (color '<gdk-color>')
3053 -- Method: set-color
3054     Sets the current color to be COLOR.
3055
3056     COLOR-BUTTON
3057          a '<gtk-color-button>'.
3058
3059     COLOR
3060          A '<gdk-color>' to set the current color with.
3061
3062     Since 2.4
3063
3064 -- Function: gtk-color-button-get-color (self '<gtk-color-button>')
3065          (color '<gdk-color>')
3066 -- Method: get-color
3067     Sets COLOR to be the current color in the '<gtk-color-button>'
3068     widget.
3069
3070     COLOR-BUTTON
3071          a '<gtk-color-button>'.
3072
3073     COLOR
3074          a '<gdk-color>' to fill in with the current color.
3075
3076     Since 2.4
3077
3078 -- Function: gtk-color-button-set-alpha (self '<gtk-color-button>')
3079          (alpha 'unsigned-int16')
3080 -- Method: set-alpha
3081     Sets the current opacity to be ALPHA.
3082
3083     COLOR-BUTTON
3084          a '<gtk-color-button>'.
3085
3086     ALPHA
3087          an integer between 0 and 65535.
3088
3089     Since 2.4
3090
3091 -- Function: gtk-color-button-get-alpha (self '<gtk-color-button>') =>
3092          (ret 'unsigned-int16')
3093 -- Method: get-alpha
3094     Returns the current alpha value.
3095
3096     COLOR-BUTTON
3097          a '<gtk-color-button>'.
3098
3099     RET
3100          an integer between 0 and 65535.
3101
3102     Since 2.4
3103
3104 -- Function: gtk-color-button-set-use-alpha (self '<gtk-color-button>')
3105          (use_alpha 'bool')
3106 -- Method: set-use-alpha
3107     Sets whether or not the color button should use the alpha channel.
3108
3109     COLOR-BUTTON
3110          a '<gtk-color-button>'.
3111
3112     USE-ALPHA
3113          ''#t'' if color button should use alpha channel, ''#f'' if
3114          not.
3115
3116     Since 2.4
3117
3118 -- Function: gtk-color-button-get-use-alpha (self '<gtk-color-button>')
3119          =>  (ret 'bool')
3120 -- Method: get-use-alpha
3121     Does the color selection dialog use the alpha channel?
3122
3123     COLOR-BUTTON
3124          a '<gtk-color-button>'.
3125
3126     RET
3127          ''#t'' if the color sample uses alpha channel, ''#f'' if not.
3128
3129     Since 2.4
3130
3131 -- Function: gtk-color-button-set-title (self '<gtk-color-button>')
3132          (title 'mchars')
3133 -- Method: set-title
3134     Sets the title for the color selection dialog.
3135
3136     COLOR-BUTTON
3137          a '<gtk-color-button>'
3138
3139     TITLE
3140          String containing new window title.
3141
3142     Since 2.4
3143
3144 -- Function: gtk-color-button-get-title (self '<gtk-color-button>') =>
3145          (ret 'mchars')
3146 -- Method: get-title
3147     Gets the title of the color selection dialog.
3148
3149     COLOR-BUTTON
3150          a '<gtk-color-button>'
3151
3152     RET
3153          An internal string, do not free the return value
3154
3155     Since 2.4
3156
3157
3158File: guile-gnome-gtk.info,  Node: GtkColorSelection,  Next: GtkColorSelectionDialog,  Prev: GtkColorButton,  Up: Top
3159
316078 GtkColorSelection
3161********************
3162
3163A widget used to select a color
3164
316578.1 Overview
3166=============
3167
3168The '<gtk-color-selection>' is a widget that is used to select a color.
3169It consists of a color wheel and number of sliders and entry boxes for
3170color parameters such as hue, saturation, value, red, green, blue, and
3171opacity.  It is found on the standard color selection dialog box
3172'<gtk-color-selection-dialog>'.
3173
317478.2 Usage
3175==========
3176
3177 -- Class: <gtk-color-selection>
3178     Derives from '<gtk-vbox>'.
3179
3180     This class defines the following slots:
3181
3182     'has-palette'
3183          Whether a palette should be used
3184
3185     'has-opacity-control'
3186          Whether the color selector should allow setting opacity
3187
3188     'current-color'
3189          The current color
3190
3191     'current-alpha'
3192          The current opacity value (0 fully transparent, 65535 fully
3193          opaque)
3194
3195 -- Signal on <gtk-color-selection>: color-changed
3196     This signal is emitted when the color changes in the
3197     '<gtk-color-selection>' according to its update policy.
3198
3199 -- Function: gtk-color-selection-new =>  (ret '<gtk-widget>')
3200     Creates a new GtkColorSelection.
3201
3202     RET
3203          a new '<gtk-color-selection>'
3204
3205 -- Function: gtk-color-selection-set-has-palette
3206          (self '<gtk-color-selection>') (has_palette 'bool')
3207 -- Method: set-has-palette
3208     Shows and hides the palette based upon the value of HAS-PALETTE.
3209
3210     COLORSEL
3211          a '<gtk-color-selection>'.
3212
3213     HAS-PALETTE
3214          ''#t'' if palette is to be visible, ''#f'' otherwise.
3215
3216 -- Function: gtk-color-selection-get-has-palette
3217          (self '<gtk-color-selection>') =>  (ret 'bool')
3218 -- Method: get-has-palette
3219     Determines whether the color selector has a color palette.
3220
3221     COLORSEL
3222          a '<gtk-color-selection>'.
3223
3224     RET
3225          ''#t'' if the selector has a palette.  ''#f'' if it hasn't.
3226
3227 -- Function: gtk-color-selection-is-adjusting
3228          (self '<gtk-color-selection>') =>  (ret 'bool')
3229 -- Method: is-adjusting
3230     Gets the current state of the COLORSEL.
3231
3232     COLORSEL
3233          a '<gtk-color-selection>'.
3234
3235     RET
3236          ''#t'' if the user is currently dragging a color around, and
3237          ''#f'' if the selection has stopped.
3238
3239
3240File: guile-gnome-gtk.info,  Node: GtkColorSelectionDialog,  Next: GtkFileSelection,  Prev: GtkColorSelection,  Up: Top
3241
324279 GtkColorSelectionDialog
3243**************************
3244
3245A standard dialog box for selecting a color
3246
324779.1 Overview
3248=============
3249
3250The '<gtk-color-selection-dialog>' provides a standard dialog which
3251allows the user to select a color much like the '<gtk-file-selection>'
3252provides a standard dialog for file selection.
3253
325479.2 Usage
3255==========
3256
3257 -- Class: <gtk-color-selection-dialog>
3258     Derives from '<gtk-dialog>'.
3259
3260     This class defines no direct slots.
3261
3262 -- Function: gtk-color-selection-dialog-new (title 'mchars') =>
3263          (ret '<gtk-widget>')
3264     Creates a new '<gtk-color-selection-dialog>'.
3265
3266     TITLE
3267          a string containing the title text for the dialog.
3268
3269     RET
3270          a '<gtk-color-selection-dialog>'.
3271
3272
3273File: guile-gnome-gtk.info,  Node: GtkFileSelection,  Next: GtkFileChooser,  Prev: GtkColorSelectionDialog,  Up: Top
3274
327580 GtkFileSelection
3276*******************
3277
3278Prompt the user for a file or directory name
3279
328080.1 Overview
3281=============
3282
3283'<gtk-file-selection>' should be used to retrieve file or directory
3284names from the user.  It will create a new dialog window containing a
3285directory list, and a file list corresponding to the current working
3286directory.  The filesystem can be navigated using the directory list or
3287the drop-down history menu.  Alternatively, the TAB key can be used to
3288navigate using filename completion - common in text based editors such
3289as emacs and jed.
3290
3291   File selection dialogs are created with a call to
3292'gtk-file-selection-new'.
3293
3294   The default filename can be set using
3295'gtk-file-selection-set-filename' and the selected filename retrieved
3296using 'gtk-file-selection-get-filename'.
3297
3298   Use 'gtk-file-selection-complete' to display files and directories
3299that match a given pattern.  This can be used for example, to show only
3300*.txt files, or only files beginning with gtk*.
3301
3302   Simple file operations; create directory, delete file, and rename
3303file, are available from buttons at the top of the dialog.  These can be
3304hidden using 'gtk-file-selection-hide-fileop-buttons' and shown again
3305using 'gtk-file-selection-show-fileop-buttons'.
3306
3307
3308
3309     /* The file selection widget and the string to store the chosen filename */
3310
3311     void store_filename (GtkWidget *widget, gpointer user_data) {
3312        GtkWidget *file_selector = GTK_WIDGET (user_data);
3313        const gchar *selected_filename;
3314
3315        selected_filename = gtk_file_selection_get_filename (GTK_FILE_SELECTION (file_selector));
3316        g_print ("Selected filename: %s\n", selected_filename);
3317     }
3318
3319     void create_file_selection (void) {
3320
3321        GtkWidget *file_selector;
3322
3323        /* Create the selector */
3324
3325        file_selector = gtk_file_selection_new ("Please select a file for editing.");
3326
3327        g_signal_connect (GTK_FILE_SELECTION (file_selector)->ok_button,
3328                          "clicked",
3329                          G_CALLBACK (store_filename),
3330                          file_selector);
3331
3332        /* Ensure that the dialog box is destroyed when the user clicks a button. */
3333
3334        g_signal_connect_swapped (GTK_FILE_SELECTION (file_selector)->ok_button,
3335                                  "clicked",
3336                                  G_CALLBACK (gtk_widget_destroy),
3337                                  file_selector);
3338
3339        g_signal_connect_swapped (GTK_FILE_SELECTION (file_selector)->cancel_button,
3340                                  "clicked",
3341                                  G_CALLBACK (gtk_widget_destroy),
3342                                  file_selector);
3343
3344        /* Display that dialog */
3345
3346        gtk_widget_show (file_selector);
3347     }
3348
3349
335080.2 Usage
3351==========
3352
3353 -- Class: <gtk-file-selection>
3354     Derives from '<gtk-dialog>'.
3355
3356     This class defines the following slots:
3357
3358     'show-fileops'
3359          Whether buttons for creating/manipulating files should be
3360          displayed
3361
3362     'filename'
3363          The currently selected filename
3364
3365     'select-multiple'
3366          Whether to allow multiple files to be selected
3367
3368 -- Function: gtk-file-selection-new (title 'mchars') =>
3369          (ret '<gtk-widget>')
3370     Creates a new file selection dialog box.  By default it will
3371     contain a '<gtk-tree-view>' of the application's current working
3372     directory, and a file listing.  Operation buttons that allow the
3373     user to create a directory, delete files and rename files, are also
3374     present.
3375
3376     TITLE
3377          a message that will be placed in the file requestor's
3378          titlebar.
3379
3380     RET
3381          the new file selection.
3382
3383 -- Function: gtk-file-selection-set-filename
3384          (self '<gtk-file-selection>') (filename 'mchars')
3385 -- Method: set-filename
3386     Sets a default path for the file requestor.  If FILENAME includes a
3387     directory path, then the requestor will open with that path as its
3388     current working directory.
3389
3390     This has the consequence that in order to open the requestor with a
3391     working directory and an empty filename, FILENAME must have a
3392     trailing directory separator.
3393
3394     The encoding of FILENAME is preferred GLib file name encoding,
3395     which may not be UTF-8.  See 'g-filename-from-utf8'.
3396
3397     FILESEL
3398          a '<gtk-file-selection>'.
3399
3400     FILENAME
3401          a string to set as the default file name.
3402
3403 -- Function: gtk-file-selection-get-filename
3404          (self '<gtk-file-selection>') =>  (ret 'mchars')
3405 -- Method: get-filename
3406     This function returns the selected filename in the GLib file name
3407     encoding.  To convert to UTF-8, call 'g-filename-to-utf8'.  The
3408     returned string points to a statically allocated buffer and should
3409     be copied if you plan to keep it around.
3410
3411     If no file is selected then the selected directory path is
3412     returned.
3413
3414     FILESEL
3415          a '<gtk-file-selection>'
3416
3417     RET
3418          currently-selected filename in the on-disk encoding.
3419
3420 -- Function: gtk-file-selection-complete (self '<gtk-file-selection>')
3421          (pattern 'mchars')
3422 -- Method: complete
3423     Will attempt to match PATTERN to a valid filenames or
3424     subdirectories in the current directory.  If a match can be made,
3425     the matched filename will appear in the text entry field of the
3426     file selection dialog.  If a partial match can be made, the "Files"
3427     list will contain those file names which have been partially
3428     matched, and the "Folders" list those directories which have been
3429     partially matched.
3430
3431     FILESEL
3432          a '<gtk-file-selection>'.
3433
3434     PATTERN
3435          a string of characters which may or may not match any
3436          filenames in the current directory.
3437
3438
3439File: guile-gnome-gtk.info,  Node: GtkFileChooser,  Next: GtkFileChooserButton,  Prev: GtkFileSelection,  Up: Top
3440
344181 GtkFileChooser
3442*****************
3443
3444File chooser interface used by GtkFileChooserWidget and
3445GtkFileChooserDialog
3446
344781.1 Overview
3448=============
3449
3450'<gtk-file-chooser>' is an interface that can be implemented by file
3451selection widgets.  In GTK+, the main objects that implement this
3452interface are '<gtk-file-chooser-widget>', '<gtk-file-chooser-dialog>',
3453and '<gtk-file-chooser-button>'.  You do not need to write an object
3454that implements the '<gtk-file-chooser>' interface unless you are trying
3455to adapt an existing file selector to expose a standard programming
3456interface.
3457
3458   '<gtk-file-chooser>' allows for shortcuts to various places in the
3459filesystem.  In the default implementation these are displayed in the
3460left pane.  It may be a bit confusing at first taht these shortcuts come
3461from various sources and in various flavours, so lets explain the
3462terminology here:
3463
3464SHORTCUTS
3465
3466VOLUMES
3467
3468   are created by the user, by dragging folders from the right pane to
3469the left pane, or by using the "Add".  Bookmarks can be renamed and
3470deleted by the user.
3471
3472   can be provided by the application or by the underlying filesystem
3473abstraction (e.g.  both the gnome-vfs and the Windows filesystems
3474provide "Desktop" shortcuts).  Shortcuts cannot be modified by the user.
3475
3476   are provided by the underlying filesystem abstraction.  They are the
3477"roots" of the filesystem.
3478
347981.2 File Names and Encodings
3480=============================
3481
3482When the user is finished selecting files in a '<gtk-file-chooser>',
3483your program can get the selected names either as filenames or as URIs.
3484For URIs, the normal escaping rules are applied if the URI contains
3485non-ASCII characters.  However, filenames are _always_ returned in the
3486character set specified by the 'G_FILENAME_ENCODING' environment
3487variable.  Please see the Glib documentation for more details about this
3488variable.
3489
3490   This means that while you can pass the result of
3491'gtk-file-chooser-get-filename' to 'open(2)' or 'fopen(3)', you may not
3492be able to directly set it as the text of a '<gtk-label>' widget unless
3493you convert it first to UTF-8, which all GTK+ widgets expect.  You
3494should use 'g-filename-to-utf8' to convert filenames into strings that
3495can be passed to GTK+ widgets.
3496
349781.3 Adding a Preview Widget
3498============================
3499
3500You can add a custom preview widget to a file chooser and then get
3501notification about when the preview needs to be updated.  To install a
3502preview widget, use 'gtk-file-chooser-set-preview-widget'.  Then,
3503connect to the '<gtk-file-chooser::update-preview>' signal to get
3504notified when you need to update the contents of the preview.
3505
3506   Your callback should use 'gtk-file-chooser-get-preview-filename' to
3507see what needs previewing.  Once you have generated the preview for the
3508corresponding file, you must call
3509'gtk-file-chooser-set-preview-widget-active' with a boolean flag that
3510indicates whether your callback could successfully generate a preview.
3511
3512
3513     {
3514       GtkImage *preview;
3515
3516       ...
3517
3518       preview = gtk_image_new ();
3519
3520       gtk_file_chooser_set_preview_widget (my_file_chooser, preview);
3521       g_signal_connect (my_file_chooser, "update-preview",
3522     		    G_CALLBACK (update_preview_cb), preview);
3523     }
3524
3525     static void
3526     update_preview_cb (GtkFileChooser *file_chooser, gpointer data)
3527     {
3528       GtkWidget *preview;
3529       char *filename;
3530       GdkPixbuf *pixbuf;
3531       gboolean have_preview;
3532
3533       preview = GTK_WIDGET (data);
3534       filename = gtk_file_chooser_get_preview_filename (file_chooser);
3535
3536       pixbuf = gdk_pixbuf_new_from_file_at_size (filename, 128, 128, NULL);
3537       have_preview = (pixbuf != NULL);
3538       g_free (filename);
3539
3540       gtk_image_set_from_pixbuf (GTK_IMAGE (preview), pixbuf);
3541       if (pixbuf)
3542         gobject_unref (pixbuf);
3543
3544       gtk_file_chooser_set_preview_widget_active (file_chooser, have_preview);
3545     }
3546
3547
354881.4 Adding Extra Widgets
3549=========================
3550
3551You can add extra widgets to a file chooser to provide options that are
3552not present in the default design.  For example, you can add a toggle
3553button to give the user the option to open a file in read-only mode.
3554You can use 'gtk-file-chooser-set-extra-widget' to insert additional
3555widgets in a file chooser.
3556
3557
3558     {
3559       GtkWidget *toggle;
3560
3561       ...
3562
3563       toggle = gtk_check_button_new_with_label ("Open file read-only");
3564       gtk_widget_show (toggle);
3565       gtk_file_chooser_set_extra_widget (my_file_chooser, toggle);
3566     }
3567
3568
3569   If you want to set more than one extra widget in the file chooser,
3570you can a container such as a GtkVBox or a GtkTable and include your
3571widgets in it.  Then, set the container as the whole extra widget.
3572
357381.5 Key Bindings
3574=================
3575
3576Internally, GTK+ implements a file chooser's graphical user interface
3577with the private .  This widget has several key bindings and their
3578associated signals.  This section describes the available key binding
3579signals.
3580
3581   The default keys that activate the key-binding signals in are as
3582follows:
3583
3584   Both the individual key and the numeric keypad's "divide" key are
3585supported.
3586
3587   Both the individual Up key and the numeric keypad's Up key are
3588supported.
3589
3590   You can change these defaults to something else.  For example, to add
3591a modifier to a few of the default bindings, you can include the
3592following fragment in your '.gtkrc-2.0' file:
3593
3594
3595     binding "my-own-gtkfilechooser-bindings" {
3596     	bind "<Alt><Shift>Up" {
3597     		"up-folder" ()
3598	     }
3599     	bind "<Alt><Shift>Down" {
3600     		"down-folder" ()
3601	     }
3602     	bind "<Alt><Shift>Home" {
3603     		"home-folder" ()
3604	     }
3605     }
3606
3607     class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings"
3608
3609
361081.5.1 The "GtkFileChooserDefault::location-popup" signal
3611---------------------------------------------------------
3612
3613
3614               void user_function (GtkFileChooserDefault *chooser,
3615                                   const char            *path,
3616                                   gpointer user_data);
3617
3618
3619   This is used to make the file chooser show a "Location" dialog which
3620the user can use to manually type the name of the file he wishes to
3621select.  The PATH argument is a string that gets put in the text entry
3622for the file name.  By default this is bound to with a PATH string of ""
3623(the empty string).  It is also bound to with a PATH string of "'/'" (a
3624slash): this lets you type and immediately type a path name.  On Unix
3625systems, this is bound to (tilde) with a PATH string of "~" itself for
3626access to home directories.
3627
3628CHOOSER
3629     the object which received the signal.
3630
3631PATH
3632     default contents for the text entry for the file name
3633
3634USER-DATA
3635     user data set when the signal handler was connected.
3636
3637   You can create your own bindings for the signal with custom PATH
3638strings, and have a crude form of easily-to-type bookmarks.  For
3639example, say you access the path '/home/username/misc' very frequently.
3640You could then create an shortcut by including the following in your
3641'.gtkrc-2.0':
3642
3643
3644     binding "misc-shortcut" {
3645     	bind "<Alt>M" {
3646     		"location-popup" ("/home/username/misc")
3647	     }
3648     }
3649
3650     class "GtkFileChooserDefault" binding "misc-shortcut"
3651
3652
365381.5.2 The "GtkFileChooserDefault::up-folder" signal
3654----------------------------------------------------
3655
3656
3657               void user_function (GtkFileChooserDefault *chooser,
3658                                   gpointer user_data);
3659
3660
3661   This is used to make the file chooser go to the parent of the current
3662folder in the file hierarchy.  By default this is bound to and (the Up
3663key in the numeric keypad also works).
3664
3665CHOOSER
3666     the object which received the signal.
3667
3668USER-DATA
3669     user data set when the signal handler was connected.
3670
367181.5.3 The "GtkFileChooserDefault::down-folder" signal
3672------------------------------------------------------
3673
3674
3675               void user_function (GtkFileChooserDefault *chooser,
3676                                   gpointer user_data);
3677
3678
3679   This is used to make the file chooser go to a child of the current
3680folder in the file hierarchy.  The subfolder that will be used is
3681displayed in the path bar widget of the file chooser.  For example, if
3682the path bar is showing "/foo/_bar/_baz", then this will cause the file
3683chooser to switch to the "baz" subfolder.  By default this is bound to
3684(the Down key in the numeric keypad also works).
3685
3686CHOOSER
3687     the object which received the signal.
3688
3689USER-DATA
3690     user data set when the signal handler was connected.
3691
369281.5.4 The "GtkFileChooserDefault::home-folder" signal
3693------------------------------------------------------
3694
3695
3696               void user_function (GtkFileChooserDefault *chooser,
3697                                   gpointer user_data);
3698
3699
3700   This is used to make the file chooser show the user's home folder in
3701the file list.  By default this is bound to (the Home key in the numeric
3702keypad also works).
3703
3704CHOOSER
3705     the object which received the signal.
3706
3707USER-DATA
3708     user data set when the signal handler was connected.
3709
371081.5.5 The "GtkFileChooserDefault::desktop-folder" signal
3711---------------------------------------------------------
3712
3713
3714               void user_function (GtkFileChooserDefault *chooser,
3715                                   gpointer user_data);
3716
3717
3718   This is used to make the file chooser show the user's Desktop folder
3719in the file list.  By default this is bound to .
3720
3721CHOOSER
3722     the object which received the signal.
3723
3724USER-DATA
3725     user data set when the signal handler was connected.
3726
372781.5.6 The "GtkFileChooserDefault::quick-bookmark" signal
3728---------------------------------------------------------
3729
3730
3731               void user_function (GtkFileChooserDefault *chooser,
3732                                   gint bookmark_index,
3733                                   gpointer user_data);
3734
3735
3736   This is used to make the file chooser switch to the bookmark
3737specified in the BOOKMARK-INDEX parameter.  For example, if you have
3738three bookmarks, you can pass 0, 1, 2 to this signal to switch to each
3739of them, respectively.  By default this is bound to , , etc.  until .
3740Note that in the default binding, that is actually defined to switch to
3741the bookmark at index 0, and so on successively; is defined to switch to
3742the bookmark at index 10.
3743
3744CHOOSER
3745     the object which received the signal.
3746
3747BOOKMARK-INDES
3748     index of the bookmark to switch to; the indices start at 0.
3749
3750USER-DATA
3751     user data set when the signal handler was connected.
3752
375381.6 Usage
3754==========
3755
3756 -- Class: <gtk-file-chooser>
3757     Derives from '<ginterface>'.
3758
3759     This class defines the following slots:
3760
3761     'filter'
3762          The current filter for selecting which files are displayed
3763
3764     'local-only'
3765          Whether the selected file(s) should be limited to local file:
3766          URLs
3767
3768     'use-preview-label'
3769          Whether to display a stock label with the name of the
3770          previewed file.
3771
3772     'preview-widget-active'
3773          Whether the application supplied widget for custom previews
3774          should be shown.
3775
3776     'preview-widget'
3777          Application supplied widget for custom previews.
3778
3779     'show-hidden'
3780          Whether the hidden files and folders should be displayed
3781
3782     'do-overwrite-confirmation'
3783          Whether a file chooser in save mode will present an overwrite
3784          confirmation dialog if necessary.
3785
3786     'extra-widget'
3787          Application supplied widget for extra options.
3788
3789     'file-system-backend'
3790          Name of file system backend to use
3791
3792     'action'
3793          The type of operation that the file selector is performing
3794
3795     'select-multiple'
3796          Whether to allow multiple files to be selected
3797
3798 -- Signal on <gtk-file-chooser>: current-folder-changed
3799     This signal is emitted when the current folder in a
3800     '<gtk-file-chooser>' changes.  This can happen due to the user
3801     performing some action that changes folders, such as selecting a
3802     bookmark or visiting a folder on the file list.  It can also happen
3803     as a result of calling a function to explicitly change the current
3804     folder in a file chooser.
3805
3806     Normally you do not need to connect to this signal, unless you need
3807     to keep track of which folder a file chooser is showing.
3808
3809     See also: 'gtk-file-chooser-set-current-folder',
3810     'gtk-file-chooser-get-current-folder',
3811     'gtk-file-chooser-set-current-folder-uri',
3812     'gtk-file-chooser-get-current-folder-uri'.
3813
3814 -- Signal on <gtk-file-chooser>: selection-changed
3815     This signal is emitted when there is a change in the set of
3816     selected files in a '<gtk-file-chooser>'.  This can happen when the
3817     user modifies the selection with the mouse or the keyboard, or when
3818     explicitly calling functions to change the selection.
3819
3820     Normally you do not need to connect to this signal, as it is easier
3821     to wait for the file chooser to finish running, and then to get the
3822     list of selected files using the functions mentioned below.
3823
3824     See also: 'gtk-file-chooser-select-filename',
3825     'gtk-file-chooser-unselect-filename',
3826     'gtk-file-chooser-get-filename', 'gtk-file-chooser-get-filenames',
3827     'gtk-file-chooser-select-uri', 'gtk-file-chooser-unselect-uri',
3828     'gtk-file-chooser-get-uri', 'gtk-file-chooser-get-uris'.
3829
3830 -- Signal on <gtk-file-chooser>: update-preview
3831     This signal is emitted when the preview in a file chooser should be
3832     regenerated.  For example, this can happen when the currently
3833     selected file changes.  You should use this signal if you want your
3834     file chooser to have a preview widget.
3835
3836     Once you have installed a preview widget with
3837     'gtk-file-chooser-set-preview-widget', you should update it when
3838     this signal is emitted.  You can use the functions
3839     'gtk-file-chooser-get-preview-filename' or
3840     'gtk-file-chooser-get-preview-uri' to get the name of the file to
3841     preview.  Your widget may not be able to preview all kinds of
3842     files; your callback must call
3843     'gtk-file-chooser-set-preview-wiget-active' to inform the file
3844     chooser about whether the preview was generated successfully or
3845     not.
3846
3847     Please see the example code in _(the missing figure,
3848     gtkfilechooser-preview_.
3849
3850     See also: 'gtk-file-chooser-set-preview-widget',
3851     'gtk-file-chooser-set-preview-widget-active',
3852     'gtk-file-chooser-set-use-preview-label',
3853     'gtk-file-chooser-get-preview-filename',
3854     'gtk-file-chooser-get-preview-uri'.
3855
3856 -- Signal on <gtk-file-chooser>: file-activated
3857     This signal is emitted when the user "activates" a file in the file
3858     chooser.  This can happen by double-clicking on a file in the file
3859     list, or by pressing (keycap "Enter") .
3860
3861     Normally you do not need to connect to this signal.  It is used
3862     internally by '<gtk-file-chooser-dialog>' to know when to activate
3863     the default button in the dialog.
3864
3865     See also: 'gtk-file-chooser-get-filename',
3866     'gtk-file-chooser-get-filenames', 'gtk-file-chooser-get-uri',
3867     'gtk-file-chooser-get-uris'.
3868
3869 -- Signal on <gtk-file-chooser>: confirm-overwrite
3870          => '<gtk-file-chooser-confirmation>'
3871     This signal gets emitted whenever it is appropriate to present a
3872     confirmation dialog when the user has selected a file name that
3873     already exists.  The signal only gets emitted when the file chooser
3874     is in '<gtk-file-chooser-action-save>' mode.
3875
3876     Most applications just need to turn on the
3877     do-overwrite-confirmation property (or call the
3878     'gtk-file-chooser-set-do-overwrite-confirmation' function), and
3879     they will automatically get a stock confirmation dialog.
3880     Applications which need to customize this behavior should do that,
3881     and also connect to the 'confirm-overwrite' signal.
3882
3883     A signal handler for this signal must return a
3884     '<gtk-file-chooser-confirmation>' value, which indicates the action
3885     to take.  If the handler determines that the user wants to select a
3886     different filename, it should return
3887     '<gtk-file-chooser-confirmation-select-again>'.  If it determines
3888     that the user is satisfied with his choice of file name, it should
3889     return '<gtk-file-chooser-confirmation-accept-filename>'.  On the
3890     other hand, if it determines that the stock confirmation dialog
3891     should be used, it should return
3892     '<gtk-file-chooser-confirmation-confirm>'.  The following example
3893     illustrates this.
3894
3895 -- Function: gtk-file-chooser-set-action (self '<gtk-file-chooser>')
3896          (action '<gtk-file-chooser-action>')
3897 -- Method: set-action
3898     Sets the type of operation that the chooser is performing; the user
3899     interface is adapted to suit the selected action.  For example, an
3900     option to create a new folder might be shown if the action is
3901     'GTK_FILE_CHOOSER_ACTION_SAVE' but not if the action is
3902     'GTK_FILE_CHOOSER_ACTION_OPEN'.
3903
3904     CHOOSER
3905          a '<gtk-file-chooser>'
3906
3907     ACTION
3908          the action that the file selector is performing
3909
3910     Since 2.4
3911
3912 -- Function: gtk-file-chooser-get-action (self '<gtk-file-chooser>')
3913          =>  (ret '<gtk-file-chooser-action>')
3914 -- Method: get-action
3915     Gets the type of operation that the file chooser is performing; see
3916     'gtk-file-chooser-set-action'.
3917
3918     CHOOSER
3919          a '<gtk-file-chooser>'
3920
3921     RET
3922          the action that the file selector is performing
3923
3924     Since 2.4
3925
3926 -- Function: gtk-file-chooser-set-local-only
3927          (self '<gtk-file-chooser>') (local_only 'bool')
3928 -- Method: set-local-only
3929     Sets whether only local files can be selected in the file selector.
3930     If LOCAL-ONLY is ''#t'' (the default), then the selected file are
3931     files are guaranteed to be accessible through the operating systems
3932     native file file system and therefore the application only needs to
3933     worry about the filename functions in '<gtk-file-chooser>', like
3934     'gtk-file-chooser-get-filename', rather than the URI functions like
3935     'gtk-file-chooser-get-uri',
3936
3937     CHOOSER
3938          a '<gtk-file-chooser>'
3939
3940     LOCAL-ONLY
3941          ''#t'' if only local files can be selected
3942
3943     Since 2.4
3944
3945 -- Function: gtk-file-chooser-get-local-only
3946          (self '<gtk-file-chooser>') =>  (ret 'bool')
3947 -- Method: get-local-only
3948     Gets whether only local files can be selected in the file selector.
3949     See 'gtk-file-chooser-set-local-only'
3950
3951     CHOOSER
3952          a '<gtk-file-choosre>'
3953
3954     RET
3955          ''#t'' if only local files can be selected.
3956
3957     Since 2.4
3958
3959 -- Function: gtk-file-chooser-set-show-hidden
3960          (self '<gtk-file-chooser>') (show_hidden 'bool')
3961 -- Method: set-show-hidden
3962     Sets whether hidden files and folders are displayed in the file
3963     selector.
3964
3965     CHOOSER
3966          a '<gtk-file-chooser>'
3967
3968     SHOW-HIDDEN
3969          ''#t'' if hidden files and folders should be displayed.
3970
3971     Since 2.6
3972
3973 -- Function: gtk-file-chooser-get-show-hidden
3974          (self '<gtk-file-chooser>') =>  (ret 'bool')
3975 -- Method: get-show-hidden
3976     Gets whether hidden files and folders are displayed in the file
3977     selector.  See 'gtk-file-chooser-set-show-hidden'.
3978
3979     CHOOSER
3980          a '<gtk-file-chooser>'
3981
3982     RET
3983          ''#t'' if hidden files and folders are displayed.
3984
3985     Since 2.6
3986
3987 -- Function: gtk-file-chooser-set-current-name
3988          (self '<gtk-file-chooser>') (name 'mchars')
3989 -- Method: set-current-name
3990     Sets the current name in the file selector, as if entered by the
3991     user.  Note that the name passed in here is a UTF-8 string rather
3992     than a filename.  This function is meant for such uses as a
3993     suggested name in a "Save As..."  dialog.
3994
3995     If you want to preselect a particular existing file, you should use
3996     'gtk-file-chooser-set-filename' or 'gtk-file-chooser-set-uri'
3997     instead.  Please see the documentation for those functions for an
3998     example of using 'gtk-file-chooser-set-current-name' as well.
3999
4000     CHOOSER
4001          a '<gtk-file-chooser>'
4002
4003     NAME
4004          the filename to use, as a UTF-8 string
4005
4006     Since 2.4
4007
4008 -- Function: gtk-file-chooser-get-filename (self '<gtk-file-chooser>')
4009          =>  (ret 'mchars')
4010 -- Method: get-filename
4011     Gets the filename for the currently selected file in the file
4012     selector.  If multiple files are selected, one of the filenames
4013     will be returned at random.
4014
4015     If the file chooser is in folder mode, this function returns the
4016     selected folder.
4017
4018     CHOOSER
4019          a '<gtk-file-chooser>'
4020
4021     RET
4022          The currently selected filename, or ''#f'' if no file is
4023          selected, or the selected file can't be represented with a
4024          local filename.  Free with 'g-free'.
4025
4026     Since 2.4
4027
4028 -- Function: gtk-file-chooser-set-filename (self '<gtk-file-chooser>')
4029          (filename 'mchars') =>  (ret 'bool')
4030 -- Method: set-filename
4031     Sets FILENAME as the current filename for the file chooser, by
4032     changing to the file's parent folder and actually selecting the
4033     file in list.  If the CHOOSER is in
4034     '<gtk-file-chooser-action-save>' mode, the file's base name will
4035     also appear in the dialog's file name entry.
4036
4037     If the file name isn't in the current folder of CHOOSER, then the
4038     current folder of CHOOSER will be changed to the folder containing
4039     FILENAME.  This is equivalent to a sequence of
4040     'gtk-file-chooser-unselect-all' followed by
4041     'gtk-file-chooser-select-filename'.
4042
4043     Note that the file must exist, or nothing will be done except for
4044     the directory change.
4045
4046     If you are implementing a use this function if you already have a
4047     file name to which the user may save; for example, when the user
4048     opens an existing file and then does "File/Save As...")  on it.  If
4049     you don't have a file name already &#x2014; for example, if the
4050     user just created a new file and is saving it for the first time,
4051     do not call this function.  Instead, use something similar to this:
4052
4053
4054          if (document_is_new)
4055            {
4056              /* the user just created a new document */
4057              gtk_file_chooser_set_current_folder (chooser, default_folder_for_saving);
4058              gtk_file_chooser_set_current_name (chooser, "Untitled document");
4059            }
4060          else
4061            {
4062              /* the user edited an existing document */
4063              gtk_file_chooser_set_filename (chooser, existing_filename);
4064            }
4065
4066     CHOOSER
4067          a '<gtk-file-chooser>'
4068
4069     FILENAME
4070          the filename to set as current
4071
4072     RET
4073          ''#t'' if both the folder could be changed and the file was
4074          selected successfully, ''#f'' otherwise.
4075
4076     Since 2.4
4077
4078 -- Function: gtk-file-chooser-select-filename
4079          (self '<gtk-file-chooser>') (filename 'mchars') =>
4080          (ret 'bool')
4081 -- Method: select-filename
4082     Selects a filename.  If the file name isn't in the current folder
4083     of CHOOSER, then the current folder of CHOOSER will be changed to
4084     the folder containing FILENAME.
4085
4086     CHOOSER
4087          a '<gtk-file-chooser>'
4088
4089     FILENAME
4090          the filename to select
4091
4092     RET
4093          ''#t'' if both the folder could be changed and the file was
4094          selected successfully, ''#f'' otherwise.
4095
4096     Since 2.4
4097
4098 -- Function: gtk-file-chooser-unselect-filename
4099          (self '<gtk-file-chooser>') (filename 'mchars')
4100 -- Method: unselect-filename
4101     Unselects a currently selected filename.  If the filename is not in
4102     the current directory, does not exist, or is otherwise not
4103     currently selected, does nothing.
4104
4105     CHOOSER
4106          a '<gtk-file-chooser>'
4107
4108     FILENAME
4109          the filename to unselect
4110
4111     Since 2.4
4112
4113 -- Function: gtk-file-chooser-select-all (self '<gtk-file-chooser>')
4114 -- Method: select-all
4115     Selects all the files in the current folder of a file chooser.
4116
4117     CHOOSER
4118          a '<gtk-file-chooser>'
4119
4120     Since 2.4
4121
4122 -- Function: gtk-file-chooser-unselect-all (self '<gtk-file-chooser>')
4123 -- Method: unselect-all
4124     Unselects all the files in the current folder of a file chooser.
4125
4126     CHOOSER
4127          a '<gtk-file-chooser>'
4128
4129     Since 2.4
4130
4131 -- Function: gtk-file-chooser-get-filenames (self '<gtk-file-chooser>')
4132          =>  (ret 'gslist-of')
4133 -- Method: get-filenames
4134     Lists all the selected files and subfolders in the current folder
4135     of CHOOSER.  The returned names are full absolute paths.  If files
4136     in the current folder cannot be represented as local filenames they
4137     will be ignored.  (See 'gtk-file-chooser-get-uris')
4138
4139     CHOOSER
4140          a '<gtk-file-chooser>'
4141
4142     RET
4143          a '<gs-list>' containing the filenames of all selected files
4144          and subfolders in the current folder.  Free the returned list
4145          with 'g-slist-free', and the filenames with 'g-free'.
4146
4147     Since 2.4
4148
4149 -- Function: gtk-file-chooser-set-current-folder
4150          (self '<gtk-file-chooser>') (filename 'mchars') =>
4151          (ret 'bool')
4152 -- Method: set-current-folder
4153     Sets the current folder for CHOOSER from a local filename.  The
4154     user will be shown the full contents of the current folder, plus
4155     user interface elements for navigating to other folders.
4156
4157     CHOOSER
4158          a '<gtk-file-chooser>'
4159
4160     FILENAME
4161          the full path of the new current folder
4162
4163     RET
4164          ''#t'' if the folder could be changed successfully, ''#f''
4165          otherwise.
4166
4167     Since 2.4
4168
4169 -- Function: gtk-file-chooser-get-current-folder
4170          (self '<gtk-file-chooser>') =>  (ret 'mchars')
4171 -- Method: get-current-folder
4172     Gets the current folder of CHOOSER as a local filename.  See
4173     'gtk-file-chooser-set-current-folder'.
4174
4175     Note that this is the folder that the file chooser is currently
4176     displaying (e.g.  "/home/username/Documents"), which is _not the
4177     same_ as the currently-selected folder if the chooser is in
4178     '<gtk-file-chooser-select-folder>' mode (e.g.
4179     "/home/username/Documents/selected-folder/".  To get the
4180     currently-selected folder in that mode, use
4181     'gtk-file-chooser-get-uri' as the usual way to get the selection.
4182
4183     CHOOSER
4184          a '<gtk-file-chooser>'
4185
4186     RET
4187          the full path of the current folder, or ''#f'' if the current
4188          path cannot be represented as a local filename.  Free with
4189          'g-free'.  This function will also return ''#f'' if the file
4190          chooser was unable to load the last folder that was requested
4191          from it; for example, as would be for calling
4192          'gtk-file-chooser-set-current-folder' on a nonexistent folder.
4193
4194     Since 2.4
4195
4196 -- Function: gtk-file-chooser-get-uri (self '<gtk-file-chooser>') =>
4197          (ret 'mchars')
4198 -- Method: get-uri
4199     Gets the URI for the currently selected file in the file selector.
4200     If multiple files are selected, one of the filenames will be
4201     returned at random.
4202
4203     If the file chooser is in folder mode, this function returns the
4204     selected folder.
4205
4206     CHOOSER
4207          a '<gtk-file-chooser>'
4208
4209     RET
4210          The currently selected URI, or ''#f'' if no file is selected.
4211          Free with 'g-free'
4212
4213     Since 2.4
4214
4215 -- Function: gtk-file-chooser-set-uri (self '<gtk-file-chooser>')
4216          (uri 'mchars') =>  (ret 'bool')
4217 -- Method: set-uri
4218     Sets the file referred to by URI as the current file for the file
4219     chooser, by changing to the URI's parent folder and actually
4220     selecting the URI in the list.  If the CHOOSER is
4221     '<gtk-file-chooser-action-save>' mode, the URI's base name will
4222     also appear in the dialog's file name entry.
4223
4224     If the URI isn't in the current folder of CHOOSER, then the current
4225     folder of CHOOSER will be changed to the folder containing URI.
4226     This is equivalent to a sequence of 'gtk-file-chooser-unselect-all'
4227     followed by 'gtk-file-chooser-select-uri'.
4228
4229     Note that the URI must exist, or nothing will be done except for
4230     the directory change.  If you are implementing a should use this
4231     function if you already have a file name to which the user may
4232     save; for example, when the user opens an existing file and then
4233     does (guimenuitem "File/Save As...")  on it.  If you don't have a
4234     file name already &#x2014; for example, if the user just created a
4235     new file and is saving it for the first time, do not call this
4236     function.  Instead, use something similar to this:
4237
4238
4239          if (document_is_new)
4240            {
4241              /* the user just created a new document */
4242              gtk_file_chooser_set_current_folder_uri (chooser, default_folder_for_saving);
4243              gtk_file_chooser_set_current_name (chooser, "Untitled document");
4244            }
4245          else
4246            {
4247              /* the user edited an existing document */
4248              gtk_file_chooser_set_uri (chooser, existing_uri);
4249            }
4250
4251     CHOOSER
4252          a '<gtk-file-chooser>'
4253
4254     URI
4255          the URI to set as current
4256
4257     RET
4258          ''#t'' if both the folder could be changed and the URI was
4259          selected successfully, ''#f'' otherwise.
4260
4261     Since 2.4
4262
4263 -- Function: gtk-file-chooser-select-uri (self '<gtk-file-chooser>')
4264          (uri 'mchars') =>  (ret 'bool')
4265 -- Method: select-uri
4266     Selects the file to by URI.  If the URI doesn't refer to a file in
4267     the current folder of CHOOSER, then the current folder of CHOOSER
4268     will be changed to the folder containing FILENAME.
4269
4270     CHOOSER
4271          a '<gtk-file-chooser>'
4272
4273     URI
4274          the URI to select
4275
4276     RET
4277          ''#t'' if both the folder could be changed and the URI was
4278          selected successfully, ''#f'' otherwise.
4279
4280     Since 2.4
4281
4282 -- Function: gtk-file-chooser-unselect-uri (self '<gtk-file-chooser>')
4283          (uri 'mchars')
4284 -- Method: unselect-uri
4285     Unselects the file referred to by URI.  If the file is not in the
4286     current directory, does not exist, or is otherwise not currently
4287     selected, does nothing.
4288
4289     CHOOSER
4290          a '<gtk-file-chooser>'
4291
4292     URI
4293          the URI to unselect
4294
4295     Since 2.4
4296
4297 -- Function: gtk-file-chooser-get-uris (self '<gtk-file-chooser>') =>
4298          (ret 'gslist-of')
4299 -- Method: get-uris
4300     Lists all the selected files and subfolders in the current folder
4301     of CHOOSER.  The returned names are full absolute URIs.
4302
4303     CHOOSER
4304          a '<gtk-file-chooser>'
4305
4306     RET
4307          a '<gs-list>' containing the URIs of all selected files and
4308          subfolders in the current folder.  Free the returned list with
4309          'g-slist-free', and the filenames with 'g-free'.
4310
4311     Since 2.4
4312
4313 -- Function: gtk-file-chooser-set-preview-widget
4314          (self '<gtk-file-chooser>') (preview_widget '<gtk-widget>')
4315 -- Method: set-preview-widget
4316     Sets an application-supplied widget to use to display a custom
4317     preview of the currently selected file.  To implement a preview,
4318     after setting the preview widget, you connect to the
4319     ::update-preview signal, and call
4320     'gtk-file-chooser-get-preview-filename' or
4321     'gtk-file-chooser-get-preview-uri' on each change.  If you can
4322     display a preview of the new file, update your widget and set the
4323     preview active using 'gtk-file-chooser-set-preview-widget-active'.
4324     Otherwise, set the preview inactive.
4325
4326     When there is no application-supplied preview widget, or the
4327     application-supplied preview widget is not active, the file chooser
4328     may display an internally generated preview of the current file or
4329     it may display no preview at all.
4330
4331     CHOOSER
4332          a '<gtk-file-chooser>'
4333
4334     PREVIEW-WIDGET
4335          widget for displaying preview.
4336
4337     Since 2.4
4338
4339 -- Function: gtk-file-chooser-get-preview-widget
4340          (self '<gtk-file-chooser>') =>  (ret '<gtk-widget>')
4341 -- Method: get-preview-widget
4342     Gets the current preview widget; see
4343     'gtk-file-chooser-set-preview-widget'.
4344
4345     CHOOSER
4346          a '<gtk-file-chooser>'
4347
4348     RET
4349          the current preview widget, or ''#f''
4350
4351     Since 2.4
4352
4353 -- Function: gtk-file-chooser-get-preview-uri
4354          (self '<gtk-file-chooser>') =>  (ret 'mchars')
4355 -- Method: get-preview-uri
4356     Gets the URI that should be previewed in a custom preview widget.
4357     See 'gtk-file-chooser-set-preview-widget'.
4358
4359     CHOOSER
4360          a '<gtk-file-chooser>'
4361
4362     RET
4363          the URI for the file to preview, or ''#f'' if no file is
4364          selected.  Free with 'g-free'.
4365
4366     Since 2.4
4367
4368 -- Function: gtk-file-chooser-set-extra-widget
4369          (self '<gtk-file-chooser>') (extra_widget '<gtk-widget>')
4370 -- Method: set-extra-widget
4371     Sets an application-supplied widget to provide extra options to the
4372     user.
4373
4374     CHOOSER
4375          a '<gtk-file-chooser>'
4376
4377     EXTRA-WIDGET
4378          widget for extra options
4379
4380     Since 2.4
4381
4382 -- Function: gtk-file-chooser-get-extra-widget
4383          (self '<gtk-file-chooser>') =>  (ret '<gtk-widget>')
4384 -- Method: get-extra-widget
4385     Gets the current preview widget; see
4386     'gtk-file-chooser-set-extra-widget'.
4387
4388     CHOOSER
4389          a '<gtk-file-chooser>'
4390
4391     RET
4392          the current extra widget, or ''#f''
4393
4394     Since 2.4
4395
4396 -- Function: gtk-file-chooser-add-filter (self '<gtk-file-chooser>')
4397          (filter '<gtk-file-filter>')
4398 -- Method: add-filter
4399     Adds FILTER to the list of filters that the user can select
4400     between.  When a filter is selected, only files that are passed by
4401     that filter are displayed.
4402
4403     Note that the CHOOSER takes ownership of the filter, so you have to
4404     ref and sink it if you want to keep a reference.
4405
4406     CHOOSER
4407          a '<gtk-file-chooser>'
4408
4409     FILTER
4410          a '<gtk-file-filter>'
4411
4412     Since 2.4
4413
4414 -- Function: gtk-file-chooser-remove-filter (self '<gtk-file-chooser>')
4415          (filter '<gtk-file-filter>')
4416 -- Method: remove-filter
4417     Removes FILTER from the list of filters that the user can select
4418     between.
4419
4420     CHOOSER
4421          a '<gtk-file-chooser>'
4422
4423     FILTER
4424          a '<gtk-file-filter>'
4425
4426     Since 2.4
4427
4428 -- Function: gtk-file-chooser-list-filters (self '<gtk-file-chooser>')
4429          =>  (ret 'gslist-of')
4430 -- Method: list-filters
4431     Lists the current set of user-selectable filters; see
4432     'gtk-file-chooser-add-filter', 'gtk-file-chooser-remove-filter'.
4433
4434     CHOOSER
4435          a '<gtk-file-chooser>'
4436
4437     RET
4438          a '<gs-list>' containing the current set of user selectable
4439          filters.  The contents of the list are owned by GTK+, but you
4440          must free the list itself with 'g-slist-free' when you are
4441          done with it.
4442
4443     Since 2.4
4444
4445 -- Function: gtk-file-chooser-set-filter (self '<gtk-file-chooser>')
4446          (filter '<gtk-file-filter>')
4447 -- Method: set-filter
4448     Sets the current filter; only the files that pass the filter will
4449     be displayed.  If the user-selectable list of filters is non-empty,
4450     then the filter should be one of the filters in that list.  Setting
4451     the current filter when the list of filters is empty is useful if
4452     you want to restrict the displayed set of files without letting the
4453     user change it.
4454
4455     CHOOSER
4456          a '<gtk-file-chooser>'
4457
4458     FILTER
4459          a '<gtk-file-filter>'
4460
4461     Since 2.4
4462
4463 -- Function: gtk-file-chooser-get-filter (self '<gtk-file-chooser>')
4464          =>  (ret '<gtk-file-filter>')
4465 -- Method: get-filter
4466     Gets the current filter; see 'gtk-file-chooser-set-filter'.
4467
4468     CHOOSER
4469          a '<gtk-file-chooser>'
4470
4471     RET
4472          the current filter, or ''#f''
4473
4474     Since 2.4
4475
4476
4477File: guile-gnome-gtk.info,  Node: GtkFileChooserButton,  Next: GtkFileChooserDialog,  Prev: GtkFileChooser,  Up: Top
4478
447982 GtkFileChooserButton
4480***********************
4481
4482A button to launch a file selection dialog
4483
448482.1 Overview
4485=============
4486
4487The '<gtk-file-chooser-button>' is a widget that lets the user select a
4488file.  It implements the '<gtk-file-chooser>' interface.  Visually, it
4489is a file name with a button to bring up a '<gtk-file-chooser-dialog>'.
4490The user can then use that dialog to change the file associated with
4491that button.  This widget does not support setting the "select-multiple"
4492property to ''#t''.
4493
4494
4495     {
4496       GtkWidget *button;
4497
4498       button = gtk_file_chooser_button_new (_("Select a file"),
4499                                             GTK_FILE_CHOOSER_ACTION_OPEN);
4500       gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (button),
4501                                            "/etc");
4502     }
4503
4504   The '<gtk-file-chooser-button>' supports the
4505'<gtk-file-chooser-action>'s 'GTK_FILE_CHOOSER_ACTION_OPEN' and
4506'GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER'.
4507
4508   The '<gtk-file-chooser-button>' will ellipsize the label, and thus
4509will thus request little horizontal space.  To give the button more
4510space, you should call 'gtk-widget-size-request',
4511'gtk-file-chooser-button-set-width-chars', or pack the button in such a
4512way that other interface elements give space to the widget.
4513
451482.2 Usage
4515==========
4516
4517 -- Class: <gtk-file-chooser-button>
4518     Derives from '<gtk-file-chooser>', '<gtk-hbox>'.
4519
4520     This class defines the following slots:
4521
4522     'dialog'
4523          The file chooser dialog to use.
4524
4525     'focus-on-click'
4526          Whether the button grabs focus when it is clicked with the
4527          mouse
4528
4529     'title'
4530          The title of the file chooser dialog.
4531
4532     'width-chars'
4533          The desired width of the button widget, in characters.
4534
4535 -- Signal on <gtk-file-chooser-button>: file-set
4536     undocumented
4537
4538 -- Function: gtk-file-chooser-button-new (title 'mchars')
4539          (action '<gtk-file-chooser-action>') =>  (ret '<gtk-widget>')
4540     Creates a new file-selecting button widget.
4541
4542     TITLE
4543          the title of the browse dialog.
4544
4545     ACTION
4546          the open mode for the widget.
4547
4548     RET
4549          a new button widget.
4550
4551     Since 2.6
4552
4553 -- Function: gtk-file-chooser-button-get-title
4554          (self '<gtk-file-chooser-button>') =>  (ret 'mchars')
4555 -- Method: get-title
4556     Retrieves the title of the browse dialog used by BUTTON.  The
4557     returned value should not be modified or freed.
4558
4559     BUTTON
4560          the button widget to examine.
4561
4562     RET
4563          a pointer to the browse dialog's title.
4564
4565     Since 2.6
4566
4567 -- Function: gtk-file-chooser-button-set-title
4568          (self '<gtk-file-chooser-button>') (title 'mchars')
4569 -- Method: set-title
4570     Modifies the TITLE of the browse dialog used by BUTTON.
4571
4572     BUTTON
4573          the button widget to modify.
4574
4575     TITLE
4576          the new browse dialog title.
4577
4578     Since 2.6
4579
4580
4581File: guile-gnome-gtk.info,  Node: GtkFileChooserDialog,  Next: GtkFileChooserWidget,  Prev: GtkFileChooserButton,  Up: Top
4582
458383 GtkFileChooserDialog
4584***********************
4585
4586A file chooser dialog, suitable for "File/Open" or "File/Save" commands
4587
458883.1 Overview
4589=============
4590
4591'<gtk-file-chooser-dialog>' is a dialog box suitable for use with
4592"File/Open" or "File/Save as" commands.  This widget works by putting a
4593'<gtk-file-chooser-widget>' inside a '<gtk-dialog>'.  It exposes the
4594'<gtk-file-chooser-iface>' interface, so you can use all of the
4595'<gtk-file-chooser>' functions on the file chooser dialog as well as
4596those for '<gtk-dialog>'.
4597
4598   Note that '<gtk-file-chooser-dialog>' does not have any methods of
4599its own.  Instead, you should use the functions that work on a
4600'<gtk-file-chooser>'.
4601
4602   In the simplest of cases, you can the following code to use
4603'<gtk-file-chooser-dialog>' to select a file for opening:
4604
4605
4606     GtkWidget *dialog;
4607
4608     dialog = gtk_file_chooser_dialog_new ("Open File",
4609     				      parent_window,
4610     				      GTK_FILE_CHOOSER_ACTION_OPEN,
4611     				      GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
4612     				      GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
4613     				      NULL);
4614
4615     if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
4616       {
4617         char *filename;
4618
4619         filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
4620         open_file (filename);
4621         g_free (filename);
4622       }
4623
4624     gtk_widget_destroy (dialog);
4625
4626
4627   To use a dialog for saving, you can use this:
4628
4629
4630     GtkWidget *dialog;
4631
4632     dialog = gtk_file_chooser_dialog_new ("Save File",
4633     				      parent_window,
4634     				      GTK_FILE_CHOOSER_ACTION_SAVE,
4635     				      GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
4636     				      GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
4637     				      NULL);
4638     gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE);
4639
4640     if (user_edited_a_new_document)
4641       {
4642         gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), default_folder_for_saving);
4643         gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), "Untitled document");
4644       }
4645     else
4646       gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (dialog), filename_for_existing_document);
4647
4648
4649     if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
4650       {
4651         char *filename;
4652
4653         filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
4654         save_to_file (filename);
4655         g_free (filename);
4656       }
4657
4658     gtk_widget_destroy (dialog);
4659
4660
4661   '<gtk-file-chooser-dialog>' inherits from '<gtk-dialog>', so buttons
4662that go in its action area have response codes such as
4663'<gtk-response-accept>' and '<gtk-response-cancel>'.  For example, you
4664could call 'gtk-file-chooser-dialog-new' as follows:
4665
4666
4667     GtkWidget *dialog;
4668
4669     dialog = gtk_file_chooser_dialog_new ("Open File",
4670     				      parent_window,
4671     				      GTK_FILE_CHOOSER_ACTION_OPEN,
4672     				      GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
4673     				      GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
4674     				      NULL);
4675
4676
4677   This will create buttons for "Cancel" and "Open" that use stock
4678response identifiers from '<gtk-response-type>'.  For most dialog boxes
4679you can use your own custom response codes rather than the ones in
4680'<gtk-response-type>', but '<gtk-file-chooser-dialog>' assumes that its
4681"accept"-type action, e.g.  an "Open" or "Save" button, _will_ have one
4682of the following response codes:
4683
4684   This is because '<gtk-file-chooser-dialog>' must intercept responses
4685and switch to folders if appropriate, rather than letting the dialog
4686terminate &#x2014; the implementation uses these known response codes to
4687know which responses can be blocked if appropriate.
4688
4689   To summarize, make sure you use a stock response code when you use
4690'<gtk-file-chooser-dialog>' to ensure proper operation.
4691
469283.2 Usage
4693==========
4694
4695 -- Class: <gtk-file-chooser-dialog>
4696     Derives from '<gtk-file-chooser>', '<gtk-dialog>'.
4697
4698     This class defines no direct slots.
4699
4700
4701File: guile-gnome-gtk.info,  Node: GtkFileChooserWidget,  Next: GtkFileFilter,  Prev: GtkFileChooserDialog,  Up: Top
4702
470384 GtkFileChooserWidget
4704***********************
4705
4706File chooser widget that can be embedded in other widgets
4707
470884.1 Overview
4709=============
4710
4711'<gtk-file-chooser-widget>' is a widget suitable for selecting files.
4712It is the main building block of a '<gtk-file-chooser-dialog>'.  Most
4713applications will only need to use the latter; you can use
4714'<gtk-file-chooser-widget>' as part of a larger window if you have
4715special needs.
4716
4717   Note that '<gtk-file-chooser-widget>' does not have any methods of
4718its own.  Instead, you should use the functions that work on a
4719'<gtk-file-chooser>'.
4720
472184.2 Usage
4722==========
4723
4724 -- Class: <gtk-file-chooser-widget>
4725     Derives from '<gtk-file-chooser-embed>', '<gtk-file-chooser>',
4726     '<gtk-vbox>'.
4727
4728     This class defines no direct slots.
4729
4730 -- Function: gtk-file-chooser-widget-new
4731          (action '<gtk-file-chooser-action>') =>  (ret '<gtk-widget>')
4732     Creates a new '<gtk-file-chooser-widget>'.  This is a file chooser
4733     widget that can be embedded in custom windows, and it is the same
4734     widget that is used by '<gtk-file-chooser-dialog>'.
4735
4736     ACTION
4737          Open or save mode for the widget
4738
4739     RET
4740          a new '<gtk-file-chooser-widget>'
4741
4742     Since 2.4
4743
4744
4745File: guile-gnome-gtk.info,  Node: GtkFileFilter,  Next: GtkFontButton,  Prev: GtkFileChooserWidget,  Up: Top
4746
474785 GtkFileFilter
4748****************
4749
4750A filter for selecting a file subset
4751
475285.1 Overview
4753=============
4754
4755A GtkFileFilter can be used to restrict the files being shown in a
4756'<gtk-file-chooser>'.  Files can be filtered based on their name (with
4757'gtk-file-filter-add-pattern'), on their mime type (with
4758'gtk-file-filter-add-mime-type'), or by a custom filter function (with
4759'gtk-file-filter-add-custom').
4760
4761   Filtering by mime types handles aliasing and subclassing of mime
4762types; e.g.  a filter for text/plain also matches a file with mime type
4763application/rtf, since application/rtf is a subclass of text/plain.
4764Note that '<gtk-file-filter>' allows wildcards for the subtype of a mime
4765type, so you can e.g.  filter for image/*.
4766
4767   Normally, filters are used by adding them to a '<gtk-file-chooser>',
4768see 'gtk-file-chooser-add-filter', but it is also possible to manually
4769use a filter on a file with 'gtk-file-filter-filter'.
4770
477185.2 Usage
4772==========
4773
4774 -- Class: <gtk-file-filter>
4775     Derives from '<gtk-object>'.
4776
4777     This class defines no direct slots.
4778
4779 -- Function: gtk-file-filter-new =>  (ret '<gtk-file-filter>')
4780     Creates a new '<gtk-file-filter>' with no rules added to it.  Such
4781     a filter doesn't accept any files, so is not particularly useful
4782     until you add rules with 'gtk-file-filter-add-mime-type',
4783     'gtk-file-filter-add-pattern', or 'gtk-file-filter-add-custom'.  To
4784     create a filter that accepts any file, use:
4785
4786
4787          GtkFileFilter *filter = gtk_file_filter_new ();
4788          gtk_file_filter_add_pattern (filter, "*");
4789
4790     RET
4791          a new '<gtk-file-filter>'
4792
4793     Since 2.4
4794
4795 -- Function: gtk-file-filter-set-name (self '<gtk-file-filter>')
4796          (name 'mchars')
4797 -- Method: set-name
4798     Sets the human-readable name of the filter; this is the string that
4799     will be displayed in the file selector user interface if there is a
4800     selectable list of filters.
4801
4802     FILTER
4803          a '<gtk-file-filter>'
4804
4805     NAME
4806          the human-readable-name for the filter, or ''#f'' to remove
4807          any existing name.
4808
4809     Since 2.4
4810
4811 -- Function: gtk-file-filter-get-name (self '<gtk-file-filter>') =>
4812          (ret 'mchars')
4813 -- Method: get-name
4814     Gets the human-readable name for the filter.  See
4815     'gtk-file-filter-set-name'.
4816
4817     FILTER
4818          a '<gtk-file-filter>'
4819
4820     RET
4821          The human-readable name of the filter, or ''#f''.  This value
4822          is owned by GTK+ and must not be modified or freed.
4823
4824     Since 2.4
4825
4826 -- Function: gtk-file-filter-add-mime-type (self '<gtk-file-filter>')
4827          (mime_type 'mchars')
4828 -- Method: add-mime-type
4829     Adds a rule allowing a given mime type to FILTER.
4830
4831     FILTER
4832          A '<gtk-file-filter>'
4833
4834     MIME-TYPE
4835          name of a MIME type
4836
4837     Since 2.4
4838
4839 -- Function: gtk-file-filter-add-pattern (self '<gtk-file-filter>')
4840          (pattern 'mchars')
4841 -- Method: add-pattern
4842     Adds a rule allowing a shell style glob to a filter.
4843
4844     FILTER
4845          a '<gtk-file-filter>'
4846
4847     PATTERN
4848          a shell style glob
4849
4850     Since 2.4
4851
4852 -- Function: gtk-file-filter-add-pixbuf-formats
4853          (self '<gtk-file-filter>')
4854 -- Method: add-pixbuf-formats
4855     Adds a rule allowing image files in the formats supported by
4856     GdkPixbuf.
4857
4858     FILTER
4859          a '<gtk-file-filter>'
4860
4861     Since 2.6
4862
4863 -- Function: gtk-file-filter-get-needed (self '<gtk-file-filter>') =>
4864          (ret '<gtk-file-filter-flags>')
4865 -- Method: get-needed
4866     Gets the fields that need to be filled in for the structure passed
4867     to 'gtk-file-filter-filter'
4868
4869     This function will not typically be used by applications; it is
4870     intended principally for use in the implementation of
4871     '<gtk-file-chooser>'.
4872
4873     FILTER
4874          a '<gtk-file-filter>'
4875
4876     RET
4877          bitfield of flags indicating needed fields when calling
4878          'gtk-file-filter-filter'
4879
4880     Since 2.4
4881
4882
4883File: guile-gnome-gtk.info,  Node: GtkFontButton,  Next: GtkFontSelection,  Prev: GtkFileFilter,  Up: Top
4884
488586 GtkFontButton
4886****************
4887
4888A button to launch a font selection dialog
4889
489086.1 Overview
4891=============
4892
4893The '<gtk-font-button>' is a button which displays the currently
4894selected font an allows to open a font selection dialog to change the
4895font.  It is suitable widget for selecting a font in a preference
4896dialog.
4897
489886.2 Usage
4899==========
4900
4901 -- Class: <gtk-font-button>
4902     Derives from '<gtk-button>'.
4903
4904     This class defines the following slots:
4905
4906     'title'
4907          The title of the font selection dialog
4908
4909     'font-name'
4910          The name of the selected font
4911
4912     'use-font'
4913          Whether the label is drawn in the selected font
4914
4915     'use-size'
4916          Whether the label is drawn with the selected font size
4917
4918     'show-style'
4919          Whether the selected font style is shown in the label
4920
4921     'show-size'
4922          Whether selected font size is shown in the label
4923
4924 -- Signal on <gtk-font-button>: font-set
4925     The ::font-set signal is emitted when the user selects a font.
4926     When handling this signal, use 'gtk-font-button-get-font-name' to
4927     find out which font was just selected.
4928
4929     Note that this signal is only emitted when the _user_ changes the
4930     font.  If you need to react to programmatic font changes as well,
4931     use the notify::font-name signal.
4932
4933     Since 2.4
4934
4935 -- Function: gtk-font-button-new =>  (ret '<gtk-widget>')
4936     Creates a new font picker widget.
4937
4938     RET
4939          a new font picker widget.
4940
4941     Since 2.4
4942
4943 -- Function: gtk-font-button-new-with-font (fontname 'mchars') =>
4944          (ret '<gtk-widget>')
4945     Creates a new font picker widget.
4946
4947     FONTNAME
4948          Name of font to display in font selection dialog
4949
4950     RET
4951          a new font picker widget.
4952
4953     Since 2.4
4954
4955 -- Function: gtk-font-button-set-font-name (self '<gtk-font-button>')
4956          (fontname 'mchars') =>  (ret 'bool')
4957 -- Method: set-font-name
4958     Sets or updates the currently-displayed font in font picker dialog.
4959
4960     FONT-BUTTON
4961          a '<gtk-font-button>'
4962
4963     FONTNAME
4964          Name of font to display in font selection dialog
4965
4966     RET
4967          Return value of 'gtk-font-selection-dialog-set-font-name' if
4968          the font selection dialog exists, otherwise ''#f''.
4969
4970     Since 2.4
4971
4972 -- Function: gtk-font-button-get-font-name (self '<gtk-font-button>')
4973          =>  (ret 'mchars')
4974 -- Method: get-font-name
4975     Retrieves the name of the currently selected font.
4976
4977     FONT-BUTTON
4978          a '<gtk-font-button>'
4979
4980     RET
4981          an internal copy of the font name which must not be freed.
4982
4983     Since 2.4
4984
4985 -- Function: gtk-font-button-set-show-style (self '<gtk-font-button>')
4986          (show_style 'bool')
4987 -- Method: set-show-style
4988     If SHOW-STYLE is ''#t'', the font style will be displayed along
4989     with name of the selected font.
4990
4991     FONT-BUTTON
4992          a '<gtk-font-button>'
4993
4994     SHOW-STYLE
4995          ''#t'' if font style should be displayed in label.
4996
4997     Since 2.4
4998
4999 -- Function: gtk-font-button-get-show-style (self '<gtk-font-button>')
5000          =>  (ret 'bool')
5001 -- Method: get-show-style
5002     Returns whether the name of the font style will be shown in the
5003     label.
5004
5005     FONT-BUTTON
5006          a '<gtk-font-button>'
5007
5008     RET
5009          whether the font style will be shown in the label.
5010
5011     Since 2.4
5012
5013 -- Function: gtk-font-button-set-show-size (self '<gtk-font-button>')
5014          (show_size 'bool')
5015 -- Method: set-show-size
5016     If SHOW-SIZE is ''#t'', the font size will be displayed along with
5017     the name of the selected font.
5018
5019     FONT-BUTTON
5020          a '<gtk-font-button>'
5021
5022     SHOW-SIZE
5023          ''#t'' if font size should be displayed in dialog.
5024
5025     Since 2.4
5026
5027 -- Function: gtk-font-button-get-show-size (self '<gtk-font-button>')
5028          =>  (ret 'bool')
5029 -- Method: get-show-size
5030     Returns whether the font size will be shown in the label.
5031
5032     FONT-BUTTON
5033          a '<gtk-font-button>'
5034
5035     RET
5036          whether the font size will be shown in the label.
5037
5038     Since 2.4
5039
5040 -- Function: gtk-font-button-set-use-font (self '<gtk-font-button>')
5041          (use_font 'bool')
5042 -- Method: set-use-font
5043     If USE-FONT is ''#t'', the font name will be written using the
5044     selected font.
5045
5046     FONT-BUTTON
5047          a '<gtk-font-button>'
5048
5049     USE-FONT
5050          If ''#t'', font name will be written using font chosen.
5051
5052     Since 2.4
5053
5054 -- Function: gtk-font-button-get-use-font (self '<gtk-font-button>')
5055          =>  (ret 'bool')
5056 -- Method: get-use-font
5057     Returns whether the selected font is used in the label.
5058
5059     FONT-BUTTON
5060          a '<gtk-font-button>'
5061
5062     RET
5063          whether the selected font is used in the label.
5064
5065     Since 2.4
5066
5067 -- Function: gtk-font-button-set-use-size (self '<gtk-font-button>')
5068          (use_size 'bool')
5069 -- Method: set-use-size
5070     If USE-SIZE is ''#t'', the font name will be written using the
5071     selected size.
5072
5073     FONT-BUTTON
5074          a '<gtk-font-button>'
5075
5076     USE-SIZE
5077          If ''#t'', font name will be written using the selected size.
5078
5079     Since 2.4
5080
5081 -- Function: gtk-font-button-get-use-size (self '<gtk-font-button>')
5082          =>  (ret 'bool')
5083 -- Method: get-use-size
5084     Returns whether the selected size is used in the label.
5085
5086     FONT-BUTTON
5087          a '<gtk-font-button>'
5088
5089     RET
5090          whether the selected size is used in the label.
5091
5092     Since 2.4
5093
5094 -- Function: gtk-font-button-set-title (self '<gtk-font-button>')
5095          (title 'mchars')
5096 -- Method: set-title
5097     Sets the title for the font selection dialog.
5098
5099     FONT-BUTTON
5100          a '<gtk-font-button>'
5101
5102     TITLE
5103          a string containing the font selection dialog title
5104
5105     Since 2.4
5106
5107 -- Function: gtk-font-button-get-title (self '<gtk-font-button>') =>
5108          (ret 'mchars')
5109 -- Method: get-title
5110     Retrieves the title of the font selection dialog.
5111
5112     FONT-BUTTON
5113          a '<gtk-font-button>'
5114
5115     RET
5116          an internal copy of the title string which must not be freed.
5117
5118     Since 2.4
5119
5120
5121File: guile-gnome-gtk.info,  Node: GtkFontSelection,  Next: GtkFontSelectionDialog,  Prev: GtkFontButton,  Up: Top
5122
512387 GtkFontSelection
5124*******************
5125
5126A widget for selecting fonts
5127
512887.1 Overview
5129=============
5130
5131The '<gtk-font-selection>' widget lists the available fonts, styles and
5132sizes, allowing the user to select a font.  It is used in the
5133'<gtk-font-selection-dialog>' widget to provide a dialog box for
5134selecting fonts.
5135
5136   To set the font which is initially selected, use
5137'gtk-font-selection-set-font-name'.
5138
5139   To get the selected font use 'gtk-font-selection-get-font-name'.
5140
5141   To change the text which is shown in the preview area, use
5142'gtk-font-selection-set-preview-text'.
5143
514487.2 Usage
5145==========
5146
5147 -- Class: <gtk-font-selection>
5148     Derives from '<gtk-vbox>'.
5149
5150     This class defines the following slots:
5151
5152     'font-name'
5153          The X string that represents this font
5154
5155     'font'
5156          The GdkFont that is currently selected
5157
5158     'preview-text'
5159          The text to display in order to demonstrate the selected font
5160
5161 -- Function: gtk-font-selection-new =>  (ret '<gtk-widget>')
5162     Creates a new '<gtk-font-selection>'.
5163
5164     RET
5165          a new '<gtk-font-selection>'.
5166
5167 -- Function: gtk-font-selection-get-font-name
5168          (self '<gtk-font-selection>') =>  (ret 'mchars')
5169 -- Method: get-font-name
5170     Gets the currently-selected font name.  Note that this can be a
5171     different string than what you set with
5172     'gtk-font-selection-set-font-name', as the font selection widget
5173     may normalize font names and thus return a string with a different
5174     structure.  For example, "Helvetica Italic Bold 12" could be
5175     normalized to "Helvetica Bold Italic 12".  Use
5176     'pango-font-description-equal' if you want to compare two font
5177     descriptions.
5178
5179     FONTSEL
5180          a '<gtk-font-selection>'
5181
5182     RET
5183          A string with the name of the current font, or '#f' if no font
5184          is selected.  You must free this string with 'g-free'.
5185
5186 -- Function: gtk-font-selection-set-font-name
5187          (self '<gtk-font-selection>') (fontname 'mchars') =>
5188          (ret 'bool')
5189 -- Method: set-font-name
5190     Sets the currently-selected font.  Note that the FONTSEL needs to
5191     know the screen in which it will appear for this to work; this can
5192     be guaranteed by simply making sure that the FONTSEL is inserted in
5193     a toplevel window before you call this function.
5194
5195     FONTSEL
5196          a '<gtk-font-selection>'
5197
5198     FONTNAME
5199          a font name like "Helvetica 12" or "Times Bold 18"
5200
5201     RET
5202          '#t' if the font could be set successfully; '#f' if no such
5203          font exists or if the FONTSEL doesn't belong to a particular
5204          screen yet.
5205
5206 -- Function: gtk-font-selection-get-preview-text
5207          (self '<gtk-font-selection>') =>  (ret 'mchars')
5208 -- Method: get-preview-text
5209     Gets the text displayed in the preview area.
5210
5211     FONTSEL
5212          a '<gtk-font-selection>'.
5213
5214     RET
5215          the text displayed in the preview area.  This string is owned
5216          by the widget and should not be modified or freed.
5217
5218 -- Function: gtk-font-selection-set-preview-text
5219          (self '<gtk-font-selection>') (text 'mchars')
5220 -- Method: set-preview-text
5221     Sets the text displayed in the preview area.
5222
5223     FONTSEL
5224          a '<gtk-font-selection>'.
5225
5226     TEXT
5227          the text to display in the preview area.
5228
5229
5230File: guile-gnome-gtk.info,  Node: GtkFontSelectionDialog,  Next: GtkInputDialog,  Prev: GtkFontSelection,  Up: Top
5231
523288 GtkFontSelectionDialog
5233*************************
5234
5235A dialog box for selecting fonts
5236
523788.1 Overview
5238=============
5239
5240The '<gtk-font-selection-dialog>' widget is a dialog box for selecting a
5241font.
5242
5243   To set the font which is initially selected, use
5244'gtk-font-selection-dialog-set-font-name'.
5245
5246   To get the selected font use
5247'gtk-font-selection-dialog-get-font-name'.
5248
5249   To change the text which is shown in the preview area, use
5250'gtk-font-selection-dialog-set-preview-text'.
5251
525288.2 Usage
5253==========
5254
5255 -- Class: <gtk-font-selection-dialog>
5256     Derives from '<gtk-dialog>'.
5257
5258     This class defines no direct slots.
5259
5260 -- Function: gtk-font-selection-dialog-new (title 'mchars') =>
5261          (ret '<gtk-widget>')
5262     Creates a new '<gtk-font-selection-dialog>'.
5263
5264     TITLE
5265          the title of the dialog box.
5266
5267     RET
5268          a new '<gtk-font-selection-dialog>'.
5269
5270
5271File: guile-gnome-gtk.info,  Node: GtkInputDialog,  Next: GtkAlignment,  Prev: GtkFontSelectionDialog,  Up: Top
5272
527389 GtkInputDialog
5274*****************
5275
5276Configure devices for the XInput extension
5277
527889.1 Overview
5279=============
5280
5281NOTE this widget is considered too specialized/little-used for GTK+, and
5282will in the future be moved to some other package.  If your application
5283needs this widget, feel free to use it, as the widget does work and is
5284useful in some applications; it's just not of general interest.
5285However, we are not accepting new features for the widget, and it will
5286eventually move out of the GTK+ distribution.
5287
5288   '<gtk-input-dialog>' displays a dialog which allows the user to
5289configure XInput extension devices.  For each device, they can control
5290the mode of the device (disabled, screen-relative, or window-relative),
5291the mapping of axes to coordinates, and the mapping of the devices macro
5292keys to key press events.
5293
5294   '<gtk-input-dialog>' contains two buttons to which the application
5295can connect; one for closing the dialog, and one for saving the changes.
5296No actions are bound to these by default.  The changes that the user
5297makes take effect immediately.
5298
529989.2 Usage
5300==========
5301
5302 -- Class: <gtk-input-dialog>
5303     Derives from '<gtk-dialog>'.
5304
5305     This class defines no direct slots.
5306
5307 -- Signal on <gtk-input-dialog>: enable-device (arg0 '<gdk-device>')
5308     This signal is emitted when the user changes the mode of a device
5309     from '<gdk-mode-disabled>' to a '<gdk-mode-screen>' or
5310     '<gdk-mode-window>'.
5311
5312 -- Signal on <gtk-input-dialog>: disable-device (arg0 '<gdk-device>')
5313     This signal is emitted when the user changes the mode of a device
5314     from a '<gdk-mode-screen>' or '<gdk-mode-window>' to
5315     '<gdk-mode-enabled>'.
5316
5317 -- Function: gtk-input-dialog-new =>  (ret '<gtk-widget>')
5318     Creates a new '<gtk-input-dialog>'.
5319
5320     RET
5321          the new '<gtk-input-dialog>'.
5322
5323
5324File: guile-gnome-gtk.info,  Node: GtkAlignment,  Next: GtkAspectFrame,  Prev: GtkInputDialog,  Up: Top
5325
532690 GtkAlignment
5327***************
5328
5329A widget which controls the alignment and size of its child
5330
533190.1 Overview
5332=============
5333
5334The '<gtk-alignment>' widget controls the alignment and size of its
5335child widget.  It has four settings: xscale, yscale, xalign, and yalign.
5336
5337   The scale settings are used to specify how much the child widget
5338should expand to fill the space allocated to the '<gtk-alignment>'.  The
5339values can range from 0 (meaning the child doesn't expand at all) to 1
5340(meaning the child expands to fill all of the available space).
5341
5342   The align settings are used to place the child widget within the
5343available area.  The values range from 0 (top or left) to 1 (bottom or
5344right).  Of course, if the scale settings are both set to 1, the
5345alignment settings have no effect.
5346
534790.2 Usage
5348==========
5349
5350 -- Class: <gtk-alignment>
5351     Derives from '<gtk-bin>'.
5352
5353     This class defines the following slots:
5354
5355     'xalign'
5356          Horizontal position of child in available space.  0.0 is left
5357          aligned, 1.0 is right aligned
5358
5359     'yalign'
5360          Vertical position of child in available space.  0.0 is top
5361          aligned, 1.0 is bottom aligned
5362
5363     'xscale'
5364          If available horizontal space is bigger than needed for the
5365          child, how much of it to use for the child.  0.0 means none,
5366          1.0 means all
5367
5368     'yscale'
5369          If available vertical space is bigger than needed for the
5370          child, how much of it to use for the child.  0.0 means none,
5371          1.0 means all
5372
5373     'top-padding'
5374          The padding to insert at the top of the widget.
5375
5376     'bottom-padding'
5377          The padding to insert at the bottom of the widget.
5378
5379     'left-padding'
5380          The padding to insert at the left of the widget.
5381
5382     'right-padding'
5383          The padding to insert at the right of the widget.
5384
5385 -- Function: gtk-alignment-new (xalign 'float') (yalign 'float')
5386          (xscale 'float') (yscale 'float') =>  (ret '<gtk-widget>')
5387     Creates a new '<gtk-alignment>'.
5388
5389     XALIGN
5390          the horizontal alignment of the child widget, from 0 (left) to
5391          1 (right).
5392
5393     YALIGN
5394          the vertical alignment of the child widget, from 0 (top) to 1
5395          (bottom).
5396
5397     XSCALE
5398          the amount that the child widget expands horizontally to fill
5399          up unused space, from 0 to 1.  A value of 0 indicates that the
5400          child widget should never expand.  A value of 1 indicates that
5401          the child widget will expand to fill all of the space
5402          allocated for the '<gtk-alignment>'.
5403
5404     YSCALE
5405          the amount that the child widget expands vertically to fill up
5406          unused space, from 0 to 1.  The values are similar to XSCALE.
5407
5408     RET
5409          the new '<gtk-alignment>'.
5410
5411 -- Function: gtk-alignment-set (self '<gtk-alignment>')
5412          (xalign 'float') (yalign 'float') (xscale 'float')
5413          (yscale 'float')
5414 -- Method: set
5415     Sets the '<gtk-alignment>' values.
5416
5417     ALIGNMENT
5418          a '<gtk-alignment>'.
5419
5420     XALIGN
5421          the horizontal alignment of the child widget, from 0 (left) to
5422          1 (right).
5423
5424     YALIGN
5425          the vertical alignment of the child widget, from 0 (top) to 1
5426          (bottom).
5427
5428     XSCALE
5429          the amount that the child widget expands horizontally to fill
5430          up unused space, from 0 to 1.  A value of 0 indicates that the
5431          child widget should never expand.  A value of 1 indicates that
5432          the child widget will expand to fill all of the space
5433          allocated for the '<gtk-alignment>'.
5434
5435     YSCALE
5436          the amount that the child widget expands vertically to fill up
5437          unused space, from 0 to 1.  The values are similar to XSCALE.
5438
5439 -- Function: gtk-alignment-get-padding (self '<gtk-alignment>') =>
5440          (padding_top 'unsigned-int') (padding_bottom 'unsigned-int')
5441          (padding_left 'unsigned-int') (padding_right 'unsigned-int')
5442 -- Method: get-padding
5443     Gets the padding on the different sides of the widget.  See
5444     'gtk-alignment-set-padding'.
5445
5446     ALIGNMENT
5447          a '<gtk-alignment>'
5448
5449     PADDING-TOP
5450          location to store the padding for the top of the widget, or
5451          ''#f''
5452
5453     PADDING-BOTTOM
5454          location to store the padding for the bottom of the widget, or
5455          ''#f''
5456
5457     PADDING-LEFT
5458          location to store the padding for the left of the widget, or
5459          ''#f''
5460
5461     PADDING-RIGHT
5462          location to store the padding for the right of the widget, or
5463          ''#f''
5464
5465     Since 2.4
5466
5467 -- Function: gtk-alignment-set-padding (self '<gtk-alignment>')
5468          (padding_top 'unsigned-int') (padding_bottom 'unsigned-int')
5469          (padding_left 'unsigned-int') (padding_right 'unsigned-int')
5470 -- Method: set-padding
5471     Sets the padding on the different sides of the widget.  The padding
5472     adds blank space to the sides of the widget.  For instance, this
5473     can be used to indent the child widget towards the right by adding
5474     padding on the left.
5475
5476     ALIGNMENT
5477          a '<gtk-alignment>'
5478
5479     PADDING-TOP
5480          the padding at the top of the widget
5481
5482     PADDING-BOTTOM
5483          the padding at the bottom of the widget
5484
5485     PADDING-LEFT
5486          the padding at the left of the widget
5487
5488     PADDING-RIGHT
5489          the padding at the right of the widget.
5490
5491     Since 2.4
5492
5493
5494File: guile-gnome-gtk.info,  Node: GtkAspectFrame,  Next: GtkHBox,  Prev: GtkAlignment,  Up: Top
5495
549691 GtkAspectFrame
5497*****************
5498
5499A frame that constrains its child to a particular aspect ratio
5500
550191.1 Overview
5502=============
5503
5504The '<gtk-aspect-frame>' is useful when you want pack a widget so that
5505it can resize but always retains the same aspect ratio.  For instance,
5506one might be drawing a small preview of a larger image.
5507'<gtk-aspect-frame>' derives from '<gtk-frame>', so it can draw a label
5508and a frame around the child.  The frame will be "shrink-wrapped" to the
5509size of the child.
5510
551191.2 Usage
5512==========
5513
5514 -- Class: <gtk-aspect-frame>
5515     Derives from '<gtk-frame>'.
5516
5517     This class defines the following slots:
5518
5519     'xalign'
5520          X alignment of the child
5521
5522     'yalign'
5523          Y alignment of the child
5524
5525     'ratio'
5526          Aspect ratio if obey_child is FALSE
5527
5528     'obey-child'
5529          Force aspect ratio to match that of the frame's child
5530
5531 -- Function: gtk-aspect-frame-new (label 'mchars') (xalign 'float')
5532          (yalign 'float') (ratio 'float') (obey_child 'bool') =>
5533          (ret '<gtk-widget>')
5534     Create a new '<gtk-aspect-frame>'.
5535
5536     LABEL
5537          Label text.
5538
5539     XALIGN
5540          Horizontal alignment of the child within the allocation of the
5541          '<gtk-aspect-frame>'.  This ranges from 0.0 (left aligned) to
5542          1.0 (right aligned)
5543
5544     YALIGN
5545          Vertical alignment of the child within the allocation of the
5546          '<gtk-aspect-frame>'.  This ranges from 0.0 (left aligned) to
5547          1.0 (right aligned)
5548
5549     RATIO
5550          The desired aspect ratio.
5551
5552     OBEY-CHILD
5553          If ''#t'', RATIO is ignored, and the aspect ratio is taken
5554          from the requistion of the child.
5555
5556     RET
5557          the new '<gtk-aspect-frame>'.
5558
5559 -- Function: gtk-aspect-frame-set (self '<gtk-aspect-frame>')
5560          (xalign 'float') (yalign 'float') (ratio 'float')
5561          (obey_child 'bool')
5562 -- Method: set
5563     Set parameters for an existing '<gtk-aspect-frame>'.
5564
5565     ASPECT-FRAME
5566          a '<gtk-aspect-frame>'
5567
5568     XALIGN
5569          Horizontal alignment of the child within the allocation of the
5570          '<gtk-aspect-frame>'.  This ranges from 0.0 (left aligned) to
5571          1.0 (right aligned)
5572
5573     YALIGN
5574          Vertical alignment of the child within the allocation of the
5575          '<gtk-aspect-frame>'.  This ranges from 0.0 (left aligned) to
5576          1.0 (right aligned)
5577
5578     RATIO
5579          The desired aspect ratio.
5580
5581     OBEY-CHILD
5582          If ''#t'', RATIO is ignored, and the aspect ratio is taken
5583          from the requistion of the child.
5584
5585
5586File: guile-gnome-gtk.info,  Node: GtkHBox,  Next: GtkVBox,  Prev: GtkAspectFrame,  Up: Top
5587
558892 GtkHBox
5589**********
5590
5591A horizontal container box
5592
559392.1 Overview
5594=============
5595
5596GtkHBox is a container that organizes child widgets into a single row.
5597
5598   Use the '<gtk-box>' packing interface to determine the arrangement,
5599spacing, width, and alignment of GtkHBox children.
5600
5601   All children are allocated the same height.
5602
560392.2 Usage
5604==========
5605
5606 -- Class: <gtk-hbox>
5607     Derives from '<gtk-box>'.
5608
5609     This class defines no direct slots.
5610
5611 -- Function: gtk-hbox-new (homogeneous 'bool') (spacing 'int') =>
5612          (ret '<gtk-widget>')
5613     Creates a new GtkHBox.
5614
5615     HOMOGENEOUS
5616          ''#t'' if all children are to be given equal space allotments.
5617
5618     SPACING
5619          the number of pixels to place by default between children.
5620
5621     RET
5622          a new GtkHBox.
5623
5624
5625File: guile-gnome-gtk.info,  Node: GtkVBox,  Next: GtkHButtonBox,  Prev: GtkHBox,  Up: Top
5626
562793 GtkVBox
5628**********
5629
5630A vertical container box
5631
563293.1 Overview
5633=============
5634
5635GtkVBox is a container that organizes child widgets into a single
5636column.
5637
5638   Use the '<gtk-box>' packing interface to determine the arrangement,
5639spacing, height, and alignment of GtkVBox children.
5640
5641   All children are allocated the same width.
5642
564393.2 Usage
5644==========
5645
5646 -- Class: <gtk-vbox>
5647     Derives from '<gtk-box>'.
5648
5649     This class defines no direct slots.
5650
5651 -- Function: gtk-vbox-new (homogeneous 'bool') (spacing 'int') =>
5652          (ret '<gtk-widget>')
5653     Creates a new GtkVBox.
5654
5655     HOMOGENEOUS
5656          ''#t'' if all children are to be given equal space allotments.
5657
5658     SPACING
5659          the number of pixels to place by default between children.
5660
5661     RET
5662          a new GtkVBox.
5663
5664
5665File: guile-gnome-gtk.info,  Node: GtkHButtonBox,  Next: GtkVButtonBox,  Prev: GtkVBox,  Up: Top
5666
566794 GtkHButtonBox
5668****************
5669
5670A container for arranging buttons horizontally
5671
567294.1 Overview
5673=============
5674
5675A button box should be used to provide a consistent layout of buttons
5676throughout your application.  The layout/spacing can be altered by the
5677programmer, or if desired, by the user to alter the 'feel' of a program
5678to a small degree.
5679
5680   A '<gtk-hbutton-box>' is created with 'gtk-hbutton-box-new'.  Buttons
5681are packed into a button box the same way widgets are added to any other
5682container, using 'gtk-container-add'.  You can also use
5683'gtk-box-pack-start' or 'gtk-box-pack-end', but for button boxes both
5684these functions work just like 'gtk-container-add', ie., they pack the
5685button in a way that depends on the current layout style and on whether
5686the button has had 'gtk-button-box-set-child-secondary' called on it.
5687
5688   The spacing between buttons can be set with 'gtk-box-set-spacing'.
5689The arrangement and layout of the buttons can be changed with
5690'gtk-button-box-set-layout'.
5691
569294.2 Usage
5693==========
5694
5695 -- Class: <gtk-hbutton-box>
5696     Derives from '<gtk-button-box>'.
5697
5698     This class defines no direct slots.
5699
5700 -- Function: gtk-hbutton-box-new =>  (ret '<gtk-widget>')
5701     Creates a new horizontal button box.
5702
5703     RET
5704          a new button box '<gtk-widget>'.
5705
5706
5707File: guile-gnome-gtk.info,  Node: GtkVButtonBox,  Next: GtkFixed,  Prev: GtkHButtonBox,  Up: Top
5708
570995 GtkVButtonBox
5710****************
5711
5712A container for arranging buttons vertically
5713
571495.1 Overview
5715=============
5716
5717A button box should be used to provide a consistent layout of buttons
5718throughout your application.  The layout/spacing can be altered by the
5719programmer, or if desired, by the user to alter the 'feel' of a program
5720to a small degree.
5721
5722   A '<gtk-vbutton-box>' is created with 'gtk-vbutton-box-new'.  Buttons
5723are packed into a button box the same way widgets are added to any other
5724container, using 'gtk-container-add'.  You can also use
5725'gtk-box-pack-start' or 'gtk-box-pack-end', but for button boxes both
5726these functions work just like 'gtk-container-add', ie., they pack the
5727button in a way that depends on the current layout style and on whether
5728the button has had 'gtk-button-box-set-child-secondary' called on it.
5729
5730   The spacing between buttons can be set with 'gtk-box-set-spacing'.
5731The arrangement and layout of the buttons can be changed with
5732'gtk-button-box-set-layout'.
5733
573495.2 Usage
5735==========
5736
5737 -- Class: <gtk-vbutton-box>
5738     Derives from '<gtk-button-box>'.
5739
5740     This class defines no direct slots.
5741
5742 -- Function: gtk-vbutton-box-new =>  (ret '<gtk-widget>')
5743     Creates a new vertical button box.
5744
5745     RET
5746          a new button box '<gtk-widget>'.
5747
5748
5749File: guile-gnome-gtk.info,  Node: GtkFixed,  Next: GtkHPaned,  Prev: GtkVButtonBox,  Up: Top
5750
575196 GtkFixed
5752***********
5753
5754A container which allows you to position widgets at fixed coordinates
5755
575696.1 Overview
5757=============
5758
5759The '<gtk-fixed>' widget is a container which can place child widgets at
5760fixed positions and with fixed sizes, given in pixels.  '<gtk-fixed>'
5761performs no automatic layout management.
5762
5763   For most applications, you should not use this container!  It keeps
5764you from having to learn about the other GTK+ containers, but it results
5765in broken applications.  With '<gtk-fixed>', the following things will
5766result in truncated text, overlapping widgets, and other display bugs:
5767
5768   Themes, which may change widget sizes.
5769
5770   Fonts other than the one you used to write the app will of course
5771change the size of widgets containing text; keep in mind that users may
5772use a larger font because of difficulty reading the default, or they may
5773be using Windows or the framebuffer port of GTK+, where different fonts
5774are available.
5775
5776   Translation of text into other languages changes its size.  Also,
5777display of non-English text will use a different font in many cases.
5778
5779   In addition, the fixed widget can't properly be mirrored in
5780right-to-left languages such as Hebrew and Arabic.  i.e.  normally GTK+
5781will flip the interface to put labels to the right of the thing they
5782label, but it can't do that with '<gtk-fixed>'.  So your application
5783will not be usable in right-to-left languages.
5784
5785   Finally, fixed positioning makes it kind of annoying to add/remove
5786GUI elements, since you have to reposition all the other elements.  This
5787is a long-term maintenance problem for your application.
5788
5789   If you know none of these things are an issue for your application,
5790and prefer the simplicity of '<gtk-fixed>', by all means use the widget.
5791But you should be aware of the tradeoffs.
5792
579396.2 Usage
5794==========
5795
5796 -- Class: <gtk-fixed>
5797     Derives from '<gtk-container>'.
5798
5799     This class defines no direct slots.
5800
5801 -- Function: gtk-fixed-new =>  (ret '<gtk-widget>')
5802     Creates a new '<gtk-fixed>'.
5803
5804     RET
5805          a new '<gtk-fixed>'.
5806
5807 -- Function: gtk-fixed-put (self '<gtk-fixed>') (widget '<gtk-widget>')
5808          (x 'int') (y 'int')
5809 -- Method: put
5810     Adds a widget to a '<gtk-fixed>' container at the given position.
5811
5812     FIXED
5813          a '<gtk-fixed>'.
5814
5815     WIDGET
5816          the widget to add.
5817
5818     X
5819          the horizontal position to place the widget at.
5820
5821     Y
5822          the vertical position to place the widget at.
5823
5824 -- Function: gtk-fixed-move (self '<gtk-fixed>')
5825          (widget '<gtk-widget>') (x 'int') (y 'int')
5826 -- Method: move
5827     Moves a child of a '<gtk-fixed>' container to the given position.
5828
5829     FIXED
5830          a '<gtk-fixed>'.
5831
5832     WIDGET
5833          the child widget.
5834
5835     X
5836          the horizontal position to move the widget to.
5837
5838     Y
5839          the vertical position to move the widget to.
5840
5841 -- Function: gtk-fixed-get-has-window (self '<gtk-fixed>') =>
5842          (ret 'bool')
5843 -- Method: get-has-window
5844     Gets whether the '<gtk-fixed>' has its own '<gdk-window>'.  See
5845     'gdk-fixed-set-has-window'.
5846
5847     FIXED
5848          a '<gtk-widget>'
5849
5850     RET
5851          ''#t'' if FIXED has its own window.
5852
5853 -- Function: gtk-fixed-set-has-window (self '<gtk-fixed>')
5854          (has_window 'bool')
5855 -- Method: set-has-window
5856     Sets whether a '<gtk-fixed>' widget is created with a separate
5857     '<gdk-window>' for WIDGET->WINDOW or not.  (By default, it will be
5858     created with no separate '<gdk-window>').  This function must be
5859     called while the '<gtk-fixed>' is not realized, for instance,
5860     immediately after the window is created.
5861
5862     This function was added to provide an easy migration path for older
5863     applications which may expect '<gtk-fixed>' to have a separate
5864     window.
5865
5866     FIXED
5867          a '<gtk-fixed>'
5868
5869     HAS-WINDOW
5870          ''#t'' if a separate window should be created
5871
5872
5873File: guile-gnome-gtk.info,  Node: GtkHPaned,  Next: GtkVPaned,  Prev: GtkFixed,  Up: Top
5874
587597 GtkHPaned
5876************
5877
5878A container with two panes arranged horizontally
5879
588097.1 Overview
5881=============
5882
5883The HPaned widget is a container widget with two children arranged
5884horizontally.  The division between the two panes is adjustable by the
5885user by dragging a handle.  See '<gtk-paned>' for details.
5886
588797.2 Usage
5888==========
5889
5890 -- Class: <gtk-hpaned>
5891     Derives from '<gtk-paned>'.
5892
5893     This class defines no direct slots.
5894
5895 -- Function: gtk-hpaned-new =>  (ret '<gtk-widget>')
5896     Create a new '<gtk-hpaned>'
5897
5898     RET
5899          the new '<gtk-hpaned>'
5900
5901
5902File: guile-gnome-gtk.info,  Node: GtkVPaned,  Next: GtkLayout,  Prev: GtkHPaned,  Up: Top
5903
590498 GtkVPaned
5905************
5906
5907A container with two panes arranged vertically
5908
590998.1 Overview
5910=============
5911
5912The VPaned widget is a container widget with two children arranged
5913vertically.  The division between the two panes is adjustable by the
5914user by dragging a handle.  See '<gtk-paned>' for details.
5915
591698.2 Usage
5917==========
5918
5919 -- Class: <gtk-vpaned>
5920     Derives from '<gtk-paned>'.
5921
5922     This class defines no direct slots.
5923
5924 -- Function: gtk-vpaned-new =>  (ret '<gtk-widget>')
5925     Create a new '<gtk-vpaned>'
5926
5927     RET
5928          the new '<gtk-vpaned>'
5929
5930
5931File: guile-gnome-gtk.info,  Node: GtkLayout,  Next: GtkNotebook,  Prev: GtkVPaned,  Up: Top
5932
593399 GtkLayout
5934************
5935
5936Infinite scrollable area containing child widgets and/or custom drawing
5937
593899.1 Overview
5939=============
5940
5941'<gtk-layout>' is similar to '<gtk-drawing-area>' in that it's a "blank
5942slate" and doesn't do anything but paint a blank background by default.
5943It's different in that it supports scrolling natively (you can add it to
5944a '<gtk-scrolled-window>'), and it can contain child widgets, since it's
5945a '<gtk-container>'.  However if you're just going to draw, a
5946'<gtk-drawing-area>' is a better choice since it has lower overhead.
5947
5948   When handling expose events on a '<gtk-layout>', you must draw to
5949GTK_LAYOUT (layout)->bin_window, rather than to GTK_WIDGET
5950(layout)->window, as you would for a drawing area.
5951
595299.2 Usage
5953==========
5954
5955 -- Class: <gtk-layout>
5956     Derives from '<gtk-container>'.
5957
5958     This class defines the following slots:
5959
5960     'hadjustment'
5961          The GtkAdjustment for the horizontal position
5962
5963     'vadjustment'
5964          The GtkAdjustment for the vertical position
5965
5966     'width'
5967          The width of the layout
5968
5969     'height'
5970          The height of the layout
5971
5972 -- Signal on <gtk-layout>: set-scroll-adjustments
5973          (arg0 '<gtk-adjustment>') (arg1 '<gtk-adjustment>')
5974
5975 -- Function: gtk-layout-new (hadjustment '<gtk-adjustment>')
5976          (vadjustment '<gtk-adjustment>') =>  (ret '<gtk-widget>')
5977     Creates a new '<gtk-layout>'.  Unless you have a specific
5978     adjustment you'd like the layout to use for scrolling, pass ''#f''
5979     for HADJUSTMENT and VADJUSTMENT.
5980
5981     HADJUSTMENT
5982          horizontal scroll adjustment, or ''#f''
5983
5984     VADJUSTMENT
5985          vertical scroll adjustment, or ''#f''
5986
5987     RET
5988          a new '<gtk-layout>'
5989
5990 -- Function: gtk-layout-put (self '<gtk-layout>')
5991          (child_widget '<gtk-widget>') (x 'int') (y 'int')
5992 -- Method: put
5993     Adds CHILD-WIDGET to LAYOUT, at position (X,Y).  LAYOUT becomes the
5994     new parent container of CHILD-WIDGET.
5995
5996     LAYOUT
5997          a '<gtk-layout>'
5998
5999     CHILD-WIDGET
6000          child widget
6001
6002     X
6003          X position of child widget
6004
6005     Y
6006          Y position of child widget
6007
6008 -- Function: gtk-layout-move (self '<gtk-layout>')
6009          (child_widget '<gtk-widget>') (x 'int') (y 'int')
6010 -- Method: move
6011     Moves a current child of LAYOUT to a new position.
6012
6013     LAYOUT
6014          a '<gtk-layout>'
6015
6016     CHILD-WIDGET
6017          a current child of LAYOUT
6018
6019     X
6020          X position to move to
6021
6022     Y
6023          Y position to move to
6024
6025 -- Function: gtk-layout-set-size (self '<gtk-layout>')
6026          (width 'unsigned-int') (height 'unsigned-int')
6027 -- Method: set-size
6028     Sets the size of the scrollable area of the layout.
6029
6030     LAYOUT
6031          a '<gtk-layout>'
6032
6033     WIDTH
6034          width of entire scrollable area
6035
6036     HEIGHT
6037          height of entire scrollable area
6038
6039 -- Function: gtk-layout-get-size (self '<gtk-layout>') =>
6040          (width 'unsigned-int') (height 'unsigned-int')
6041 -- Method: get-size
6042     Gets the size that has been set on the layout, and that determines
6043     the total extents of the layout's scrollbar area.  See
6044     'gtk-layout-set-size'.
6045
6046     LAYOUT
6047          a '<gtk-layout>'
6048
6049     WIDTH
6050          location to store the width set on LAYOUT, or ''#f''
6051
6052     HEIGHT
6053          location to store the height set on LAYOUT, or ''#f''
6054
6055 -- Function: gtk-layout-get-hadjustment (self '<gtk-layout>') =>
6056          (ret '<gtk-adjustment>')
6057 -- Method: get-hadjustment
6058     This function should only be called after the layout has been
6059     placed in a '<gtk-scrolled-window>' or otherwise configured for
6060     scrolling.  It returns the '<gtk-adjustment>' used for
6061     communication between the horizontal scrollbar and LAYOUT.
6062
6063     See '<gtk-scrolled-window>', '<gtk-scrollbar>', '<gtk-adjustment>'
6064     for details.
6065
6066     LAYOUT
6067          a '<gtk-layout>'
6068
6069     RET
6070          horizontal scroll adjustment
6071
6072 -- Function: gtk-layout-get-vadjustment (self '<gtk-layout>') =>
6073          (ret '<gtk-adjustment>')
6074 -- Method: get-vadjustment
6075     This function should only be called after the layout has been
6076     placed in a '<gtk-scrolled-window>' or otherwise configured for
6077     scrolling.  It returns the '<gtk-adjustment>' used for
6078     communication between the vertical scrollbar and LAYOUT.
6079
6080     See '<gtk-scrolled-window>', '<gtk-scrollbar>', '<gtk-adjustment>'
6081     for details.
6082
6083     LAYOUT
6084          a '<gtk-layout>'
6085
6086     RET
6087          vertical scroll adjustment
6088
6089 -- Function: gtk-layout-set-hadjustment (self '<gtk-layout>')
6090          (adjustment '<gtk-adjustment>')
6091 -- Method: set-hadjustment
6092     Sets the horizontal scroll adjustment for the layout.
6093
6094     See '<gtk-scrolled-window>', '<gtk-scrollbar>', '<gtk-adjustment>'
6095     for details.
6096
6097     LAYOUT
6098          a '<gtk-layout>'
6099
6100     ADJUSTMENT
6101          new scroll adjustment
6102
6103 -- Function: gtk-layout-set-vadjustment (self '<gtk-layout>')
6104          (adjustment '<gtk-adjustment>')
6105 -- Method: set-vadjustment
6106     Sets the vertical scroll adjustment for the layout.
6107
6108     See '<gtk-scrolled-window>', '<gtk-scrollbar>', '<gtk-adjustment>'
6109     for details.
6110
6111     LAYOUT
6112          a '<gtk-layout>'
6113
6114     ADJUSTMENT
6115          new scroll adjustment
6116
6117
6118File: guile-gnome-gtk.info,  Node: GtkNotebook,  Next: GtkTable,  Prev: GtkLayout,  Up: Top
6119
6120100 GtkNotebook
6121***************
6122
6123A tabbed notebook container
6124
6125100.1 Overview
6126==============
6127
6128The '<gtk-notebook>' widget is a '<gtk-container>' whose children are
6129pages that can be switched between using tab labels along one edge.
6130
6131   There are many configuration options for '<gtk-notebook>'.  Among
6132other things, you can choose on which edge the tabs appear (see
6133'gtk-notebook-set-tab-pos'), whether, if there are too many tabs to fit
6134the noteobook should be made bigger or scrolling arrows added (see
6135gtk_notebook_set_scrollable), and whether there will be a popup menu
6136allowing the users to switch pages.  (see 'gtk-notebook-enable-popup',
6137'gtk-noteobook-disable-popup')
6138
6139100.2 Usage
6140===========
6141
6142 -- Class: <gtk-notebook>
6143     Derives from '<gtk-container>'.
6144
6145     This class defines the following slots:
6146
6147     'tab-pos'
6148          Which side of the notebook holds the tabs
6149
6150     'show-tabs'
6151          Whether tabs should be shown or not
6152
6153     'show-border'
6154          Whether the border should be shown or not
6155
6156     'scrollable'
6157          If TRUE, scroll arrows are added if there are too many tabs to
6158          fit
6159
6160     'tab-border'
6161          Width of the border around the tab labels
6162
6163     'tab-hborder'
6164          Width of the horizontal border of tab labels
6165
6166     'tab-vborder'
6167          Width of the vertical border of tab labels
6168
6169     'page'
6170          The index of the current page
6171
6172     'enable-popup'
6173          If TRUE, pressing the right mouse button on the notebook pops
6174          up a menu that you can use to go to a page
6175
6176     'group-id'
6177          Group ID for tabs drag and drop
6178
6179     'group'
6180          Group for tabs drag and drop
6181
6182     'homogeneous'
6183          Whether tabs should have homogeneous sizes
6184
6185 -- Signal on <gtk-notebook>: switch-page (arg0 '<gpointer>')
6186          (arg1 '<guint>')
6187     Emitted when the user or a function changes the current page.
6188
6189 -- Signal on <gtk-notebook>: focus-tab (arg0 '<gtk-notebook-tab>')
6190          => '<gboolean>'
6191
6192 -- Signal on <gtk-notebook>: select-page (arg0 '<gboolean>')
6193          => '<gboolean>'
6194
6195 -- Signal on <gtk-notebook>: change-current-page (arg0 '<gint>')
6196          => '<gboolean>'
6197
6198 -- Signal on <gtk-notebook>: move-focus-out
6199          (arg0 '<gtk-direction-type>')
6200
6201 -- Signal on <gtk-notebook>: reorder-tab (arg0 '<gtk-direction-type>')
6202          (arg1 '<gboolean>') => '<gboolean>'
6203
6204 -- Signal on <gtk-notebook>: page-reordered (arg0 '<gtk-widget>')
6205          (arg1 '<guint>')
6206     the ::page-reordered signal is emitted in the notebook right after
6207     a page has been reordered.
6208
6209     Since 2.10
6210
6211 -- Signal on <gtk-notebook>: page-removed (arg0 '<gtk-widget>')
6212          (arg1 '<guint>')
6213     the ::page-removed signal is emitted in the notebook right after a
6214     page is removed from the notebook.
6215
6216     Since 2.10
6217
6218 -- Signal on <gtk-notebook>: page-added (arg0 '<gtk-widget>')
6219          (arg1 '<guint>')
6220     the ::page-added signal is emitted in the notebook right after a
6221     page is added to the notebook.
6222
6223     Since 2.10
6224
6225 -- Signal on <gtk-notebook>: create-window (arg0 '<gtk-widget>')
6226          (arg1 '<gint>') (arg2 '<gint>') => '<gtk-notebook>'
6227     undocumented
6228
6229 -- Function: gtk-notebook-new =>  (ret '<gtk-widget>')
6230     Creates a new '<gtk-notebook>' widget with no pages.
6231
6232     RET
6233          the newly created '<gtk-notebook>'
6234
6235 -- Function: gtk-notebook-append-page (self '<gtk-notebook>')
6236          (child '<gtk-widget>') (tab_label '<gtk-widget>') =>
6237          (ret 'int')
6238 -- Method: append-page
6239     Appends a page to NOTEBOOK.
6240
6241     NOTEBOOK
6242          a '<gtk-notebook>'
6243
6244     CHILD
6245          the '<gtk-widget>' to use as the contents of the page.
6246
6247     TAB-LABEL
6248          the '<gtk-widget>' to be used as the label for the page, or
6249          ''#f'' to use the default label, 'page N'.
6250
6251     RET
6252          the index (starting from 0) of the appended page in the
6253          notebook, or -1 if function fails
6254
6255 -- Function: gtk-notebook-append-page-menu (self '<gtk-notebook>')
6256          (child '<gtk-widget>') (tab_label '<gtk-widget>')
6257          (menu_label '<gtk-widget>') =>  (ret 'int')
6258 -- Method: append-page-menu
6259     Appends a page to NOTEBOOK, specifying the widget to use as the
6260     label in the popup menu.
6261
6262     NOTEBOOK
6263          a '<gtk-notebook>'
6264
6265     CHILD
6266          the '<gtk-widget>' to use as the contents of the page.
6267
6268     TAB-LABEL
6269          the '<gtk-widget>' to be used as the label for the page, or
6270          ''#f'' to use the default label, 'page N'.
6271
6272     MENU-LABEL
6273          the widget to use as a label for the page-switch menu, if that
6274          is enabled.  If ''#f'', and TAB-LABEL is a '<gtk-label>' or
6275          ''#f'', then the menu label will be a newly created label with
6276          the same text as TAB-LABEL; If TAB-LABEL is not a
6277          '<gtk-label>', MENU-LABEL must be specified if the page-switch
6278          menu is to be used.
6279
6280     RET
6281          the index (starting from 0) of the appended page in the
6282          notebook, or -1 if function fails
6283
6284 -- Function: gtk-notebook-prepend-page (self '<gtk-notebook>')
6285          (child '<gtk-widget>') (tab_label '<gtk-widget>') =>
6286          (ret 'int')
6287 -- Method: prepend-page
6288     Prepends a page to NOTEBOOK.
6289
6290     NOTEBOOK
6291          a '<gtk-notebook>'
6292
6293     CHILD
6294          the '<gtk-widget>' to use as the contents of the page.
6295
6296     TAB-LABEL
6297          the '<gtk-widget>' to be used as the label for the page, or
6298          ''#f'' to use the default label, 'page N'.
6299
6300     RET
6301          the index (starting from 0) of the prepended page in the
6302          notebook, or -1 if function fails
6303
6304 -- Function: gtk-notebook-prepend-page-menu (self '<gtk-notebook>')
6305          (child '<gtk-widget>') (tab_label '<gtk-widget>')
6306          (menu_label '<gtk-widget>') =>  (ret 'int')
6307 -- Method: prepend-page-menu
6308     Prepends a page to NOTEBOOK, specifying the widget to use as the
6309     label in the popup menu.
6310
6311     NOTEBOOK
6312          a '<gtk-notebook>'
6313
6314     CHILD
6315          the '<gtk-widget>' to use as the contents of the page.
6316
6317     TAB-LABEL
6318          the '<gtk-widget>' to be used as the label for the page, or
6319          ''#f'' to use the default label, 'page N'.
6320
6321     MENU-LABEL
6322          the widget to use as a label for the page-switch menu, if that
6323          is enabled.  If ''#f'', and TAB-LABEL is a '<gtk-label>' or
6324          ''#f'', then the menu label will be a newly created label with
6325          the same text as TAB-LABEL; If TAB-LABEL is not a
6326          '<gtk-label>', MENU-LABEL must be specified if the page-switch
6327          menu is to be used.
6328
6329     RET
6330          the index (starting from 0) of the prepended page in the
6331          notebook, or -1 if function fails
6332
6333 -- Function: gtk-notebook-insert-page (self '<gtk-notebook>')
6334          (child '<gtk-widget>') (tab_label '<gtk-widget>')
6335          (position 'int') =>  (ret 'int')
6336 -- Method: insert-page
6337     Insert a page into NOTEBOOK at the given position.
6338
6339     NOTEBOOK
6340          a '<gtk-notebook>'
6341
6342     CHILD
6343          the '<gtk-widget>' to use as the contents of the page.
6344
6345     TAB-LABEL
6346          the '<gtk-widget>' to be used as the label for the page, or
6347          ''#f'' to use the default label, 'page N'.
6348
6349     POSITION
6350          the index (starting at 0) at which to insert the page, or -1
6351          to append the page after all other pages.
6352
6353     RET
6354          the index (starting from 0) of the inserted page in the
6355          notebook, or -1 if function fails
6356
6357 -- Function: gtk-notebook-insert-page-menu (self '<gtk-notebook>')
6358          (child '<gtk-widget>') (tab_label '<gtk-widget>')
6359          (menu_label '<gtk-widget>') (position 'int') =>  (ret 'int')
6360 -- Method: insert-page-menu
6361     Insert a page into NOTEBOOK at the given position, specifying the
6362     widget to use as the label in the popup menu.
6363
6364     NOTEBOOK
6365          a '<gtk-notebook>'
6366
6367     CHILD
6368          the '<gtk-widget>' to use as the contents of the page.
6369
6370     TAB-LABEL
6371          the '<gtk-widget>' to be used as the label for the page, or
6372          ''#f'' to use the default label, 'page N'.
6373
6374     MENU-LABEL
6375          the widget to use as a label for the page-switch menu, if that
6376          is enabled.  If ''#f'', and TAB-LABEL is a '<gtk-label>' or
6377          ''#f'', then the menu label will be a newly created label with
6378          the same text as TAB-LABEL; If TAB-LABEL is not a
6379          '<gtk-label>', MENU-LABEL must be specified if the page-switch
6380          menu is to be used.
6381
6382     POSITION
6383          the index (starting at 0) at which to insert the page, or -1
6384          to append the page after all other pages.
6385
6386     RET
6387          the index (starting from 0) of the inserted page in the
6388          notebook
6389
6390 -- Function: gtk-notebook-remove-page (self '<gtk-notebook>')
6391          (page_num 'int')
6392 -- Method: remove-page
6393     Removes a page from the notebook given its index in the notebook.
6394
6395     NOTEBOOK
6396          a '<gtk-notebook>'.
6397
6398     PAGE-NUM
6399          the index of a notebook page, starting from 0.  If -1, the
6400          last page will be removed.
6401
6402 -- Function: gtk-notebook-page-num (self '<gtk-notebook>')
6403          (child '<gtk-widget>') =>  (ret 'int')
6404 -- Method: page-num
6405     Finds the index of the page which contains the given child widget.
6406
6407     NOTEBOOK
6408          a '<gtk-notebook>'
6409
6410     CHILD
6411          a '<gtk-widget>'
6412
6413     RET
6414          the index of the page containing CHILD, or -1 if CHILD is not
6415          in the notebook.
6416
6417 -- Function: gtk-notebook-next-page (self '<gtk-notebook>')
6418 -- Method: next-page
6419     Switches to the next page.  Nothing happens if the current page is
6420     the last page.
6421
6422     NOTEBOOK
6423          a '<gtk-notebook>'
6424
6425 -- Function: gtk-notebook-prev-page (self '<gtk-notebook>')
6426 -- Method: prev-page
6427     Switches to the previous page.  Nothing happens if the current page
6428     is the first page.
6429
6430     NOTEBOOK
6431          a '<gtk-notebook>'
6432
6433 -- Function: gtk-notebook-reorder-child (self '<gtk-notebook>')
6434          (child '<gtk-widget>') (position 'int')
6435 -- Method: reorder-child
6436     Reorders the page containing CHILD, so that it appears in position
6437     POSITION.  If POSITION is greater than or equal to the number of
6438     children in the list or negative, CHILD will be moved to the end of
6439     the list.
6440
6441     NOTEBOOK
6442          a '<gtk-notebook>'
6443
6444     CHILD
6445          the child to move
6446
6447     POSITION
6448          the new position, or -1 to move to the end
6449
6450 -- Function: gtk-notebook-set-tab-pos (self '<gtk-notebook>')
6451          (pos '<gtk-position-type>')
6452 -- Method: set-tab-pos
6453     Sets the edge at which the tabs for switching pages in the notebook
6454     are drawn.
6455
6456     NOTEBOOK
6457          a '<gtk-notebook>'.
6458
6459     POS
6460          the edge to draw the tabs at.
6461
6462 -- Function: gtk-notebook-set-show-tabs (self '<gtk-notebook>')
6463          (show_tabs 'bool')
6464 -- Method: set-show-tabs
6465     Sets whether to show the tabs for the notebook or not.
6466
6467     NOTEBOOK
6468          a '<gtk-notebook>'
6469
6470     SHOW-TABS
6471          ''#t'' if the tabs should be shown.
6472
6473 -- Function: gtk-notebook-set-show-border (self '<gtk-notebook>')
6474          (show_border 'bool')
6475 -- Method: set-show-border
6476     Sets whether a bevel will be drawn around the notebook pages.  This
6477     only has a visual effect when the tabs are not shown.  See
6478     'gtk-notebook-set-show-tabs'.
6479
6480     NOTEBOOK
6481          a '<gtk-notebook>'
6482
6483     SHOW-BORDER
6484          ''#t'' if a bevel should be drawn around the notebook.
6485
6486 -- Function: gtk-notebook-set-scrollable (self '<gtk-notebook>')
6487          (scrollable 'bool')
6488 -- Method: set-scrollable
6489     Sets whether the tab label area will have arrows for scrolling if
6490     there are too many tabs to fit in the area.
6491
6492     NOTEBOOK
6493          a '<gtk-notebook>'
6494
6495     SCROLLABLE
6496          ''#t'' if scroll arrows should be added
6497
6498 -- Function: gtk-notebook-popup-enable (self '<gtk-notebook>')
6499 -- Method: popup-enable
6500     Enables the popup menu: if the user clicks with the right mouse
6501     button on the bookmarks, a menu with all the pages will be popped
6502     up.
6503
6504     NOTEBOOK
6505          a '<gtk-notebook>'
6506
6507 -- Function: gtk-notebook-popup-disable (self '<gtk-notebook>')
6508 -- Method: popup-disable
6509     Disables the popup menu.
6510
6511     NOTEBOOK
6512          a '<gtk-notebook>'
6513
6514 -- Function: gtk-notebook-get-current-page (self '<gtk-notebook>') =>
6515          (ret 'int')
6516 -- Method: get-current-page
6517     Returns the page number of the current page.
6518
6519     NOTEBOOK
6520          a '<gtk-notebook>'
6521
6522     RET
6523          the index (starting from 0) of the current page in the
6524          notebook.  If the notebook has no pages, then -1 will be
6525          returned.
6526
6527 -- Function: gtk-notebook-get-menu-label (self '<gtk-notebook>')
6528          (child '<gtk-widget>') =>  (ret '<gtk-widget>')
6529 -- Method: get-menu-label
6530     Retrieves the menu label widget of the page containing CHILD.
6531
6532     NOTEBOOK
6533          a '<gtk-notebook>'
6534
6535     CHILD
6536          a widget contained in a page of NOTEBOOK
6537
6538     RET
6539          the menu label, or ''#f'' if the notebook page does not have a
6540          menu label other than the default (the tab label).
6541
6542 -- Function: gtk-notebook-get-nth-page (self '<gtk-notebook>')
6543          (page_num 'int') =>  (ret '<gtk-widget>')
6544 -- Method: get-nth-page
6545     Returns the child widget contained in page number PAGE-NUM.
6546
6547     NOTEBOOK
6548          a '<gtk-notebook>'
6549
6550     PAGE-NUM
6551          the index of a page in the noteobok, or -1 to get the last
6552          page.
6553
6554     RET
6555          the child widget, or ''#f'' if PAGE-NUM is out of bounds.
6556
6557 -- Function: gtk-notebook-get-n-pages (self '<gtk-notebook>') =>
6558          (ret 'int')
6559 -- Method: get-n-pages
6560     Gets the number of pages in a notebook.
6561
6562     NOTEBOOK
6563          a '<gtk-notebook>'
6564
6565     RET
6566          the number of pages in the notebook.
6567
6568     Since 2.2
6569
6570 -- Function: gtk-notebook-get-tab-label (self '<gtk-notebook>')
6571          (child '<gtk-widget>') =>  (ret '<gtk-widget>')
6572 -- Method: get-tab-label
6573     Returns the tab label widget for the page CHILD.  ''#f'' is
6574     returned if CHILD is not in NOTEBOOK or if no tab label has
6575     specifically been set for CHILD.
6576
6577     NOTEBOOK
6578          a '<gtk-notebook>'
6579
6580     CHILD
6581          the page
6582
6583     RET
6584          the tab label
6585
6586 -- Function: gtk-notebook-set-menu-label (self '<gtk-notebook>')
6587          (child '<gtk-widget>') (menu_label '<gtk-widget>')
6588 -- Method: set-menu-label
6589     Changes the menu label for the page containing CHILD.
6590
6591     NOTEBOOK
6592          a '<gtk-notebook>'
6593
6594     CHILD
6595          the child widget
6596
6597     MENU-LABEL
6598          the menu label, or NULL for default
6599
6600 -- Function: gtk-notebook-set-menu-label-text (self '<gtk-notebook>')
6601          (child '<gtk-widget>') (menu_text 'mchars')
6602 -- Method: set-menu-label-text
6603     Creates a new label and sets it as the menu label of CHILD.
6604
6605     NOTEBOOK
6606          a '<gtk-notebook>'
6607
6608     CHILD
6609          the child widget
6610
6611     MENU-TEXT
6612          the label text
6613
6614 -- Function: gtk-notebook-set-tab-label (self '<gtk-notebook>')
6615          (child '<gtk-widget>') (tab_label '<gtk-widget>')
6616 -- Method: set-tab-label
6617     Changes the tab label for CHILD.  If ''#f'' is specified for
6618     TAB-LABEL, then the page will have the label 'page N'.
6619
6620     NOTEBOOK
6621          a '<gtk-notebook>'
6622
6623     CHILD
6624          the page
6625
6626     TAB-LABEL
6627          the tab label widget to use, or ''#f'' for default tab label.
6628
6629 -- Function: gtk-notebook-set-tab-label-packing (self '<gtk-notebook>')
6630          (child '<gtk-widget>') (expand 'bool') (fill 'bool')
6631          (pack_type '<gtk-pack-type>')
6632 -- Method: set-tab-label-packing
6633     Sets the packing parameters for the tab label of the page
6634     containing CHILD.  See 'gtk-box-pack-start' for the exact meaning
6635     of the parameters.
6636
6637     NOTEBOOK
6638          a '<gtk-notebook>'
6639
6640     CHILD
6641          the child widget
6642
6643     EXPAND
6644          whether to expand the bookmark or not
6645
6646     FILL
6647          whether the bookmark should fill the allocated area or not
6648
6649     PACK-TYPE
6650          the position of the bookmark
6651
6652 -- Function: gtk-notebook-set-tab-label-text (self '<gtk-notebook>')
6653          (child '<gtk-widget>') (tab_text 'mchars')
6654 -- Method: set-tab-label-text
6655     Creates a new label and sets it as the tab label for the page
6656     containing CHILD.
6657
6658     NOTEBOOK
6659          a '<gtk-notebook>'
6660
6661     CHILD
6662          the page
6663
6664     TAB-TEXT
6665          the label text
6666
6667 -- Function: gtk-notebook-set-tab-reorderable (self '<gtk-notebook>')
6668          (child '<gtk-widget>') (reorderable 'bool')
6669 -- Method: set-tab-reorderable
6670     Sets whether the notebook tab can be reordered via drag and drop or
6671     not.
6672
6673     NOTEBOOK
6674          a '<gtk-notebook>'
6675
6676     CHILD
6677          a child '<gtk-widget>'
6678
6679     REORDERABLE
6680          whether the tab is reorderable or not.
6681
6682     Since 2.10
6683
6684 -- Function: gtk-notebook-set-tab-detachable (self '<gtk-notebook>')
6685          (child '<gtk-widget>') (detachable 'bool')
6686 -- Method: set-tab-detachable
6687     Sets whether the tab can be detached from NOTEBOOK to another
6688     notebook or widget.
6689
6690     Note that 2 notebooks must share a common group identificator (see
6691     'gtk-notebook-set-group-id') to allow automatic tabs interchange
6692     between them.
6693
6694     If you want a widget to interact with a notebook through DnD (i.e.:
6695     accept dragged tabs from it) it must be set as a drop destination
6696     and accept the target "GTK_NOTEBOOK_TAB". The notebook will fill
6697     the selection with a GtkWidget** pointing to the child widget that
6698     corresponds to the dropped tab.
6699
6700
6701           static void
6702           on_drop_zone_drag_data_received (GtkWidget        *widget,
6703                                            GdkDragContext   *context,
6704                                            gint              x,
6705                                            gint              y,
6706                                            GtkSelectionData *selection_data,
6707                                            guint             info,
6708                                            guint             time,
6709                                            gpointer          user_data)
6710           {
6711             GtkWidget *notebook;
6712             GtkWidget **child;
6713
6714             notebook = gtk_drag_get_source_widget (context);
6715             child = (void*) selection_data->data;
6716
6717             process_widget (*child);
6718             gtk_container_remove (GTK_CONTAINER (notebook), *child);
6719           }
6720
6721     If you want a notebook to accept drags from other widgets, you will
6722     have to set your own DnD code to do it.
6723
6724     NOTEBOOK
6725          a '<gtk-notebook>'
6726
6727     CHILD
6728          a child '<gtk-widget>'
6729
6730     DETACHABLE
6731          whether the tab is detachable or not
6732
6733     Since 2.10
6734
6735 -- Function: gtk-notebook-get-menu-label-text (self '<gtk-notebook>')
6736          (child '<gtk-widget>') =>  (ret 'mchars')
6737 -- Method: get-menu-label-text
6738     Retrieves the text of the menu label for the page containing CHILD.
6739
6740     NOTEBOOK
6741          a '<gtk-notebook>'
6742
6743     CHILD
6744          the child widget of a page of the notebook.
6745
6746     RET
6747          value: the text of the tab label, or ''#f'' if the widget does
6748          not have a menu label other than the default menu label, or
6749          the menu label widget is not a '<gtk-label>'.  The string is
6750          owned by the widget and must not be freed.
6751
6752 -- Function: gtk-notebook-get-scrollable (self '<gtk-notebook>') =>
6753          (ret 'bool')
6754 -- Method: get-scrollable
6755     Returns whether the tab label area has arrows for scrolling.  See
6756     'gtk-notebook-set-scrollable'.
6757
6758     NOTEBOOK
6759          a '<gtk-notebook>'
6760
6761     RET
6762          ''#t'' if arrows for scrolling are present
6763
6764 -- Function: gtk-notebook-get-show-border (self '<gtk-notebook>') =>
6765          (ret 'bool')
6766 -- Method: get-show-border
6767     Returns whether a bevel will be drawn around the notebook pages.
6768     See 'gtk-notebook-set-show-border'.
6769
6770     NOTEBOOK
6771          a '<gtk-notebook>'
6772
6773     RET
6774          ''#t'' if the bevel is drawn
6775
6776 -- Function: gtk-notebook-get-show-tabs (self '<gtk-notebook>') =>
6777          (ret 'bool')
6778 -- Method: get-show-tabs
6779     Returns whether the tabs of the notebook are shown.  See
6780     'gtk-notebook-set-show-tabs'.
6781
6782     NOTEBOOK
6783          a '<gtk-notebook>'
6784
6785     RET
6786          ''#t'' if the tabs are shown
6787
6788 -- Function: gtk-notebook-get-tab-label-text (self '<gtk-notebook>')
6789          (child '<gtk-widget>') =>  (ret 'mchars')
6790 -- Method: get-tab-label-text
6791     Retrieves the text of the tab label for the page containing CHILD.
6792
6793     NOTEBOOK
6794          a '<gtk-notebook>'
6795
6796     CHILD
6797          a widget contained in a page of NOTEBOOK
6798
6799     RET
6800          value: the text of the tab label, or ''#f'' if the tab label
6801          widget is not a '<gtk-label>'.  The string is owned by the
6802          widget and must not be freed.
6803
6804 -- Function: gtk-notebook-get-tab-pos (self '<gtk-notebook>') =>
6805          (ret '<gtk-position-type>')
6806 -- Method: get-tab-pos
6807     Gets the edge at which the tabs for switching pages in the notebook
6808     are drawn.
6809
6810     NOTEBOOK
6811          a '<gtk-notebook>'
6812
6813     RET
6814          the edge at which the tabs are drawn
6815
6816 -- Function: gtk-notebook-get-tab-reorderable (self '<gtk-notebook>')
6817          (child '<gtk-widget>') =>  (ret 'bool')
6818 -- Method: get-tab-reorderable
6819     Gets whether the tab can be reordered via drag and drop or not.
6820
6821     NOTEBOOK
6822          a '<gtk-notebook>'
6823
6824     CHILD
6825          a child '<gtk-widget>'
6826
6827     RET
6828          ''#t'' if the tab is reorderable.
6829
6830     Since 2.10
6831
6832 -- Function: gtk-notebook-get-tab-detachable (self '<gtk-notebook>')
6833          (child '<gtk-widget>') =>  (ret 'bool')
6834 -- Method: get-tab-detachable
6835     Returns whether the tab contents can be detached from NOTEBOOK.
6836
6837     NOTEBOOK
6838          a '<gtk-notebook>'
6839
6840     CHILD
6841          a child '<gtk-widget>'
6842
6843     RET
6844          TRUE if the tab is detachable.
6845
6846     Since 2.10
6847
6848 -- Function: gtk-notebook-set-current-page (self '<gtk-notebook>')
6849          (page_num 'int')
6850 -- Method: set-current-page
6851     Switches to the page number PAGE-NUM.
6852
6853     Note that due to historical reasons, GtkNotebook refuses to switch
6854     to a page unless the child widget is visible.  Therefore, it is
6855     recommended to show child widgets before adding them to a notebook.
6856
6857     NOTEBOOK
6858          a '<gtk-notebook>'
6859
6860     PAGE-NUM
6861          index of the page to switch to, starting from 0.  If negative,
6862          the last page will be used.  If greater than the number of
6863          pages in the notebook, nothing will be done.
6864
6865 -- Function: gtk-notebook-set-group-id (self '<gtk-notebook>')
6866          (group_id 'int')
6867 -- Method: set-group-id
6868     Sets an group identificator for NOTEBOOK, notebooks sharing the
6869     same group identificator will be able to exchange tabs via drag and
6870     drop.  A notebook with group identificator -1 will not be able to
6871     exchange tabs with any other notebook.
6872
6873     NOTEBOOK
6874          a '<gtk-notebook>'
6875
6876     GROUP-ID
6877          a group identificator, or -1 to unset it
6878
6879     Since 2.10
6880
6881 -- Function: gtk-notebook-get-group-id (self '<gtk-notebook>') =>
6882          (ret 'int')
6883 -- Method: get-group-id
6884     Gets the current group identificator for NOTEBOOK.
6885
6886     NOTEBOOK
6887          a '<gtk-notebook>'
6888
6889     RET
6890          the group identificator, or -1 if none is set.
6891
6892     Since 2.10
6893
6894
6895File: guile-gnome-gtk.info,  Node: GtkTable,  Next: GtkExpander,  Prev: GtkNotebook,  Up: Top
6896
6897101 GtkTable
6898************
6899
6900Pack widgets in regular patterns
6901
6902101.1 Overview
6903==============
6904
6905The '<gtk-table>' functions allow the programmer to arrange widgets in
6906rows and columns, making it easy to align many widgets next to each
6907other, horizontally and vertically.
6908
6909   Tables are created with a call to 'gtk-table-new', the size of which
6910can later be changed with 'gtk-table-resize'.
6911
6912   Widgets can be added to a table using 'gtk-table-attach' or the more
6913convenient (but slightly less flexible) 'gtk-table-attach-defaults'.
6914
6915   To alter the space next to a specific row, use
6916'gtk-table-set-row-spacing', and for a column,
6917'gtk-table-set-col-spacing'.
6918
6919   The gaps between _all_ rows or columns can be changed by calling
6920'gtk-table-set-row-spacings' or 'gtk-table-set-col-spacings'
6921respectively.
6922
6923   'gtk-table-set-homogeneous', can be used to set whether all cells in
6924the table will resize themselves to the size of the largest widget in
6925the table.
6926
6927101.2 Usage
6928===========
6929
6930 -- Class: <gtk-table>
6931     Derives from '<gtk-container>'.
6932
6933     This class defines the following slots:
6934
6935     'n-rows'
6936          The number of rows in the table
6937
6938     'n-columns'
6939          The number of columns in the table
6940
6941     'column-spacing'
6942          The amount of space between two consecutive columns
6943
6944     'row-spacing'
6945          The amount of space between two consecutive rows
6946
6947     'homogeneous'
6948          If TRUE, the table cells are all the same width/height
6949
6950 -- Function: gtk-table-new (rows 'unsigned-int')
6951          (columns 'unsigned-int') (homogeneous 'bool') =>
6952          (ret '<gtk-widget>')
6953     Used to create a new table widget.  An initial size must be given
6954     by specifying how many rows and columns the table should have,
6955     although this can be changed later with 'gtk-table-resize'.  ROWS
6956     and COLUMNS must both be in the range 0 ..  65535.
6957
6958     ROWS
6959          The number of rows the new table should have.
6960
6961     COLUMNS
6962          The number of columns the new table should have.
6963
6964     HOMOGENEOUS
6965          If set to ''#t'', all table cells are resized to the size of
6966          the cell containing the largest widget.
6967
6968     RET
6969          A pointer to the the newly created table widget.
6970
6971 -- Function: gtk-table-resize (self '<gtk-table>')
6972          (rows 'unsigned-int') (columns 'unsigned-int')
6973 -- Method: resize
6974     If you need to change a table's size _after_ it has been created,
6975     this function allows you to do so.
6976
6977     TABLE
6978          The '<gtk-table>' you wish to change the size of.
6979
6980     ROWS
6981          The new number of rows.
6982
6983     COLUMNS
6984          The new number of columns.
6985
6986 -- Function: gtk-table-attach (self '<gtk-table>')
6987          (child '<gtk-widget>') (left_attach 'unsigned-int')
6988          (right_attach 'unsigned-int') (top_attach 'unsigned-int')
6989          (bottom_attach 'unsigned-int')
6990          (xoptions '<gtk-attach-options>')
6991          (yoptions '<gtk-attach-options>') (xpadding 'unsigned-int')
6992          (ypadding 'unsigned-int')
6993 -- Method: attach
6994     Adds a widget to a table.  The number of 'cells' that a widget will
6995     occupy is specified by LEFT-ATTACH, RIGHT-ATTACH, TOP-ATTACH and
6996     BOTTOM-ATTACH.  These each represent the leftmost, rightmost,
6997     uppermost and lowest column and row numbers of the table.  (Columns
6998     and rows are indexed from zero).
6999
7000     TABLE
7001          The '<gtk-table>' to add a new widget to.
7002
7003     CHILD
7004          The widget to add.
7005
7006     LEFT-ATTACH
7007          the column number to attach the left side of a child widget
7008          to.
7009
7010     RIGHT-ATTACH
7011          the column number to attach the right side of a child widget
7012          to.
7013
7014     TOP-ATTACH
7015          the row number to attach the top of a child widget to.
7016
7017     BOTTOM-ATTACH
7018          the row number to attach the bottom of a child widget to.
7019
7020     XOPTIONS
7021          Used to specify the properties of the child widget when the
7022          table is resized.
7023
7024     YOPTIONS
7025          The same as xoptions, except this field determines behaviour
7026          of vertical resizing.
7027
7028     XPADDING
7029          An integer value specifying the padding on the left and right
7030          of the widget being added to the table.
7031
7032     YPADDING
7033          The amount of padding above and below the child widget.
7034
7035 -- Function: gtk-table-attach-defaults (self '<gtk-table>')
7036          (widget '<gtk-widget>') (left_attach 'unsigned-int')
7037          (right_attach 'unsigned-int') (top_attach 'unsigned-int')
7038          (bottom_attach 'unsigned-int')
7039 -- Method: attach-defaults
7040     As there are many options associated with 'gtk-table-attach', this
7041     convenience function provides the programmer with a means to add
7042     children to a table with identical padding and expansion options.
7043     The values used for the '<gtk-attach-options>' are 'GTK_EXPAND |
7044     GTK_FILL', and the padding is set to 0.
7045
7046     TABLE
7047          The table to add a new child widget to.
7048
7049     WIDGET
7050          The child widget to add.
7051
7052     LEFT-ATTACH
7053          The column number to attach the left side of the child widget
7054          to.
7055
7056     RIGHT-ATTACH
7057          The column number to attach the right side of the child widget
7058          to.
7059
7060     TOP-ATTACH
7061          The row number to attach the top of the child widget to.
7062
7063     BOTTOM-ATTACH
7064          The row number to attach the bottom of the child widget to.
7065
7066 -- Function: gtk-table-set-row-spacing (self '<gtk-table>')
7067          (row 'unsigned-int') (spacing 'unsigned-int')
7068 -- Method: set-row-spacing
7069     Changes the space between a given table row and the subsequent row.
7070
7071     TABLE
7072          a '<gtk-table>' containing the row whose properties you wish
7073          to change.
7074
7075     ROW
7076          row number whose spacing will be changed.
7077
7078     SPACING
7079          number of pixels that the spacing should take up.
7080
7081 -- Function: gtk-table-set-col-spacing (self '<gtk-table>')
7082          (column 'unsigned-int') (spacing 'unsigned-int')
7083 -- Method: set-col-spacing
7084     Alters the amount of space between a given table column and the
7085     following column.
7086
7087     TABLE
7088          a '<gtk-table>'.
7089
7090     COLUMN
7091          the column whose spacing should be changed.
7092
7093     SPACING
7094          number of pixels that the spacing should take up.
7095
7096 -- Function: gtk-table-set-row-spacings (self '<gtk-table>')
7097          (spacing 'unsigned-int')
7098 -- Method: set-row-spacings
7099     Sets the space between every row in TABLE equal to SPACING.
7100
7101     TABLE
7102          a '<gtk-table>'.
7103
7104     SPACING
7105          the number of pixels of space to place between every row in
7106          the table.
7107
7108 -- Function: gtk-table-set-col-spacings (self '<gtk-table>')
7109          (spacing 'unsigned-int')
7110 -- Method: set-col-spacings
7111     Sets the space between every column in TABLE equal to SPACING.
7112
7113     TABLE
7114          a '<gtk-table>'.
7115
7116     SPACING
7117          the number of pixels of space to place between every column in
7118          the table.
7119
7120 -- Function: gtk-table-set-homogeneous (self '<gtk-table>')
7121          (homogeneous 'bool')
7122 -- Method: set-homogeneous
7123     Changes the homogenous property of table cells, ie.  whether all
7124     cells are an equal size or not.
7125
7126     TABLE
7127          The '<gtk-table>' you wish to set the homogeneous properties
7128          of.
7129
7130     HOMOGENEOUS
7131          Set to ''#t'' to ensure all table cells are the same size.
7132          Set to ''#f'' if this is not your desired behaviour.
7133
7134 -- Function: gtk-table-get-default-row-spacing (self '<gtk-table>') =>
7135          (ret 'unsigned-int')
7136 -- Method: get-default-row-spacing
7137     Gets the default row spacing for the table.  This is the spacing
7138     that will be used for newly added rows.  (See
7139     'gtk-table-set-row-spacings')
7140
7141     TABLE
7142          a '<gtk-table>'
7143
7144     RET
7145          value: the default row spacing
7146
7147 -- Function: gtk-table-get-homogeneous (self '<gtk-table>') =>
7148          (ret 'bool')
7149 -- Method: get-homogeneous
7150     Returns whether the table cells are all constrained to the same
7151     width and height.  (See 'gtk-table-set-homogenous')
7152
7153     TABLE
7154          a '<gtk-table>'
7155
7156     RET
7157          ''#t'' if the cells are all constrained to the same size
7158
7159 -- Function: gtk-table-get-row-spacing (self '<gtk-table>')
7160          (row 'unsigned-int') =>  (ret 'unsigned-int')
7161 -- Method: get-row-spacing
7162     Gets the amount of space between row ROW, and row ROW + 1.  See
7163     'gtk-table-set-row-spacing'.
7164
7165     TABLE
7166          a '<gtk-table>'
7167
7168     ROW
7169          a row in the table, 0 indicates the first row
7170
7171     RET
7172          the row spacing
7173
7174 -- Function: gtk-table-get-col-spacing (self '<gtk-table>')
7175          (column 'unsigned-int') =>  (ret 'unsigned-int')
7176 -- Method: get-col-spacing
7177     Gets the amount of space between column COL, and column COL + 1.
7178     See 'gtk-table-set-col-spacing'.
7179
7180     TABLE
7181          a '<gtk-table>'
7182
7183     COLUMN
7184          a column in the table, 0 indicates the first column
7185
7186     RET
7187          the column spacing
7188
7189 -- Function: gtk-table-get-default-col-spacing (self '<gtk-table>') =>
7190          (ret 'unsigned-int')
7191 -- Method: get-default-col-spacing
7192     Gets the default column spacing for the table.  This is the spacing
7193     that will be used for newly added columns.  (See
7194     'gtk-table-set-col-spacings')
7195
7196     TABLE
7197          a '<gtk-table>'
7198
7199     RET
7200          value: the default column spacing
7201
7202
7203File: guile-gnome-gtk.info,  Node: GtkExpander,  Next: GtkFrame,  Prev: GtkTable,  Up: Top
7204
7205102 GtkExpander
7206***************
7207
7208A container which can hide its child
7209
7210102.1 Overview
7211==============
7212
7213A '<gtk-expander>' allows the user to hide or show its child by clicking
7214on an expander triangle similar to the triangles used in a
7215'<gtk-tree-view>'.
7216
7217   Normally you use an expander as you would use any other descendant of
7218'<gtk-bin>'; you create the child widget and use 'gtk-container-add' to
7219add it to the expander.  When the expander is toggled, it will take care
7220of showing and hiding the child automatically.
7221
7222   There are situations in which you may prefer to show and hide the
7223expanded widget yourself, such as when you want to actually create the
7224widget at expansion time.  In this case, create a '<gtk-expander>' but
7225do not add a child to it.  The expander widget has an 'expanded'
7226property which can be used to monitor its expansion state.  You should
7227watch this property with a signal connection as follows:
7228
7229
7230     expander = gtk_expander_new_with_mnemonic ("_More Options");
7231     g_signal_connect (expander, "notify::expanded",
7232                       G_CALLBACK (expander_callback), NULL);
7233
7234     ...
7235
7236     static void
7237     expander_callback (GObject    *object,
7238                        GParamSpec *param_spec,
7239                        gpointer    user_data)
7240     {
7241       GtkExpander *expander;
7242
7243       expander = GTK_EXPANDER (object);
7244
7245       if (gtk_expander_get_expanded (expander))
7246         {
7247           /* Show or create widgets */
7248         }
7249       else
7250         {
7251           /* Hide or destroy widgets */
7252         }
7253     }
7254
7255
7256
7257102.2 Usage
7258===========
7259
7260 -- Class: <gtk-expander>
7261     Derives from '<gtk-bin>'.
7262
7263     This class defines the following slots:
7264
7265     'expanded'
7266          Whether the expander has been opened to reveal the child
7267          widget
7268
7269     'label'
7270          Text of the expander's label
7271
7272     'use-underline'
7273          If set, an underline in the text indicates the next character
7274          should be used for the mnemonic accelerator key
7275
7276     'use-markup'
7277          The text of the label includes XML markup.  See
7278          pango_parse_markup()
7279
7280     'spacing'
7281          Space to put between the label and the child
7282
7283     'label-widget'
7284          A widget to display in place of the usual expander label
7285
7286 -- Signal on <gtk-expander>: activate
7287
7288 -- Function: gtk-expander-new (label 'mchars') =>  (ret '<gtk-widget>')
7289     Creates a new expander using LABEL as the text of the label.
7290
7291     LABEL
7292          the text of the label
7293
7294     RET
7295          a new '<gtk-expander>' widget.
7296
7297     Since 2.4
7298
7299 -- Function: gtk-expander-new-with-mnemonic (label 'mchars') =>
7300          (ret '<gtk-widget>')
7301     Creates a new expander using LABEL as the text of the label.  If
7302     characters in LABEL are preceded by an underscore, they are
7303     underlined.  If you need a literal underscore character in a label,
7304     use '__' (two underscores).  The first underlined character
7305     represents a keyboard accelerator called a mnemonic.  Pressing Alt
7306     and that key activates the button.
7307
7308     LABEL
7309          the text of the label with an underscore in front of the
7310          mnemonic character
7311
7312     RET
7313          a new '<gtk-expander>' widget.
7314
7315     Since 2.4
7316
7317 -- Function: gtk-expander-set-expanded (self '<gtk-expander>')
7318          (expanded 'bool')
7319 -- Method: set-expanded
7320     Sets the state of the expander.  Set to ''#t'', if you want the
7321     child widget to be revealed, and ''#f'' if you want the child
7322     widget to be hidden.
7323
7324     EXPANDER
7325          a '<gtk-expander>'
7326
7327     EXPANDED
7328          whether the child widget is revealed
7329
7330     Since 2.4
7331
7332 -- Function: gtk-expander-get-expanded (self '<gtk-expander>') =>
7333          (ret 'bool')
7334 -- Method: get-expanded
7335     Queries a '<gtk-expander>' and returns its current state.  Returns
7336     ''#t'' if the child widget is revealed.
7337
7338     See 'gtk-expander-set-expanded'.
7339
7340     EXPANDER
7341          a '<gtk-expander>'
7342
7343     RET
7344          the current state of the expander.
7345
7346     Since 2.4
7347
7348 -- Function: gtk-expander-set-spacing (self '<gtk-expander>')
7349          (spacing 'int')
7350 -- Method: set-spacing
7351     Sets the spacing field of EXPANDER, which is the number of pixels
7352     to place between expander and the child.
7353
7354     EXPANDER
7355          a '<gtk-expander>'
7356
7357     SPACING
7358          distance between the expander and child in pixels.
7359
7360     Since 2.4
7361
7362 -- Function: gtk-expander-get-spacing (self '<gtk-expander>') =>
7363          (ret 'int')
7364 -- Method: get-spacing
7365     Gets the value set by 'gtk-expander-set-spacing'.
7366
7367     EXPANDER
7368          a '<gtk-expander>'
7369
7370     RET
7371          spacing between the expander and child.
7372
7373     Since 2.4
7374
7375 -- Function: gtk-expander-set-label (self '<gtk-expander>')
7376          (label 'mchars')
7377 -- Method: set-label
7378     Sets the text of the label of the expander to LABEL.
7379
7380     This will also clear any previously set labels.
7381
7382     EXPANDER
7383          a '<gtk-expander>'
7384
7385     LABEL
7386          a string
7387
7388     Since 2.4
7389
7390 -- Function: gtk-expander-get-label (self '<gtk-expander>') =>
7391          (ret 'mchars')
7392 -- Method: get-label
7393     Fetches the text from the label of the expander, as set by
7394     'gtk-expander-set-label'.  If the label text has not been set the
7395     return value will be ''#f''.  This will be the case if you create
7396     an empty button with 'gtk-button-new' to use as a container.
7397
7398     EXPANDER
7399          a '<gtk-expander>'
7400
7401     RET
7402          The text of the label widget.  This string is owned by the
7403          widget and must not be modified or freed.
7404
7405     Since 2.4
7406
7407 -- Function: gtk-expander-set-use-underline (self '<gtk-expander>')
7408          (use_underline 'bool')
7409 -- Method: set-use-underline
7410     If true, an underline in the text of the expander label indicates
7411     the next character should be used for the mnemonic accelerator key.
7412
7413     EXPANDER
7414          a '<gtk-expander>'
7415
7416     USE-UNDERLINE
7417          ''#t'' if underlines in the text indicate mnemonics
7418
7419     Since 2.4
7420
7421 -- Function: gtk-expander-get-use-underline (self '<gtk-expander>') =>
7422          (ret 'bool')
7423 -- Method: get-use-underline
7424     Returns whether an embedded underline in the expander label
7425     indicates a mnemonic.  See 'gtk-expander-set-use-underline'.
7426
7427     EXPANDER
7428          a '<gtk-expander>'
7429
7430     RET
7431          ''#t'' if an embedded underline in the expander label
7432          indicates the mnemonic accelerator keys.
7433
7434     Since 2.4
7435
7436 -- Function: gtk-expander-set-use-markup (self '<gtk-expander>')
7437          (use_markup 'bool')
7438 -- Method: set-use-markup
7439     Sets whether the text of the label contains markup in Pango's text
7440     markup language.  See 'gtk-label-set-markup'.
7441
7442     EXPANDER
7443          a '<gtk-expander>'
7444
7445     USE-MARKUP
7446          ''#t'' if the label's text should be parsed for markup
7447
7448     Since 2.4
7449
7450 -- Function: gtk-expander-get-use-markup (self '<gtk-expander>') =>
7451          (ret 'bool')
7452 -- Method: get-use-markup
7453     Returns whether the label's text is interpreted as marked up with
7454     the Pango text markup language.  See 'gtk-expander-set-use-markup'.
7455
7456     EXPANDER
7457          a '<gtk-expander>'
7458
7459     RET
7460          ''#t'' if the label's text will be parsed for markup
7461
7462     Since 2.4
7463
7464 -- Function: gtk-expander-set-label-widget (self '<gtk-expander>')
7465          (label_widget '<gtk-widget>')
7466 -- Method: set-label-widget
7467     Set the label widget for the expander.  This is the widget that
7468     will appear embedded alongside the expander arrow.
7469
7470     EXPANDER
7471          a '<gtk-expander>'
7472
7473     LABEL-WIDGET
7474          the new label widget
7475
7476     Since 2.4
7477
7478 -- Function: gtk-expander-get-label-widget (self '<gtk-expander>') =>
7479          (ret '<gtk-widget>')
7480 -- Method: get-label-widget
7481     Retrieves the label widget for the frame.  See
7482     'gtk-expander-set-label-widget'.
7483
7484     EXPANDER
7485          a '<gtk-expander>'
7486
7487     RET
7488          the label widget, or ''#f'' if there is none.
7489
7490     Since 2.4
7491
7492
7493File: guile-gnome-gtk.info,  Node: GtkFrame,  Next: GtkHSeparator,  Prev: GtkExpander,  Up: Top
7494
7495103 GtkFrame
7496************
7497
7498A bin with a decorative frame and optional label
7499
7500103.1 Overview
7501==============
7502
7503The frame widget is a Bin that surrounds its child with a decorative
7504frame and an optional label.  If present, the label is drawn in a gap in
7505the top side of the frame.  The position of the label can be controlled
7506with 'gtk-frame-set-label-align'.
7507
7508103.2 Usage
7509===========
7510
7511 -- Class: <gtk-frame>
7512     Derives from '<gtk-bin>'.
7513
7514     This class defines the following slots:
7515
7516     'label'
7517          Text of the frame's label
7518
7519     'label-xalign'
7520          The horizontal alignment of the label
7521
7522     'label-yalign'
7523          The vertical alignment of the label
7524
7525     'shadow'
7526          Deprecated property, use shadow_type instead
7527
7528     'shadow-type'
7529          Appearance of the frame border
7530
7531     'label-widget'
7532          A widget to display in place of the usual frame label
7533
7534 -- Function: gtk-frame-new (label 'mchars') =>  (ret '<gtk-widget>')
7535     Creates a new '<gtk-frame>', with optional label LABEL.  If LABEL
7536     is ''#f'', the label is omitted.
7537
7538     LABEL
7539          the text to use as the label of the frame
7540
7541     RET
7542          a new '<gtk-frame>' widget
7543
7544 -- Function: gtk-frame-set-label (self '<gtk-frame>') (label 'mchars')
7545 -- Method: set-label
7546     Sets the text of the label.  If LABEL is ''#f'', the current label
7547     is removed.
7548
7549     FRAME
7550          a '<gtk-frame>'
7551
7552     LABEL
7553          the text to use as the label of the frame
7554
7555 -- Function: gtk-frame-set-label-widget (self '<gtk-frame>')
7556          (label_widget '<gtk-widget>')
7557 -- Method: set-label-widget
7558     Sets the label widget for the frame.  This is the widget that will
7559     appear embedded in the top edge of the frame as a title.
7560
7561     FRAME
7562          a '<gtk-frame>'
7563
7564     LABEL-WIDGET
7565          the new label widget
7566
7567 -- Function: gtk-frame-set-label-align (self '<gtk-frame>')
7568          (xalign 'float') (yalign 'float')
7569 -- Method: set-label-align
7570     Sets the alignment of the frame widget's label.  The default values
7571     for a newly created frame are 0.0 and 0.5.
7572
7573     FRAME
7574          a '<gtk-frame>'
7575
7576     XALIGN
7577          The position of the label along the top edge of the widget.  A
7578          value of 0.0 represents left alignment; 1.0 represents right
7579          alignment.
7580
7581     YALIGN
7582          The y alignment of the label.  A value of 0.0 aligns under the
7583          frame; 1.0 aligns above the frame.
7584
7585 -- Function: gtk-frame-set-shadow-type (self '<gtk-frame>')
7586          (type '<gtk-shadow-type>')
7587 -- Method: set-shadow-type
7588     Sets the shadow type for FRAME.
7589
7590     FRAME
7591          a '<gtk-frame>'
7592
7593     TYPE
7594          the new '<gtk-shadow-type>'
7595
7596 -- Function: gtk-frame-get-label (self '<gtk-frame>') =>
7597          (ret 'mchars')
7598 -- Method: get-label
7599     If the frame's label widget is a '<gtk-label>', returns the text in
7600     the label widget.  (The frame will have a '<gtk-label>' for the
7601     label widget if a non-''#f'' argument was passed to
7602     'gtk-frame-new'.)
7603
7604     FRAME
7605          a '<gtk-frame>'
7606
7607     RET
7608          the text in the label, or ''#f'' if there was no label widget
7609          or the lable widget was not a '<gtk-label>'.  This string is
7610          owned by GTK+ and must not be modified or freed.
7611
7612 -- Function: gtk-frame-get-label-align (self '<gtk-frame>') =>
7613          (xalign 'float') (yalign 'float')
7614 -- Method: get-label-align
7615     Retrieves the X and Y alignment of the frame's label.  See
7616     'gtk-frame-set-label-align'.
7617
7618     FRAME
7619          a '<gtk-frame>'
7620
7621     XALIGN
7622          location to store X alignment of frame's label, or ''#f''
7623
7624     YALIGN
7625          location to store X alignment of frame's label, or ''#f''
7626
7627 -- Function: gtk-frame-get-label-widget (self '<gtk-frame>') =>
7628          (ret '<gtk-widget>')
7629 -- Method: get-label-widget
7630     Retrieves the label widget for the frame.  See
7631     'gtk-frame-set-label-widget'.
7632
7633     FRAME
7634          a '<gtk-frame>'
7635
7636     RET
7637          the label widget, or ''#f'' if there is none.
7638
7639 -- Function: gtk-frame-get-shadow-type (self '<gtk-frame>') =>
7640          (ret '<gtk-shadow-type>')
7641 -- Method: get-shadow-type
7642     Retrieves the shadow type of the frame.  See
7643     'gtk-frame-set-shadow-type'.
7644
7645     FRAME
7646          a '<gtk-frame>'
7647
7648     RET
7649          the current shadow type of the frame.
7650
7651
7652File: guile-gnome-gtk.info,  Node: GtkHSeparator,  Next: GtkVSeparator,  Prev: GtkFrame,  Up: Top
7653
7654104 GtkHSeparator
7655*****************
7656
7657A horizontal separator
7658
7659104.1 Overview
7660==============
7661
7662The '<gtk-hseparator>' widget is a horizontal separator, used to group
7663the widgets within a window.  It displays a horizontal line with a
7664shadow to make it appear sunken into the interface.
7665
7666   The '<gtk-hseparator>' widget is not used as a separator within
7667menus.  To create a separator in a menu create an empty
7668'<gtk-separator-menu-item>' widget using 'gtk-separator-menu-item-new'
7669and add it to the menu with 'gtk-menu-shell-append'.
7670
7671104.2 Usage
7672===========
7673
7674 -- Class: <gtk-hseparator>
7675     Derives from '<gtk-separator>'.
7676
7677     This class defines no direct slots.
7678
7679 -- Function: gtk-hseparator-new =>  (ret '<gtk-widget>')
7680     Creates a new '<gtk-hseparator>'.
7681
7682     RET
7683          a new '<gtk-hseparator>'.
7684
7685
7686File: guile-gnome-gtk.info,  Node: GtkVSeparator,  Next: GtkHScrollbar,  Prev: GtkHSeparator,  Up: Top
7687
7688105 GtkVSeparator
7689*****************
7690
7691A vertical separator
7692
7693105.1 Overview
7694==============
7695
7696The '<gtk-vseparator>' widget is a vertical separator, used to group the
7697widgets within a window.  It displays a vertical line with a shadow to
7698make it appear sunken into the interface.
7699
7700105.2 Usage
7701===========
7702
7703 -- Class: <gtk-vseparator>
7704     Derives from '<gtk-separator>'.
7705
7706     This class defines no direct slots.
7707
7708 -- Function: gtk-vseparator-new =>  (ret '<gtk-widget>')
7709     Creates a new '<gtk-vseparator>'.
7710
7711     RET
7712          a new '<gtk-vseparator>'.
7713
7714
7715File: guile-gnome-gtk.info,  Node: GtkHScrollbar,  Next: GtkVScrollbar,  Prev: GtkVSeparator,  Up: Top
7716
7717106 GtkHScrollbar
7718*****************
7719
7720A horizontal scrollbar
7721
7722106.1 Overview
7723==============
7724
7725The '<gtk-hscrollbar>' widget is a widget arranged horizontally creating
7726a scrollbar.  See '<gtk-scrollbar>' for details on scrollbars.
7727'<gtk-adjustment>' pointers may be added to handle the adjustment of the
7728scrollbar or it may be left ''#f'' in which case one will be created for
7729you.  See '<gtk-adjustment>' for details.
7730
7731106.2 Usage
7732===========
7733
7734 -- Class: <gtk-hscrollbar>
7735     Derives from '<gtk-scrollbar>'.
7736
7737     This class defines no direct slots.
7738
7739 -- Function: gtk-hscrollbar-new (adjustment '<gtk-adjustment>') =>
7740          (ret '<gtk-widget>')
7741     Creates a new horizontal scrollbar.
7742
7743     ADJUSTMENT
7744          the '<gtk-adjustment>' to use, or ''#f'' to create a new
7745          adjustment.
7746
7747     RET
7748          the new '<gtk-hscrollbar>'.
7749
7750
7751File: guile-gnome-gtk.info,  Node: GtkVScrollbar,  Next: GtkScrolledWindow,  Prev: GtkHScrollbar,  Up: Top
7752
7753107 GtkVScrollbar
7754*****************
7755
7756A vertical scrollbar
7757
7758107.1 Overview
7759==============
7760
7761The '<gtk-vscrollbar>' widget is a widget arranged vertically creating a
7762scrollbar.  See '<gtk-scrollbar>' for details on scrollbars.
7763'<gtk-adjustment>' pointers may be added to handle the adjustment of the
7764scrollbar or it may be left ''#f'' in which case one will be created for
7765you.  See '<gtk-adjustment>' for details.
7766
7767107.2 Usage
7768===========
7769
7770 -- Class: <gtk-vscrollbar>
7771     Derives from '<gtk-scrollbar>'.
7772
7773     This class defines no direct slots.
7774
7775 -- Function: gtk-vscrollbar-new (adjustment '<gtk-adjustment>') =>
7776          (ret '<gtk-widget>')
7777     Creates a new vertical scrollbar.
7778
7779     ADJUSTMENT
7780          the '<gtk-adjustment>' to use, or ''#f'' to create a new
7781          adjustment.
7782
7783     RET
7784          the new '<gtk-vscrollbar>'
7785
7786
7787File: guile-gnome-gtk.info,  Node: GtkScrolledWindow,  Next: GtkPrintOperation,  Prev: GtkVScrollbar,  Up: Top
7788
7789108 GtkScrolledWindow
7790*********************
7791
7792Adds scrollbars to its child widget
7793
7794108.1 Overview
7795==============
7796
7797'<gtk-scrolled-window>' is a '<gtk-bin>' subclass: it's a container the
7798accepts a single child widget.  '<gtk-scrolled-window>' adds scrollbars
7799to the child widget and optionally draws a beveled frame around the
7800child widget.
7801
7802   The scrolled window can work in two ways.  Some widgets have native
7803scrolling support; these widgets have "slots" for '<gtk-adjustment>'
7804objects.  Widgets with native scroll support include '<gtk-tree-view>',
7805'<gtk-text-view>', and '<gtk-layout>'.
7806
7807   The scrolled window installs '<gtk-adjustment>' objects in the child
7808window's slots using the set_scroll_adjustments_signal, found in
7809'<gtk-widget-class>'.  (Conceptually, these widgets implement a
7810"Scrollable" interface; because GTK+ 1.2 lacked interface support in the
7811object system, this interface is hackily implemented as a signal in
7812'<gtk-widget-class>'.  The GTK+ 2.0 object system would allow a clean
7813implementation, but it wasn't worth breaking the API.)
7814
7815   For widgets that lack native scrolling support, the '<gtk-viewport>'
7816widget acts as an adaptor class, implementing scrollability for child
7817widgets that lack their own scrolling capabilities.  Use
7818'<gtk-viewport>' to scroll child widgets such as '<gtk-table>',
7819'<gtk-box>', and so on.
7820
7821   If a widget has native scrolling abilities, it can be added to the
7822'<gtk-scrolled-window>' with 'gtk-container-add'.  If a widget does not,
7823you must first add the widget to a '<gtk-viewport>', then add the
7824'<gtk-viewport>' to the scrolled window.  The convenience function
7825'gtk-scrolled-window-add-with-viewport' does exactly this, so you can
7826ignore the presence of the viewport.
7827
7828   The position of the scrollbars is controlled by the scroll
7829adjustments.  See '<gtk-adjustment>' for the fields in an adjustment -
7830for '<gtk-scrollbar>', used by '<gtk-scrolled-window>', the "value"
7831field represents the position of the scrollbar, which must be between
7832the "lower" field and "upper - page_size."  The "page_size" field
7833represents the size of the visible scrollable area.  The
7834"step_increment" and "page_increment" fields are used when the user asks
7835to step down (using the small stepper arrows) or page down (using for
7836example the PageDown key).
7837
7838   If a '<gtk-scrolled-window>' doesn't behave quite as you would like,
7839or doesn't have exactly the right layout, it's very possible to set up
7840your own scrolling with '<gtk-scrollbar>' and for example a
7841'<gtk-table>'.
7842
7843108.2 Usage
7844===========
7845
7846 -- Class: <gtk-scrolled-window>
7847     Derives from '<gtk-bin>'.
7848
7849     This class defines the following slots:
7850
7851     'hadjustment'
7852          The GtkAdjustment for the horizontal position
7853
7854     'vadjustment'
7855          The GtkAdjustment for the vertical position
7856
7857     'hscrollbar-policy'
7858          When the horizontal scrollbar is displayed
7859
7860     'vscrollbar-policy'
7861          When the vertical scrollbar is displayed
7862
7863     'window-placement'
7864          Where the contents are located with respect to the scrollbars.
7865          This property only takes effect if "window-placement-set" is
7866          TRUE.
7867
7868     'window-placement-set'
7869          Whether "window-placement" should be used to determine the
7870          location of the contents with respect to the scrollbars.
7871
7872     'shadow-type'
7873          Style of bevel around the contents
7874
7875 -- Signal on <gtk-scrolled-window>: move-focus-out
7876          (arg0 '<gtk-direction-type>')
7877
7878 -- Signal on <gtk-scrolled-window>: scroll-child
7879          (arg0 '<gtk-scroll-type>') (arg1 '<gboolean>') => '<gboolean>'
7880
7881 -- Function: gtk-scrolled-window-new (hadjustment '<gtk-adjustment>')
7882          (vadjustment '<gtk-adjustment>') =>  (ret '<gtk-widget>')
7883     Creates a new scrolled window.  The two arguments are the scrolled
7884     window's adjustments; these will be shared with the scrollbars and
7885     the child widget to keep the bars in sync with the child.  Usually
7886     you want to pass ''#f'' for the adjustments, which will cause the
7887     scrolled window to create them for you.
7888
7889     HADJUSTMENT
7890          Horizontal adjustment.
7891
7892     VADJUSTMENT
7893          Vertical adjustment.
7894
7895     RET
7896          New scrolled window.
7897
7898 -- Function: gtk-scrolled-window-get-hadjustment
7899          (self '<gtk-scrolled-window>') =>  (ret '<gtk-adjustment>')
7900 -- Method: get-hadjustment
7901     Returns the horizontal scrollbar's adjustment, used to connect the
7902     horizontal scrollbar to the child widget's horizontal scroll
7903     functionality.
7904
7905     SCROLLED-WINDOW
7906          A '<gtk-scrolled-window>'.
7907
7908     RET
7909          The horizontal '<gtk-adjustment>'.
7910
7911 -- Function: gtk-scrolled-window-get-vadjustment
7912          (self '<gtk-scrolled-window>') =>  (ret '<gtk-adjustment>')
7913 -- Method: get-vadjustment
7914     Returns the vertical scrollbar's adjustment, used to connect the
7915     vertical scrollbar to the child widget's vertical scroll
7916     functionality.
7917
7918     SCROLLED-WINDOW
7919          A '<gtk-scrolled-window>'.
7920
7921     RET
7922          The vertical '<gtk-adjustment>'.
7923
7924 -- Function: gtk-scrolled-window-get-hscrollbar
7925          (self '<gtk-scrolled-window>') =>  (ret '<gtk-widget>')
7926 -- Method: get-hscrollbar
7927     Returns the horizontal scrollbar of SCROLLED-WINDOW.
7928
7929     SCROLLED-WINDOW
7930          a '<gtk-scrolled-window>'
7931
7932     RET
7933          the horizontal scrollbar of the scrolled window, or ''#f'' if
7934          it does not have one.
7935
7936     Since 2.8
7937
7938 -- Function: gtk-scrolled-window-get-vscrollbar
7939          (self '<gtk-scrolled-window>') =>  (ret '<gtk-widget>')
7940 -- Method: get-vscrollbar
7941     Returns the vertical scrollbar of SCROLLED-WINDOW.
7942
7943     SCROLLED-WINDOW
7944          a '<gtk-scrolled-window>'
7945
7946     RET
7947          the vertical scrollbar of the scrolled window, or ''#f'' if it
7948          does not have one.
7949
7950     Since 2.8
7951
7952 -- Function: gtk-scrolled-window-set-policy
7953          (self '<gtk-scrolled-window>')
7954          (hscrollbar_policy '<gtk-policy-type>')
7955          (vscrollbar_policy '<gtk-policy-type>')
7956 -- Method: set-policy
7957     Sets the scrollbar policy for the horizontal and vertical
7958     scrollbars.  The policy determines when the scrollbar should
7959     appear; it is a value from the '<gtk-policy-type>' enumeration.  If
7960     'GTK_POLICY_ALWAYS', the scrollbar is always present; if
7961     'GTK_POLICY_NEVER', the scrollbar is never present; if
7962     'GTK_POLICY_AUTOMATIC', the scrollbar is present only if needed
7963     (that is, if the slider part of the bar would be smaller than the
7964     trough - the display is larger than the page size).
7965
7966     SCROLLED-WINDOW
7967          A '<gtk-scrolled-window>'.
7968
7969     HSCROLLBAR-POLICY
7970          Policy for horizontal bar.
7971
7972     VSCROLLBAR-POLICY
7973          Policy for vertical bar.
7974
7975 -- Function: gtk-scrolled-window-set-placement
7976          (self '<gtk-scrolled-window>')
7977          (window_placement '<gtk-corner-type>')
7978 -- Method: set-placement
7979     Sets the placement of the contents with respect to the scrollbars
7980     for the scrolled window.
7981
7982     See also 'gtk-scrolled-window-get-placement' and
7983     'gtk-scrolled-window-unset-placement'.
7984
7985     Determines the location of the child widget with respect to the
7986     scrollbars.  The default is 'GTK_CORNER_TOP_LEFT', meaning the
7987     child is in the top left, with the scrollbars underneath and to the
7988     right.  Other values in '<gtk-corner-type>' are
7989     'GTK_CORNER_TOP_RIGHT', 'GTK_CORNER_BOTTOM_LEFT', and
7990     'GTK_CORNER_BOTTOM_RIGHT'.
7991
7992     SCROLLED-WINDOW
7993          a '<gtk-scrolled-window>'
7994
7995     WINDOW-PLACEMENT
7996          Position of the child window.
7997
7998 -- Function: gtk-scrolled-window-unset-placement
7999          (self '<gtk-scrolled-window>')
8000 -- Method: unset-placement
8001     Unsets the placement of the contents with respect to the scrollbars
8002     for the scrolled window.  If no window placement is set for a
8003     scrolled window, it obeys the "gtk-scrolled-window-placement"
8004     XSETTING.
8005
8006     See also 'gtk-scrolled-window-set-placement' and
8007     'gtk-scrolled-window-get-placement'.
8008
8009     SCROLLED-WINDOW
8010          a '<gtk-scrolled-window>'
8011
8012     Since 2.10
8013
8014 -- Function: gtk-scrolled-window-set-shadow-type
8015          (self '<gtk-scrolled-window>') (type '<gtk-shadow-type>')
8016 -- Method: set-shadow-type
8017     Changes the type of shadow drawn around the contents of
8018     SCROLLED-WINDOW.
8019
8020     SCROLLED-WINDOW
8021          a '<gtk-scrolled-window>'
8022
8023     TYPE
8024          kind of shadow to draw around scrolled window contents
8025
8026 -- Function: gtk-scrolled-window-set-hadjustment
8027          (self '<gtk-scrolled-window>')
8028          (hadjustment '<gtk-adjustment>')
8029 -- Method: set-hadjustment
8030     Sets the '<gtk-adjustment>' for the horizontal scrollbar.
8031
8032     SCROLLED-WINDOW
8033          A '<gtk-scrolled-window>'.
8034
8035     HADJUSTMENT
8036          Horizontal scroll adjustment.
8037
8038 -- Function: gtk-scrolled-window-set-vadjustment
8039          (self '<gtk-scrolled-window>')
8040          (vadjustment '<gtk-adjustment>')
8041 -- Method: set-vadjustment
8042     Sets the '<gtk-adjustment>' for the vertical scrollbar.
8043
8044     SCROLLED-WINDOW
8045          A '<gtk-scrolled-window>'.
8046
8047     VADJUSTMENT
8048          Vertical scroll adjustment.
8049
8050 -- Function: gtk-scrolled-window-get-placement
8051          (self '<gtk-scrolled-window>') =>  (ret '<gtk-corner-type>')
8052 -- Method: get-placement
8053     Gets the placement of the contents with respect to the scrollbars
8054     for the scrolled window.  See 'gtk-scrolled-window-set-placement'.
8055
8056     SCROLLED-WINDOW
8057          a '<gtk-scrolled-window>'
8058
8059     RET
8060          the current placement value.  See also
8061          'gtk-scrolled-window-set-placement' and
8062          'gtk-scrolled-window-unset-placement'.
8063
8064 -- Function: gtk-scrolled-window-get-shadow-type
8065          (self '<gtk-scrolled-window>') =>  (ret '<gtk-shadow-type>')
8066 -- Method: get-shadow-type
8067     Gets the shadow type of the scrolled window.  See
8068     'gtk-scrolled-window-set-shadow-type'.
8069
8070     SCROLLED-WINDOW
8071          a '<gtk-scrolled-window>'
8072
8073     RET
8074          the current shadow type
8075
8076
8077File: guile-gnome-gtk.info,  Node: GtkPrintOperation,  Next: GtkPrintContext,  Prev: GtkScrolledWindow,  Up: Top
8078
8079109 GtkPrintOperation
8080*********************
8081
8082High-level Printing API
8083
8084109.1 Overview
8085==============
8086
8087GtkPrintOperation is the high-level, portable printing API. It looks a
8088bit different than other GTK+ dialogs such as the '<gtk-file-chooser>',
8089since some platforms don't expose enough infrastructure to implement a
8090good print dialog.  On such platforms, GtkPrintOperation uses the native
8091print dialog.  On platforms which do not provide a native print dialog,
8092GTK+ uses its own, see '<gtk-print-unix-dialog>'.
8093
8094   The typical way to use the high-level printing API is to create a
8095'<gtk-print-operation>' object with 'gtk-print-operation-new' when the
8096user selects to print.  Then you set some properties on it, e.g.  the
8097page size, any '<gtk-print-settings>' from previous print operations,
8098the number of pages, the current page, etc.
8099
8100   Then you start the print operation by calling
8101'gtk-print-operation-run'.  It will then show a dialog, let the user
8102select a printer and options.  When the user finished the dialog various
8103signals will be emitted on the '<gtk-print-operation>', the main one
8104being ::draw-page, which you are supposed to catch and render the page
8105on the provided '<gtk-print-context>' using Cairo.
8106
8107
8108     static GtkPrintSettings *settings = NULL;
8109
8110     static void
8111     do_print (void)
8112     {
8113       GtkPrintOperation *print;
8114       GtkPrintOperationResult res;
8115
8116       print = gtk_print_operation_new ();
8117
8118       if (settings != NULL)
8119         gtk_print_operation_set_print_settings (print, settings);
8120
8121       g_signal_connect (print, "begin_print", G_CALLBACK (begin_print), NULL);
8122       g_signal_connect (print, "draw_page", G_CALLBACK (draw_page), NULL);
8123
8124       res = gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
8125                                      GTK_WINDOW (main_window), NULL);
8126
8127       if (res == GTK_PRINT_OPERATION_RESULT_APPLY)
8128         {
8129           if (settings != NULL)
8130             g_object_unref (settings);
8131           settings = g_object_ref (gtk_print_operation_get_print_settings (print));
8132         }
8133
8134       g_object_unref (print);
8135     }
8136
8137
8138   By default GtkPrintOperation uses an external application to do print
8139preview.  To implement a custom print preview, an application must
8140connect to the preview signal.  The functions
8141'gtk-print-operation-print-preview-render-page',
8142'gtk-print-operation-preview-end-preview' and
8143'gtk-print-operation-preview-is-selected' are useful when implementing a
8144print preview.
8145
8146   Printing support was added in GTK+ 2.10.
8147
8148109.2 Usage
8149===========
8150
8151 -- Class: <gtk-print-operation>
8152     Derives from '<gtk-print-operation-preview>', '<gobject>'.
8153
8154     This class defines the following slots:
8155
8156     'default-page-setup'
8157          The GtkPageSetup used by default
8158
8159     'print-settings'
8160          The GtkPrintSettings used for initializing the dialog
8161
8162     'job-name'
8163          A string used for identifying the print job.
8164
8165     'n-pages'
8166          The number of pages in the document.
8167
8168     'current-page'
8169          The current page in the document
8170
8171     'use-full-page'
8172          TRUE if the origin of the context should be at the corner of
8173          the page and not the corner of the imageable area
8174
8175     'track-print-status'
8176          TRUE if the print operation will continue to report on the
8177          print job status after the print data has been sent to the
8178          printer or print server.
8179
8180     'unit'
8181          The unit in which distances can be measured in the context
8182
8183     'show-progress'
8184          TRUE if a progress dialog is shown while printing.
8185
8186     'allow-async'
8187          TRUE if print process may run asynchronous.
8188
8189     'export-filename'
8190          Export filename
8191
8192     'status'
8193          The status of the print operation
8194
8195     'status-string'
8196          A human-readable description of the status
8197
8198     'custom-tab-label'
8199          Label for the tab containing custom widgets.
8200
8201 -- Signal on <gtk-print-operation>: done
8202          (arg0 '<gtk-print-operation-result>')
8203     Emitted when the print operation run has finished doing everything
8204     required for printing.  RESULT gives you information about what
8205     happened during the run.  If RESULT is
8206     'GTK_PRINT_OPERATION_RESULT_ERROR' then you can call
8207     'gtk-print-operation-get-error' for more information.
8208
8209     If you enabled print status tracking then
8210     'gtk-print-operation-is-finished' may still return ''#f'' after
8211     this was emitted.
8212
8213     Since 2.10
8214
8215 -- Signal on <gtk-print-operation>: begin-print
8216          (arg0 '<gtk-print-context>')
8217     Emitted after the user has finished changing print settings in the
8218     dialog, before the actual rendering starts.
8219
8220     A typical use for this signal is to use the parameters from the
8221     '<gtk-print-context>' and paginate the document accordingly, and
8222     then set the number of pages with
8223     'gtk-print-operation-set-n-pages'.
8224
8225     Since 2.10
8226
8227 -- Signal on <gtk-print-operation>: paginate
8228          (arg0 '<gtk-print-context>') => '<gboolean>'
8229     Emitted after the begin-print signal, but before the actual
8230     rendering starts.  It keeps getting emitted until it returns
8231     ''#f''.
8232
8233     This signal is intended to be used for paginating the document in
8234     small chunks, to avoid blocking the user interface for a long time.
8235     The signal handler should update the number of pages using
8236     'gtk-print-operation-set-n-pages', and return ''#t'' if the
8237     document has been completely paginated.
8238
8239     If you don't need to do pagination in chunks, you can simply do it
8240     all in the begin-print handler, and set the number of pages from
8241     there.
8242
8243     Since 2.10
8244
8245 -- Signal on <gtk-print-operation>: request-page-setup
8246          (arg0 '<gtk-print-context>') (arg1 '<gint>')
8247          (arg2 '<gtk-page-setup>')
8248     Emitted once for every page that is printed, to give the
8249     application a chance to modify the page setup.  Any changes done to
8250     SETUP will be in force only for printing this page.
8251
8252     Since 2.10
8253
8254 -- Signal on <gtk-print-operation>: draw-page
8255          (arg0 '<gtk-print-context>') (arg1 '<gint>')
8256     Emitted for every page that is printed.  The signal handler must
8257     render the PAGE-NR's page onto the cairo context obtained from
8258     CONTEXT using 'gtk-print-context-get-cairo-context'.
8259
8260
8261          static void
8262          draw_page (GtkPrintOperation *operation,
8263                     GtkPrintContext   *context,
8264                     gint               page_nr,
8265                     gpointer           user_data)
8266          {
8267            cairo_t *cr;
8268            PangoLayout *layout;
8269            gdouble width, text_height;
8270            gint layout_height;
8271            PangoFontDescription *desc;
8272
8273            cr = gtk_print_context_get_cairo_context (context);
8274            width = gtk_print_context_get_width (context);
8275
8276            cairo_rectangle (cr, 0, 0, width, HEADER_HEIGHT);
8277
8278            cairo_set_source_rgb (cr, 0.8, 0.8, 0.8);
8279            cairo_fill (cr);
8280
8281            layout = gtk_print_context_create_pango_layout (context);
8282
8283            desc = pango_font_description_from_string ("sans 14");
8284            pango_layout_set_font_description (layout, desc);
8285            pango_font_description_free (desc);
8286
8287            pango_layout_set_text (layout, "some text", -1);
8288            pango_layout_set_width (layout, width);
8289            pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER);
8290
8291            pango_layout_get_size (layout, NULL, &layout_height);
8292            text_height = (gdouble)layout_height / PANGO_SCALE;
8293
8294            cairo_move_to (cr, width / 2,  (HEADER_HEIGHT - text_height) / 2);
8295            pango_cairo_show_layout (cr, layout);
8296
8297            g_object_unref (layout);
8298          }
8299
8300     Use 'gtk-print-operation-set-use-full-page' and
8301     'gtk-print-operation-set-unit' before starting the print operation
8302     to set up the transformation of the cairo context according to your
8303     needs.
8304
8305     Since 2.10
8306
8307 -- Signal on <gtk-print-operation>: end-print
8308          (arg0 '<gtk-print-context>')
8309     Emitted after all pages have been rendered.  A handler for this
8310     signal can clean up any resources that have been allocated in the
8311     ::begin-print handler.
8312
8313     Since 2.10
8314
8315 -- Signal on <gtk-print-operation>: status-changed
8316     Emitted at between the various phases of the print operation.  See
8317     '<gtk-print-status>' for the phases that are being discriminated.
8318     Use 'gtk-print-operation-get-status' to find out the current
8319     status.
8320
8321     Since 2.10
8322
8323 -- Signal on <gtk-print-operation>: create-custom-widget => '<gobject>'
8324     Emitted when displaying the print dialog.  If you return a widget
8325     in a handler for this signal it will be added to a custom tab in
8326     the print dialog.  You typically return a container widget with
8327     multiple widgets in it.
8328
8329     The print dialog owns the returned widget, and its lifetime isn't
8330     controlled by the app.  However, the widget is guaranteed to stay
8331     around until the custom-widget-apply signal is emitted on the
8332     operation.  Then you can read out any information you need from the
8333     widgets.
8334
8335     Since 2.10
8336
8337 -- Signal on <gtk-print-operation>: custom-widget-apply
8338          (arg0 '<gtk-widget>')
8339     Emitted right before begin-print if you added a custom widget in
8340     the create-custom-widget handler.  When you get this signal you
8341     should read the information from the custom widgets, as the widgets
8342     are not guaraneed to be around at a later time.
8343
8344     Since 2.10
8345
8346 -- Signal on <gtk-print-operation>: preview
8347          (arg0 '<gtk-print-operation-preview>')
8348          (arg1 '<gtk-print-context>') (arg2 '<gtk-window>')
8349          => '<gboolean>'
8350     Gets emitted when a preview is requested from the native dialog.
8351
8352     The default handler for this signal uses an external viewer
8353     application to preview.
8354
8355     To implement a custom print preview, an application must return
8356     ''#t'' from its handler for this signal.  In order to use the
8357     provided CONTEXT for the preview implementation, it must be given a
8358     suitable cairo context with 'gtk-print-context-set-cairo-context'.
8359
8360     The custom preview implementation can use
8361     'gtk-print-operation-preview-is-selected' and
8362     'gtk-print-operation-preview-render-page' to find pages which are
8363     selected for print and render them.  The preview must be finished
8364     by calling 'gtk-print-operation-preview-end-preview' (typically in
8365     response to the user clicking a close button).
8366
8367     Since 2.10
8368
8369 -- Class: <gtk-print-operation-preview>
8370     Derives from '<ginterface>'.
8371
8372     This class defines no direct slots.
8373
8374 -- Signal on <gtk-print-operation-preview>: ready
8375          (arg0 '<gtk-print-context>')
8376     undocumented
8377
8378 -- Signal on <gtk-print-operation-preview>: got-page-size
8379          (arg0 '<gtk-print-context>') (arg1 '<gtk-page-setup>')
8380     undocumented
8381
8382 -- Function: gtk-print-operation-new =>  (ret '<gtk-print-operation>')
8383     Creates a new '<gtk-print-operation>'.
8384
8385     RET
8386          a new '<gtk-print-operation>'
8387
8388     Since 2.10
8389
8390 -- Function: gtk-print-operation-set-allow-async
8391          (self '<gtk-print-operation>') (allow_async 'bool')
8392 -- Method: set-allow-async
8393     Sets whether the 'gtk-print-operation-run' may return before the
8394     print operation is completed.  Note that some platforms may not
8395     allow asynchronous operation.
8396
8397     OP
8398          a '<gtk-print-operation>'
8399
8400     ALLOW-ASYNC
8401          ''#t'' to allow asynchronous operation
8402
8403     Since 2.10
8404
8405 -- Function: gtk-print-operation-get-error
8406          (self '<gtk-print-operation>')
8407 -- Method: get-error
8408     Call this when the result of a print operation is
8409     'GTK_PRINT_OPERATION_RESULT_ERROR', either as returned by
8410     'gtk-print-operation-run', or in the ::done signal handler.  The
8411     returned '<g-error>' will contain more details on what went wrong.
8412
8413     OP
8414          a '<gtk-print-operation>'
8415
8416     ERROR
8417          return location for the error
8418
8419     Since 2.10
8420
8421 -- Function: gtk-print-operation-set-job-name
8422          (self '<gtk-print-operation>') (job_name 'mchars')
8423 -- Method: set-job-name
8424     Sets the name of the print job.  The name is used to identify the
8425     job (e.g.  in monitoring applications like eggcups).
8426
8427     If you don't set a job name, GTK+ picks a default one by numbering
8428     successive print jobs.
8429
8430     OP
8431          a '<gtk-print-operation>'
8432
8433     JOB-NAME
8434          a string that identifies the print job
8435
8436     Since 2.10
8437
8438 -- Function: gtk-print-operation-set-n-pages
8439          (self '<gtk-print-operation>') (n_pages 'int')
8440 -- Method: set-n-pages
8441     Sets the number of pages in the document.
8442
8443     This _must_ be set to a positive number before the rendering
8444     starts.  It may be set in a ::begin-print signal hander.
8445
8446     Note that the page numbers passed to the ::request-page-setup and
8447     ::draw-page signals are 0-based, i.e.  if the user chooses to print
8448     all pages, the last ::draw-page signal will be for page N-PAGES -
8449     1.
8450
8451     OP
8452          a '<gtk-print-operation>'
8453
8454     N-PAGES
8455          the number of pages
8456
8457     Since 2.10
8458
8459 -- Function: gtk-print-operation-set-unit
8460          (self '<gtk-print-operation>') (unit '<gtk-unit>')
8461 -- Method: set-unit
8462     Sets up the transformation for the cairo context obtained from
8463     '<gtk-print-context>' in such a way that distances are measured in
8464     units of UNIT.
8465
8466     OP
8467          a '<gtk-print-operation>'
8468
8469     UNIT
8470          the unit to use
8471
8472     Since 2.10
8473
8474 -- Function: gtk-print-operation-run (self '<gtk-print-operation>')
8475          (action '<gtk-print-operation-action>')
8476          (parent '<gtk-window>') =>
8477          (ret '<gtk-print-operation-result>')
8478 -- Method: run
8479     Runs the print operation, by first letting the user modify print
8480     settings in the print dialog, and then print the document.
8481
8482     Normally that this function does not return until the rendering of
8483     all pages is complete.  You can connect to the ::status-changed
8484     signal on OP to obtain some information about the progress of the
8485     print operation.  Furthermore, it may use a recursive mainloop to
8486     show the print dialog.
8487
8488     If you call 'gtk-print-operation-set-allow-async' or set the
8489     allow-async property the operation will run asyncronously if this
8490     is supported on the platform.  The ::done signal will be emitted
8491     with the operation results when the operation is done (i.e.  when
8492     the dialog is canceled, or when the print succeeds or fails).
8493
8494
8495          if (settings != NULL)
8496            gtk_print_operation_set_print_settings (print, settings);
8497
8498          if (page_setup != NULL)
8499            gtk_print_operation_set_default_page_setup (print, page_setup);
8500
8501          g_signal_connect (print, "begin-print",
8502                            G_CALLBACK (begin_print), &data);
8503          g_signal_connect (print, "draw-page",
8504                            G_CALLBACK (draw_page), &data);
8505
8506          res = gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, parent, &error);
8507
8508          if (res == GTK_PRINT_OPERATION_RESULT_ERROR)
8509           {
8510             error_dialog = gtk_message_dialog_new (GTK_WINDOW (parent),
8511            			                     GTK_DIALOG_DESTROY_WITH_PARENT,
8512          					     GTK_MESSAGE_ERROR,
8513          					     GTK_BUTTONS_CLOSE,
8514          					     "Error printing file:\n%s",
8515          					     error->message);
8516             g_signal_connect (error_dialog, "response",
8517                               G_CALLBACK (gtk_widget_destroy), NULL);
8518             gtk_widget_show (error_dialog);
8519             g_error_free (error);
8520           }
8521          else if (res == GTK_PRINT_OPERATION_RESULT_APPLY)
8522           {
8523             if (settings != NULL)
8524          g_object_unref (settings);
8525             settings = g_object_ref (gtk_print_operation_get_print_settings (print));
8526           }
8527
8528     Note that 'gtk-print-operation-run' can only be called once on a
8529     given '<gtk-print-operation>'.
8530
8531     OP
8532          a '<gtk-print-operation>'
8533
8534     ACTION
8535          the action to start
8536
8537     PARENT
8538          Transient parent of the dialog, or ''#f''
8539
8540     ERROR
8541          Return location for errors, or ''#f''
8542
8543     RET
8544          the result of the print operation.  A return value of
8545          'GTK_PRINT_OPERATION_RESULT_APPLY' indicates that the printing
8546          was completed successfully.  In this case, it is a good idea
8547          to obtain the used print settings with
8548          'gtk-print-operation-get-print-settings' and store them for
8549          reuse with the next print operation.  A value of
8550          'GTK_PRINT_OPERATION_RESULT_IN_PROGRESS' means the operation
8551          is running asynchronously, and will emit the ::done signal
8552          when done.
8553
8554     Since 2.10
8555
8556 -- Function: gtk-print-operation-cancel (self '<gtk-print-operation>')
8557 -- Method: cancel
8558     Cancels a running print operation.  This function may be called
8559     from a begin-print, paginate or draw-page signal handler to stop
8560     the currently running print operation.
8561
8562     OP
8563          a '<gtk-print-operation>'
8564
8565     Since 2.10
8566
8567 -- Function: gtk-print-operation-get-status
8568          (self '<gtk-print-operation>') =>  (ret '<gtk-print-status>')
8569 -- Method: get-status
8570     Returns the status of the print operation.  Also see
8571     'gtk-print-operation-get-status-string'.
8572
8573     OP
8574          a '<gtk-print-operation>'
8575
8576     RET
8577          the status of the print operation
8578
8579     Since 2.10
8580
8581 -- Function: gtk-print-operation-is-finished
8582          (self '<gtk-print-operation>') =>  (ret 'bool')
8583 -- Method: is-finished
8584     A convenience function to find out if the print operation is
8585     finished, either successfully ('GTK_PRINT_STATUS_FINISHED') or
8586     unsuccessfully ('GTK_PRINT_STATUS_FINISHED_ABORTED').
8587
8588     Note: when you enable print status tracking the print operation can
8589     be in a non-finished state even after done has been called, as the
8590     operation status then tracks the print job status on the printer.
8591
8592     OP
8593          a '<gtk-print-operation>'
8594
8595     RET
8596          ''#t'', if the print operation is finished.
8597
8598     Since 2.10
8599
8600 -- Function: gtk-print-operation-get-error
8601          (self '<gtk-print-operation>')
8602 -- Method: get-error
8603     Call this when the result of a print operation is
8604     'GTK_PRINT_OPERATION_RESULT_ERROR', either as returned by
8605     'gtk-print-operation-run', or in the ::done signal handler.  The
8606     returned '<g-error>' will contain more details on what went wrong.
8607
8608     OP
8609          a '<gtk-print-operation>'
8610
8611     ERROR
8612          return location for the error
8613
8614     Since 2.10
8615
8616 -- Function: gtk-print-run-page-setup-dialog (parent '<gtk-window>')
8617          (page_setup '<gtk-page-setup>')
8618          (settings '<gtk-print-settings>') =>  (ret '<gtk-page-setup>')
8619     Runs a page setup dialog, letting the user modify the values from
8620     PAGE-SETUP.  If the user cancels the dialog, the returned
8621     '<gtk-page-setup>' is identical to the passed in PAGE-SETUP,
8622     otherwise it contains the modifications done in the dialog.
8623
8624     Note that this function may use a recursive mainloop to show the
8625     page setup dialog.  See 'gtk-print-run-page-setup-dialog-async' if
8626     this is a problem.
8627
8628     PARENT
8629          transient parent, or ''#f''
8630
8631     PAGE-SETUP
8632          an existing '<gtk-page-setup>', or ''#f''
8633
8634     SETTINGS
8635          a '<gtk-print-settings>'
8636
8637     RET
8638          a new '<gtk-page-setup>'
8639
8640     Since 2.10
8641
8642
8643File: guile-gnome-gtk.info,  Node: GtkPrintContext,  Next: GtkPrintSettings,  Prev: GtkPrintOperation,  Up: Top
8644
8645110 GtkPrintContext
8646*******************
8647
8648Encapsulates context for drawing pages
8649
8650110.1 Overview
8651==============
8652
8653A GtkPrintContext encapsulates context information that is required when
8654drawing pages for printing, such as the cairo context and important
8655parameters like page size and resolution.  It also lets you easily
8656create '<pango-layout>' and '<pango-context>' objects that match the
8657font metrics of the cairo surface.
8658
8659   GtkPrintContext objects gets passed to the ::begin-print,
8660::end-print, ::request-page-setup and ::draw-page signals on the
8661'<gtk-print-operation>'.
8662
8663
8664     static void
8665     draw_page (GtkPrintOperation *operation,
8666     	   GtkPrintContext   *context,
8667     	   int                page_nr)
8668     {
8669       cairo_t *cr;
8670       PangoLayout *layout;
8671       PangoFontDescription *desc;
8672
8673       cr = gtk_print_context_get_cairo_context (context);
8674
8675       /* Draw a red rectangle, as wide as the paper (inside the margins) */
8676       cairo_set_source_rgb (cr, 1.0, 0, 0);
8677       cairo_rectangle (cr, 0, 0, gtk_print_context_get_width (context), 50);
8678
8679       cairo_fill (cr);
8680
8681       /* Draw some lines */
8682       cairo_move_to (cr, 20, 10);
8683       cairo_line_to (cr, 40, 20);
8684       cairo_arc (cr, 60, 60, 20, 0, M_PI);
8685       cairo_line_to (cr, 80, 20);
8686
8687       cairo_set_source_rgb (cr, 0, 0, 0);
8688       cairo_set_line_width (cr, 5);
8689       cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND);
8690       cairo_set_line_join (cr, CAIRO_LINE_JOIN_ROUND);
8691
8692       cairo_stroke (cr);
8693
8694       /* Draw some text */
8695       layout = gtk_print_context_create_layout (context);
8696       pango_layout_set_text (layout, "Hello World! Printing is easy", -1);
8697       desc = pango_font_description_from_string ("sans 28");
8698       pango_layout_set_font_description (layout, desc);
8699       pango_font_description_free (desc);
8700
8701       cairo_move_to (cr, 30, 20);
8702       pango_cairo_layout_path (cr, layout);
8703
8704       /* Font Outline */
8705       cairo_set_source_rgb (cr, 0.93, 1.0, 0.47);
8706       cairo_set_line_width (cr, 0.5);
8707       cairo_stroke_preserve (cr);
8708
8709       /* Font Fill */
8710       cairo_set_source_rgb (cr, 0, 0.0, 1.0);
8711       cairo_fill (cr);
8712
8713       g_object_unref (layout);
8714     }
8715
8716   Printing support was added in GTK+ 2.10.
8717
8718110.2 Usage
8719===========
8720
8721 -- Class: <gtk-print-context>
8722     Derives from '<gobject>'.
8723
8724     This class defines no direct slots.
8725
8726 -- Function: gtk-print-context-get-cairo-context
8727          (self '<gtk-print-context>') =>  (ret 'cairo-t')
8728 -- Method: get-cairo-context
8729     Obtains the cairo context that is associated with the
8730     '<gtk-print-context>'.
8731
8732     CONTEXT
8733          a '<gtk-print-context>'
8734
8735     RET
8736          the cairo context of CONTEXT
8737
8738     Since 2.10
8739
8740 -- Function: gtk-print-context-set-cairo-context
8741          (self '<gtk-print-context>') (cr 'cairo-t') (dpi_x 'double')
8742          (dpi_y 'double')
8743 -- Method: set-cairo-context
8744     Sets a new cairo context on a print context.
8745
8746     This function is intended to be used when implementing an internal
8747     print preview, it is not needed for printing, since GTK+ itself
8748     creates a suitable cairo context in that case.
8749
8750     CONTEXT
8751          a '<gtk-print-context>'
8752
8753     CR
8754          the cairo context
8755
8756     DPI-X
8757          the horizontal resolution to use with CR
8758
8759     DPI-Y
8760          the vertical resolution to use with CR
8761
8762     Since 2.10
8763
8764 -- Function: gtk-print-context-get-page-setup
8765          (self '<gtk-print-context>') =>  (ret '<gtk-page-setup>')
8766 -- Method: get-page-setup
8767     Obtains the '<gtk-page-setup>' that determines the page dimensions
8768     of the '<gtk-print-context>'.
8769
8770     CONTEXT
8771          a '<gtk-print-context>'
8772
8773     RET
8774          the page setup of CONTEXT
8775
8776     Since 2.10
8777
8778 -- Function: gtk-print-context-get-width (self '<gtk-print-context>')
8779          =>  (ret 'double')
8780 -- Method: get-width
8781     Obtains the width of the '<gtk-print-context>', in pixels.
8782
8783     CONTEXT
8784          a '<gtk-print-context>'
8785
8786     RET
8787          the width of CONTEXT
8788
8789     Since 2.10
8790
8791 -- Function: gtk-print-context-get-height (self '<gtk-print-context>')
8792          =>  (ret 'double')
8793 -- Method: get-height
8794     Obtains the height of the '<gtk-print-context>', in pixels.
8795
8796     CONTEXT
8797          a '<gtk-print-context>'
8798
8799     RET
8800          the height of CONTEXT
8801
8802     Since 2.10
8803
8804 -- Function: gtk-print-context-get-dpi-x (self '<gtk-print-context>')
8805          =>  (ret 'double')
8806 -- Method: get-dpi-x
8807     Obtains the horizontal resolution of the '<gtk-print-context>', in
8808     dots per inch.
8809
8810     CONTEXT
8811          a '<gtk-print-context>'
8812
8813     RET
8814          the horizontal resolution of CONTEXT
8815
8816     Since 2.10
8817
8818 -- Function: gtk-print-context-get-dpi-y (self '<gtk-print-context>')
8819          =>  (ret 'double')
8820 -- Method: get-dpi-y
8821     Obtains the vertical resolution of the '<gtk-print-context>', in
8822     dots per inch.
8823
8824     CONTEXT
8825          a '<gtk-print-context>'
8826
8827     RET
8828          the vertical resolution of CONTEXT
8829
8830     Since 2.10
8831
8832 -- Function: gtk-print-context-get-pango-fontmap
8833          (self '<gtk-print-context>') =>  (ret '<pango-font-map>')
8834 -- Method: get-pango-fontmap
8835     Returns a '<pango-font-map>' that is suitable for use with the
8836     '<gtk-print-context>'.
8837
8838     CONTEXT
8839          a '<gtk-print-context>'
8840
8841     RET
8842          the font map of CONTEXT
8843
8844     Since 2.10
8845
8846
8847File: guile-gnome-gtk.info,  Node: GtkPrintSettings,  Next: GtkPageSetup,  Prev: GtkPrintContext,  Up: Top
8848
8849111 GtkPrintSettings
8850********************
8851
8852Stores print settings
8853
8854111.1 Overview
8855==============
8856
8857A GtkPrintSettings object represents the settings of a print dialog in a
8858system-independent way.  The main use for this object is that once
8859you've printed you can get a settings object that represents the
8860settings the user chose, and the next time you print you can pass that
8861object in so that the user doesn't have to re-set all his settings.
8862
8863   Its also possible to enumerate the settings so that you can easily
8864save the settings for the next time your app runs, or even store them in
8865a document.  The predefined keys try to use shared values as much as
8866possible so that moving such a document between systems still works.
8867
8868   Printing support was added in GTK+ 2.10.
8869
8870111.2 Usage
8871===========
8872
8873 -- Class: <gtk-print-settings>
8874     Derives from '<gobject>'.
8875
8876     This class defines no direct slots.
8877
8878 -- Function: gtk-print-settings-new =>  (ret '<gtk-print-settings>')
8879     Creates a new '<gtk-print-settings>' object.
8880
8881     RET
8882          a new '<gtk-print-settings>' object
8883
8884     Since 2.10
8885
8886 -- Function: gtk-print-settings-has-key (self '<gtk-print-settings>')
8887          (key 'mchars') =>  (ret 'bool')
8888 -- Method: has-key
8889     Returns ''#t'', if a value is associated with KEY.
8890
8891     SETTINGS
8892          a '<gtk-print-settings>'
8893
8894     KEY
8895          a key
8896
8897     RET
8898          ''#t'', if KEY has a value
8899
8900     Since 2.10
8901
8902 -- Function: gtk-print-settings-get (self '<gtk-print-settings>')
8903          (key 'mchars') =>  (ret 'mchars')
8904 -- Method: get
8905     Looks up the string value associated with KEY.
8906
8907     SETTINGS
8908          a '<gtk-print-settings>'
8909
8910     KEY
8911          a key
8912
8913     RET
8914          the string value for KEY
8915
8916     Since 2.10
8917
8918 -- Function: gtk-print-settings-set (self '<gtk-print-settings>')
8919          (key 'mchars') (value 'mchars')
8920 -- Method: set
8921     Associates VALUE with KEY.
8922
8923     SETTINGS
8924          a '<gtk-print-settings>'
8925
8926     KEY
8927          a key
8928
8929     VALUE
8930          a string value, or ''#f''
8931
8932     Since 2.10
8933
8934 -- Function: gtk-print-settings-unset (self '<gtk-print-settings>')
8935          (key 'mchars')
8936 -- Method: unset
8937     Removes any value associated with KEY.  This has the same effect as
8938     setting the value to ''#f''.
8939
8940     SETTINGS
8941          a '<gtk-print-settings>'
8942
8943     KEY
8944          a key
8945
8946     Since 2.10
8947
8948 -- Function: gtk-print-settings-get-bool (self '<gtk-print-settings>')
8949          (key 'mchars') =>  (ret 'bool')
8950 -- Method: get-bool
8951     Returns the boolean represented by the value that is associated
8952     with KEY.
8953
8954     The string "true" represents ''#t'', any other string ''#f''.
8955
8956     SETTINGS
8957          a '<gtk-print-settings>'
8958
8959     KEY
8960          a key
8961
8962     RET
8963          ''#t'', if KEY maps to a true value.
8964
8965     Since 2.10
8966
8967 -- Function: gtk-print-settings-set-bool (self '<gtk-print-settings>')
8968          (key 'mchars') (value 'bool')
8969 -- Method: set-bool
8970     Sets KEY to a boolean value.
8971
8972     SETTINGS
8973          a '<gtk-print-settings>'
8974
8975     KEY
8976          a key
8977
8978     VALUE
8979          a boolean
8980
8981     Since 2.10
8982
8983 -- Function: gtk-print-settings-get-double
8984          (self '<gtk-print-settings>') (key 'mchars') =>
8985          (ret 'double')
8986 -- Method: get-double
8987     Returns the double value associated with KEY, or 0.
8988
8989     SETTINGS
8990          a '<gtk-print-settings>'
8991
8992     KEY
8993          a key
8994
8995     RET
8996          the double value of KEY
8997
8998     Since 2.10
8999
9000 -- Function: gtk-print-settings-set-double
9001          (self '<gtk-print-settings>') (key 'mchars') (value 'double')
9002 -- Method: set-double
9003     Sets KEY to a double value.
9004
9005     SETTINGS
9006          a '<gtk-print-settings>'
9007
9008     KEY
9009          a key
9010
9011     VALUE
9012          a double value
9013
9014     Since 2.10
9015
9016 -- Function: gtk-print-settings-get-length
9017          (self '<gtk-print-settings>') (key 'mchars')
9018          (unit '<gtk-unit>') =>  (ret 'double')
9019 -- Method: get-length
9020     Returns the value associated with KEY, interpreted as a length.
9021     The returned value is converted to UNITS.
9022
9023     SETTINGS
9024          a '<gtk-print-settings>'
9025
9026     KEY
9027          a key
9028
9029     UNIT
9030          the unit of the return value
9031
9032     RET
9033          the length value of KEY, converted to UNIT
9034
9035     Since 2.10
9036
9037 -- Function: gtk-print-settings-set-length
9038          (self '<gtk-print-settings>') (key 'mchars') (value 'double')
9039          (unit '<gtk-unit>')
9040 -- Method: set-length
9041     Associates a length in units of UNIT with KEY.
9042
9043     SETTINGS
9044          a '<gtk-print-settings>'
9045
9046     KEY
9047          a key
9048
9049     VALUE
9050          a length
9051
9052     UNIT
9053          the unit of LENGTH
9054
9055     Since 2.10
9056
9057 -- Function: gtk-print-settings-get-int (self '<gtk-print-settings>')
9058          (key 'mchars') =>  (ret 'int')
9059 -- Method: get-int
9060     Returns the integer value of KEY, or 0.
9061
9062     SETTINGS
9063          a '<gtk-print-settings>'
9064
9065     KEY
9066          a key
9067
9068     RET
9069          the integer value of KEY
9070
9071     Since 2.10
9072
9073 -- Function: gtk-print-settings-set-int (self '<gtk-print-settings>')
9074          (key 'mchars') (value 'int')
9075 -- Method: set-int
9076     Sets KEY to an integer value.
9077
9078     SETTINGS
9079          a '<gtk-print-settings>'
9080
9081     KEY
9082          a key
9083
9084     VALUE
9085          an integer
9086
9087     Since 2.10
9088
9089 -- Function: gtk-print-settings-get-printer
9090          (self '<gtk-print-settings>') =>  (ret 'mchars')
9091 -- Method: get-printer
9092     Convenience function to obtain the value of
9093     'GTK_PRINT_SETTINGS_PRINTER'.
9094
9095     SETTINGS
9096          a '<gtk-print-settings>'
9097
9098     RET
9099          the printer name
9100
9101     Since 2.10
9102
9103 -- Function: gtk-print-settings-set-printer
9104          (self '<gtk-print-settings>') (printer 'mchars')
9105 -- Method: set-printer
9106     Convenience function to set 'GTK_PRINT_SETTINGS_PRINTER' to
9107     PRINTER.
9108
9109     SETTINGS
9110          a '<gtk-print-settings>'
9111
9112     PRINTER
9113          the printer name
9114
9115     Since 2.10
9116
9117 -- Function: gtk-print-settings-get-orientation
9118          (self '<gtk-print-settings>') =>
9119          (ret '<gtk-page-orientation>')
9120 -- Method: get-orientation
9121     Get the value of 'GTK_PRINT_SETTINGS_ORIENTATION', converted to a
9122     '<gtk-page-orientation>'.
9123
9124     SETTINGS
9125          a '<gtk-print-settings>'
9126
9127     RET
9128          the orientation
9129
9130     Since 2.10
9131
9132 -- Function: gtk-print-settings-set-orientation
9133          (self '<gtk-print-settings>')
9134          (orientation '<gtk-page-orientation>')
9135 -- Method: set-orientation
9136     Sets the value of 'GTK_PRINT_SETTINGS_ORIENTATION'.
9137
9138     SETTINGS
9139          a '<gtk-print-settings>'
9140
9141     ORIENTATION
9142          a page orientation
9143
9144     Since 2.10
9145
9146 -- Function: gtk-print-settings-get-paper-size
9147          (self '<gtk-print-settings>') =>  (ret '<gtk-paper-size>')
9148 -- Method: get-paper-size
9149     Gets the value of 'GTK_PRINT_SETTINGS_PAPER_FORMAT', converted to a
9150     '<gtk-paper-size>'.
9151
9152     SETTINGS
9153          a '<gtk-print-settings>'
9154
9155     RET
9156          the paper size
9157
9158     Since 2.10
9159
9160 -- Function: gtk-print-settings-set-paper-size
9161          (self '<gtk-print-settings>') (paper_size '<gtk-paper-size>')
9162 -- Method: set-paper-size
9163     Sets the value of 'GTK_PRINT_SETTINGS_PAPER_FORMAT',
9164     'GTK_PRINT_SETTINGS_PAPER_WIDTH' and
9165     'GTK_PRINT_SETTINGS_PAPER_HEIGHT'.
9166
9167     SETTINGS
9168          a '<gtk-print-settings>'
9169
9170     PAPER-SIZE
9171          a paper size
9172
9173     Since 2.10
9174
9175 -- Function: gtk-print-settings-get-paper-width
9176          (self '<gtk-print-settings>') (unit '<gtk-unit>') =>
9177          (ret 'double')
9178 -- Method: get-paper-width
9179     Gets the value of 'GTK_PRINT_SETTINGS_PAPER_WIDTH', converted to
9180     UNIT.
9181
9182     SETTINGS
9183          a '<gtk-print-settings>'
9184
9185     UNIT
9186          the unit for the return value
9187
9188     RET
9189          the paper width, in units of UNIT
9190
9191     Since 2.10
9192
9193 -- Function: gtk-print-settings-set-paper-width
9194          (self '<gtk-print-settings>') (width 'double')
9195          (unit '<gtk-unit>')
9196 -- Method: set-paper-width
9197     Sets the value of 'GTK_PRINT_SETTINGS_PAPER_WIDTH'.
9198
9199     SETTINGS
9200          a '<gtk-print-settings>'
9201
9202     WIDTH
9203          the paper width
9204
9205     UNIT
9206          the units of WIDTH
9207
9208     Since 2.10
9209
9210 -- Function: gtk-print-settings-get-paper-height
9211          (self '<gtk-print-settings>') (unit '<gtk-unit>') =>
9212          (ret 'double')
9213 -- Method: get-paper-height
9214     Gets the value of 'GTK_PRINT_SETTINGS_PAPER_HEIGHT', converted to
9215     UNIT.
9216
9217     SETTINGS
9218          a '<gtk-print-settings>'
9219
9220     UNIT
9221          the unit for the return value
9222
9223     RET
9224          the paper height, in units of UNIT
9225
9226     Since 2.10
9227
9228 -- Function: gtk-print-settings-set-paper-height
9229          (self '<gtk-print-settings>') (height 'double')
9230          (unit '<gtk-unit>')
9231 -- Method: set-paper-height
9232     Sets the value of 'GTK_PRINT_SETTINGS_PAPER_HEIGHT'.
9233
9234     SETTINGS
9235          a '<gtk-print-settings>'
9236
9237     HEIGHT
9238          the paper height
9239
9240     UNIT
9241          the units of HEIGHT
9242
9243     Since 2.10
9244
9245 -- Function: gtk-print-settings-get-use-color
9246          (self '<gtk-print-settings>') =>  (ret 'bool')
9247 -- Method: get-use-color
9248     Gets the value of 'GTK_PRINT_SETTINGS_USE_COLOR'.
9249
9250     SETTINGS
9251          a '<gtk-print-settings>'
9252
9253     RET
9254          whether to use color
9255
9256     Since 2.10
9257
9258 -- Function: gtk-print-settings-set-use-color
9259          (self '<gtk-print-settings>') (use_color 'bool')
9260 -- Method: set-use-color
9261     Sets the value of 'GTK_PRINT_SETTINGS_USE_COLOR'.
9262
9263     SETTINGS
9264          a '<gtk-print-settings>'
9265
9266     USE-COLOR
9267          whether to use color
9268
9269     Since 2.10
9270
9271 -- Function: gtk-print-settings-get-collate
9272          (self '<gtk-print-settings>') =>  (ret 'bool')
9273 -- Method: get-collate
9274     Gets the value of 'GTK_PRINT_SETTINGS_COLLATE'.
9275
9276     SETTINGS
9277          a '<gtk-print-settings>'
9278
9279     RET
9280          whether to collate the printed pages
9281
9282     Since 2.10
9283
9284 -- Function: gtk-print-settings-set-collate
9285          (self '<gtk-print-settings>') (collate 'bool')
9286 -- Method: set-collate
9287     Sets the value of 'GTK_PRINT_SETTINGS_COLLATE'.
9288
9289     SETTINGS
9290          a '<gtk-print-settings>'
9291
9292     COLLATE
9293          whether to collate the output
9294
9295     Since 2.10
9296
9297 -- Function: gtk-print-settings-get-reverse
9298          (self '<gtk-print-settings>') =>  (ret 'bool')
9299 -- Method: get-reverse
9300     Gets the value of 'GTK_PRINT_SETTINGS_REVERSE'.
9301
9302     SETTINGS
9303          a '<gtk-print-settings>'
9304
9305     RET
9306          whether to reverse the order of the printed pages
9307
9308     Since 2.10
9309
9310 -- Function: gtk-print-settings-set-reverse
9311          (self '<gtk-print-settings>') (reverse 'bool')
9312 -- Method: set-reverse
9313     Sets the value of 'GTK_PRINT_SETTINGS_REVERSE'.
9314
9315     SETTINGS
9316          a '<gtk-print-settings>'
9317
9318     REVERSE
9319          whether to reverse the output
9320
9321     Since 2.10
9322
9323 -- Function: gtk-print-settings-get-duplex
9324          (self '<gtk-print-settings>') =>  (ret '<gtk-print-duplex>')
9325 -- Method: get-duplex
9326     Gets the value of 'GTK_PRINT_SETTINGS_DUPLEX'.
9327
9328     SETTINGS
9329          a '<gtk-print-settings>'
9330
9331     RET
9332          whether to print the output in duplex.
9333
9334     Since 2.10
9335
9336 -- Function: gtk-print-settings-set-duplex
9337          (self '<gtk-print-settings>') (duplex '<gtk-print-duplex>')
9338 -- Method: set-duplex
9339     Sets the value of 'GTK_PRINT_SETTINGS_DUPLEX'.
9340
9341     SETTINGS
9342          a '<gtk-print-settings>'
9343
9344     DUPLEX
9345          a '<gtk-print-duplex>' value
9346
9347     Since 2.10
9348
9349 -- Function: gtk-print-settings-get-quality
9350          (self '<gtk-print-settings>') =>  (ret '<gtk-print-quality>')
9351 -- Method: get-quality
9352     Gets the value of 'GTK_PRINT_SETTINGS_QUALITY'.
9353
9354     SETTINGS
9355          a '<gtk-print-settings>'
9356
9357     RET
9358          the print quality
9359
9360     Since 2.10
9361
9362 -- Function: gtk-print-settings-set-quality
9363          (self '<gtk-print-settings>') (quality '<gtk-print-quality>')
9364 -- Method: set-quality
9365     Sets the value of 'GTK_PRINT_SETTINGS_QUALITY'.
9366
9367     SETTINGS
9368          a '<gtk-print-settings>'
9369
9370     QUALITY
9371          a '<gtk-print-quality>' value
9372
9373     Since 2.10
9374
9375 -- Function: gtk-print-settings-get-n-copies
9376          (self '<gtk-print-settings>') =>  (ret 'int')
9377 -- Method: get-n-copies
9378     Gets the value of 'GTK_PRINT_SETTINGS_N_COPIES'.
9379
9380     SETTINGS
9381          a '<gtk-print-settings>'
9382
9383     RET
9384          the number of copies to print
9385
9386     Since 2.10
9387
9388 -- Function: gtk-print-settings-set-n-copies
9389          (self '<gtk-print-settings>') (num_copies 'int')
9390 -- Method: set-n-copies
9391     Sets the value of 'GTK_PRINT_SETTINGS_N_COPIES'.
9392
9393     SETTINGS
9394          a '<gtk-print-settings>'
9395
9396     NUM-COPIES
9397          the number of copies
9398
9399     Since 2.10
9400
9401 -- Function: gtk-print-settings-get-number-up
9402          (self '<gtk-print-settings>') =>  (ret 'int')
9403 -- Method: get-number-up
9404     Gets the value of 'GTK_PRINT_SETTINGS_NUMBER_UP'.
9405
9406     SETTINGS
9407          a '<gtk-print-settings>'
9408
9409     RET
9410          the number of pages per sheet
9411
9412     Since 2.10
9413
9414 -- Function: gtk-print-settings-set-number-up
9415          (self '<gtk-print-settings>') (number_up 'int')
9416 -- Method: set-number-up
9417     Sets the value of 'GTK_PRINT_SETTINGS_NUMBER_UP'.
9418
9419     SETTINGS
9420          a '<gtk-print-settings>'
9421
9422     NUMBER-UP
9423          the number of pages per sheet
9424
9425     Since 2.10
9426
9427 -- Function: gtk-print-settings-get-resolution
9428          (self '<gtk-print-settings>') =>  (ret 'int')
9429 -- Method: get-resolution
9430     Gets the value of 'GTK_PRINT_SETTINGS_RESOLUTION'.
9431
9432     SETTINGS
9433          a '<gtk-print-settings>'
9434
9435     RET
9436          the resolution in dpi
9437
9438     Since 2.10
9439
9440 -- Function: gtk-print-settings-set-resolution
9441          (self '<gtk-print-settings>') (resolution 'int')
9442 -- Method: set-resolution
9443     Sets the value of 'GTK_PRINT_SETTINGS_RESOLUTION'.
9444
9445     SETTINGS
9446          a '<gtk-print-settings>'
9447
9448     RESOLUTION
9449          the resolution in dpi
9450
9451     Since 2.10
9452
9453 -- Function: gtk-print-settings-get-scale (self '<gtk-print-settings>')
9454          =>  (ret 'double')
9455 -- Method: get-scale
9456     Gets the value of 'GTK_PRINT_SETTINGS_SCALE'.
9457
9458     SETTINGS
9459          a '<gtk-print-settings>'
9460
9461     RET
9462          the scale in percent
9463
9464     Since 2.10
9465
9466 -- Function: gtk-print-settings-set-scale (self '<gtk-print-settings>')
9467          (scale 'double')
9468 -- Method: set-scale
9469     Sets the value of 'GTK_PRINT_SETTINGS_SCALE'.
9470
9471     SETTINGS
9472          a '<gtk-print-settings>'
9473
9474     SCALE
9475          the scale in percent
9476
9477     Since 2.10
9478
9479 -- Function: gtk-print-settings-get-page-set
9480          (self '<gtk-print-settings>') =>  (ret '<gtk-page-set>')
9481 -- Method: get-page-set
9482     Gets the value of 'GTK_PRINT_SETTINGS_PAGE_SET'.
9483
9484     SETTINGS
9485          a '<gtk-print-settings>'
9486
9487     RET
9488          the set of pages to print
9489
9490     Since 2.10
9491
9492 -- Function: gtk-print-settings-set-page-set
9493          (self '<gtk-print-settings>') (page_set '<gtk-page-set>')
9494 -- Method: set-page-set
9495     Sets the value of 'GTK_PRINT_SETTINGS_PAGE_SET'.
9496
9497     SETTINGS
9498          a '<gtk-print-settings>'
9499
9500     PAGE-SET
9501          a '<gtk-page-set>' value
9502
9503     Since 2.10
9504
9505 -- Function: gtk-print-settings-get-media-type
9506          (self '<gtk-print-settings>') =>  (ret 'mchars')
9507 -- Method: get-media-type
9508     Gets the value of 'GTK_PRINT_SETTINGS_MEDIA_TYPE'.
9509
9510     The set of media types is defined in PWG 5101.1-2002 PWG.
9511
9512     SETTINGS
9513          a '<gtk-print-settings>'
9514
9515     RET
9516          the media type
9517
9518     Since 2.10
9519
9520 -- Function: gtk-print-settings-set-media-type
9521          (self '<gtk-print-settings>') (media_type 'mchars')
9522 -- Method: set-media-type
9523     Sets the value of 'GTK_PRINT_SETTINGS_MEDIA_TYPE'.
9524
9525     The set of media types is defined in PWG 5101.1-2002 PWG.
9526
9527     SETTINGS
9528          a '<gtk-print-settings>'
9529
9530     MEDIA-TYPE
9531          the media type
9532
9533     Since 2.10
9534
9535 -- Function: gtk-print-settings-get-dither
9536          (self '<gtk-print-settings>') =>  (ret 'mchars')
9537 -- Method: get-dither
9538     Gets the value of 'GTK_PRINT_SETTINGS_DITHER'.
9539
9540     SETTINGS
9541          a '<gtk-print-settings>'
9542
9543     RET
9544          the dithering that is used
9545
9546     Since 2.10
9547
9548 -- Function: gtk-print-settings-set-dither
9549          (self '<gtk-print-settings>') (dither 'mchars')
9550 -- Method: set-dither
9551     Sets the value of 'GTK_PRINT_SETTINGS_DITHER'.
9552
9553     SETTINGS
9554          a '<gtk-print-settings>'
9555
9556     DITHER
9557          the dithering that is used
9558
9559     Since 2.10
9560
9561 -- Function: gtk-print-settings-get-finishings
9562          (self '<gtk-print-settings>') =>  (ret 'mchars')
9563 -- Method: get-finishings
9564     Gets the value of 'GTK_PRINT_SETTINGS_FINISHINGS'.
9565
9566     SETTINGS
9567          a '<gtk-print-settings>'
9568
9569     RET
9570          the finishings
9571
9572     Since 2.10
9573
9574 -- Function: gtk-print-settings-set-finishings
9575          (self '<gtk-print-settings>') (finishings 'mchars')
9576 -- Method: set-finishings
9577     Sets the value of 'GTK_PRINT_SETTINGS_FINISHINGS'.
9578
9579     SETTINGS
9580          a '<gtk-print-settings>'
9581
9582     FINISHINGS
9583          the finishings
9584
9585     Since 2.10
9586
9587 -- Function: gtk-print-settings-get-output-bin
9588          (self '<gtk-print-settings>') =>  (ret 'mchars')
9589 -- Method: get-output-bin
9590     Gets the value of 'GTK_PRINT_SETTINGS_OUTPUT_BIN'.
9591
9592     SETTINGS
9593          a '<gtk-print-settings>'
9594
9595     RET
9596          the output bin
9597
9598     Since 2.10
9599
9600 -- Function: gtk-print-settings-set-output-bin
9601          (self '<gtk-print-settings>') (output_bin 'mchars')
9602 -- Method: set-output-bin
9603     Sets the value of 'GTK_PRINT_SETTINGS_OUTPUT_BIN'.
9604
9605     SETTINGS
9606          a '<gtk-print-settings>'
9607
9608     OUTPUT-BIN
9609          the output bin
9610
9611     Since 2.10
9612
9613
9614File: guile-gnome-gtk.info,  Node: GtkPageSetup,  Next: GtkPaperSize,  Prev: GtkPrintSettings,  Up: Top
9615
9616112 GtkPageSetup
9617****************
9618
9619Stores page setup information
9620
9621112.1 Overview
9622==============
9623
9624A GtkPageSetup object stores the page size, orientation and margins.
9625The idea is that you can get one of these from the page setup dialog and
9626then pass it to the '<gtk-print-operation>' when printing.  The benefit
9627of splitting this out of the '<gtk-print-settings>' is that these affect
9628the actual layout of the page, and thus need to be set long before user
9629prints.
9630
9631   The margins specified in this object are the "print margins", i.e.
9632the parts of the page that the printer cannot print on.  These are
9633different from the layout margins that a word processor uses; they are
9634typically used to determine the _minimal_ size for the layout margins.
9635
9636   To obtain a '<gtk-page-setup>' use 'gtk-page-setup-new' to get the
9637defaults, or use 'gtk-print-run-page-setup-dialog' to show the page
9638setup dialog and receive the resulting page setup.
9639
9640
9641     static GtkPrintSettings *settings = NULL;
9642     static GtkPageSetup *page_setup = NULL;
9643
9644     static void
9645     do_page_setup (void)
9646     {
9647       GtkPageSetup *new_page_setup;
9648
9649       if (settings == NULL)
9650         settings = gtk_print_settings_new ();
9651
9652       new_page_setup = gtk_print_run_page_setup_dialog (GTK_WINDOW (main_window),
9653                                                         page_setup, settings);
9654
9655       if (page_setup)
9656         g_object_unref (page_setup);
9657
9658       page_setup = new_page_setup;
9659     }
9660
9661   Printing support was added in GTK+ 2.10.
9662
9663112.2 Usage
9664===========
9665
9666 -- Class: <gtk-page-setup>
9667     Derives from '<gobject>'.
9668
9669     This class defines no direct slots.
9670
9671 -- Function: gtk-page-setup-new =>  (ret '<gtk-page-setup>')
9672     Creates a new '<gtk-page-setup>'.
9673
9674     RET
9675          a new '<gtk-page-setup>'.
9676
9677     Since 2.10
9678
9679 -- Function: gtk-page-setup-get-orientation (self '<gtk-page-setup>')
9680          =>  (ret '<gtk-page-orientation>')
9681 -- Method: get-orientation
9682     Gets the page orientation of the '<gtk-page-setup>'.
9683
9684     SETUP
9685          a '<gtk-page-setup>'
9686
9687     RET
9688          the page orientation
9689
9690     Since 2.10
9691
9692 -- Function: gtk-page-setup-set-orientation (self '<gtk-page-setup>')
9693          (orientation '<gtk-page-orientation>')
9694 -- Method: set-orientation
9695     Sets the page orientation of the '<gtk-page-setup>'.
9696
9697     SETUP
9698          a '<gtk-page-setup>'
9699
9700     ORIENTATION
9701          a '<gtk-page-orientation>' value
9702
9703     Since 2.10
9704
9705 -- Function: gtk-page-setup-get-paper-size (self '<gtk-page-setup>')
9706          =>  (ret '<gtk-paper-size>')
9707 -- Method: get-paper-size
9708     Gets the paper size of the '<gtk-page-setup>'.
9709
9710     SETUP
9711          a '<gtk-page-setup>'
9712
9713     RET
9714          the paper size
9715
9716     Since 2.10
9717
9718 -- Function: gtk-page-setup-set-paper-size (self '<gtk-page-setup>')
9719          (size '<gtk-paper-size>')
9720 -- Method: set-paper-size
9721     Sets the paper size of the '<gtk-page-setup>' without changing the
9722     margins.  See 'gtk-page-setup-set-paper-size-and-default-margins'.
9723
9724     SETUP
9725          a '<gtk-page-setup>'
9726
9727     SIZE
9728          a '<gtk-paper-size>'
9729
9730     Since 2.10
9731
9732 -- Function: gtk-page-setup-get-top-margin (self '<gtk-page-setup>')
9733          (unit '<gtk-unit>') =>  (ret 'double')
9734 -- Method: get-top-margin
9735     Gets the top margin in units of UNIT.
9736
9737     SETUP
9738          a '<gtk-page-setup>'
9739
9740     UNIT
9741          the unit for the return value
9742
9743     RET
9744          the top margin
9745
9746     Since 2.10
9747
9748 -- Function: gtk-page-setup-set-top-margin (self '<gtk-page-setup>')
9749          (margin 'double') (unit '<gtk-unit>')
9750 -- Method: set-top-margin
9751     Sets the top margin of the '<gtk-page-setup>'.
9752
9753     SETUP
9754          a '<gtk-page-setup>'
9755
9756     MARGIN
9757          the new top margin in units of UNIT
9758
9759     UNIT
9760          the units for MARGIN
9761
9762     Since 2.10
9763
9764 -- Function: gtk-page-setup-get-bottom-margin (self '<gtk-page-setup>')
9765          (unit '<gtk-unit>') =>  (ret 'double')
9766 -- Method: get-bottom-margin
9767     Gets the bottom margin in units of UNIT.
9768
9769     SETUP
9770          a '<gtk-page-setup>'
9771
9772     UNIT
9773          the unit for the return value
9774
9775     RET
9776          the bottom margin
9777
9778     Since 2.10
9779
9780 -- Function: gtk-page-setup-set-bottom-margin (self '<gtk-page-setup>')
9781          (margin 'double') (unit '<gtk-unit>')
9782 -- Method: set-bottom-margin
9783     Sets the bottom margin of the '<gtk-page-setup>'.
9784
9785     SETUP
9786          a '<gtk-page-setup>'
9787
9788     MARGIN
9789          the new bottom margin in units of UNIT
9790
9791     UNIT
9792          the units for MARGIN
9793
9794     Since 2.10
9795
9796 -- Function: gtk-page-setup-get-left-margin (self '<gtk-page-setup>')
9797          (unit '<gtk-unit>') =>  (ret 'double')
9798 -- Method: get-left-margin
9799     Gets the left margin in units of UNIT.
9800
9801     SETUP
9802          a '<gtk-page-setup>'
9803
9804     UNIT
9805          the unit for the return value
9806
9807     RET
9808          the left margin
9809
9810     Since 2.10
9811
9812 -- Function: gtk-page-setup-set-left-margin (self '<gtk-page-setup>')
9813          (margin 'double') (unit '<gtk-unit>')
9814 -- Method: set-left-margin
9815     Sets the left margin of the '<gtk-page-setup>'.
9816
9817     SETUP
9818          a '<gtk-page-setup>'
9819
9820     MARGIN
9821          the new left margin in units of UNIT
9822
9823     UNIT
9824          the units for MARGIN
9825
9826     Since 2.10
9827
9828 -- Function: gtk-page-setup-get-right-margin (self '<gtk-page-setup>')
9829          (unit '<gtk-unit>') =>  (ret 'double')
9830 -- Method: get-right-margin
9831     Gets the right margin in units of UNIT.
9832
9833     SETUP
9834          a '<gtk-page-setup>'
9835
9836     UNIT
9837          the unit for the return value
9838
9839     RET
9840          the right margin
9841
9842     Since 2.10
9843
9844 -- Function: gtk-page-setup-set-right-margin (self '<gtk-page-setup>')
9845          (margin 'double') (unit '<gtk-unit>')
9846 -- Method: set-right-margin
9847     Sets the right margin of the '<gtk-page-setup>'.
9848
9849     SETUP
9850          a '<gtk-page-setup>'
9851
9852     MARGIN
9853          the new right margin in units of UNIT
9854
9855     UNIT
9856          the units for MARGIN
9857
9858     Since 2.10
9859
9860 -- Function: gtk-page-setup-get-paper-width (self '<gtk-page-setup>')
9861          (unit '<gtk-unit>') =>  (ret 'double')
9862 -- Method: get-paper-width
9863     Returns the paper width in units of UNIT.
9864
9865     Note that this function takes orientation, but not margins into
9866     consideration.  See 'gtk-page-setup-get-page-width'.
9867
9868     SETUP
9869          a '<gtk-page-setup>'
9870
9871     UNIT
9872          the unit for the return value
9873
9874     RET
9875          the paper width.
9876
9877     Since 2.10
9878
9879 -- Function: gtk-page-setup-get-paper-height (self '<gtk-page-setup>')
9880          (unit '<gtk-unit>') =>  (ret 'double')
9881 -- Method: get-paper-height
9882     Returns the paper height in units of UNIT.
9883
9884     Note that this function takes orientation, but not margins into
9885     consideration.  See 'gtk-page-setup-get-page-height'.
9886
9887     SETUP
9888          a '<gtk-page-setup>'
9889
9890     UNIT
9891          the unit for the return value
9892
9893     RET
9894          the paper height.
9895
9896     Since 2.10
9897
9898 -- Function: gtk-page-setup-get-page-width (self '<gtk-page-setup>')
9899          (unit '<gtk-unit>') =>  (ret 'double')
9900 -- Method: get-page-width
9901     Returns the page width in units of UNIT.
9902
9903     Note that this function takes orientation and margins into
9904     consideration.  See 'gtk-page-setup-get-paper-width'.
9905
9906     SETUP
9907          a '<gtk-page-setup>'
9908
9909     UNIT
9910          the unit for the return value
9911
9912     RET
9913          the page width.
9914
9915     Since 2.10
9916
9917 -- Function: gtk-page-setup-get-page-height (self '<gtk-page-setup>')
9918          (unit '<gtk-unit>') =>  (ret 'double')
9919 -- Method: get-page-height
9920     Returns the page height in units of UNIT.
9921
9922     Note that this function takes orientation and margins into
9923     consideration.  See 'gtk-page-setup-get-paper-height'.
9924
9925     SETUP
9926          a '<gtk-page-setup>'
9927
9928     UNIT
9929          the unit for the return value
9930
9931     RET
9932          the page height.
9933
9934     Since 2.10
9935
9936
9937File: guile-gnome-gtk.info,  Node: GtkPaperSize,  Next: GtkAdjustment,  Prev: GtkPageSetup,  Up: Top
9938
9939113 GtkPaperSize
9940****************
9941
9942Support for named paper sizes
9943
9944113.1 Overview
9945==============
9946
9947GtkPaperSize handles paper sizes.  It uses the standard called "PWG
99485101.1-2002 PWG: Standard for Media Standardized Names" to name the
9949paper sizes (and to get the data for the page sizes).  In addition to
9950standard paper sizes, GtkPaperSize allows to construct custom paper
9951sizes with arbitrary dimensions.
9952
9953   The '<gtk-paper-size>' object stores not only the dimensions (width
9954and height) of a paper size and its name, it also provides default print
9955margins.
9956
9957   Printing support has been added in GTK+ 2.10.
9958
9959113.2 Usage
9960===========
9961
9962 -- Class: <gtk-paper-size>
9963     Derives from '<gboxed>'.
9964
9965     This class defines no direct slots.
9966
9967 -- Function: gtk-paper-size-new (name 'mchars') =>
9968          (ret '<gtk-paper-size>')
9969     Creates a new '<gtk-paper-size>' object by parsing a PWG
9970     5101.1-2002 PWG paper name.
9971
9972     If NAME is ''#f'', the default paper size is returned, see
9973     'gtk-paper-size-get-default'.
9974
9975     NAME
9976          a paper size name, or ''#f''
9977
9978     RET
9979          a new '<gtk-paper-size>', use 'gtk-paper-size-free' to free it
9980
9981     Since 2.10
9982
9983 -- Function: gtk-paper-size-new-from-ppd (ppd_name 'mchars')
9984          (ppd_display_name 'mchars') (width 'double') (height 'double')
9985          =>  (ret '<gtk-paper-size>')
9986     Creates a new '<gtk-paper-size>' object by using PPD information.
9987
9988     If PPD-NAME is not a recognized PPD paper name, PPD-DISPLAY-NAME,
9989     WIDTH and HEIGHT are used to construct a custom '<gtk-paper-size>'
9990     object.
9991
9992     PPD-NAME
9993          a PPD paper name
9994
9995     PPD-DISPLAY-NAME
9996          the corresponding human-readable name
9997
9998     WIDTH
9999          the paper width, in points
10000
10001     HEIGHT
10002          the paper height in points
10003
10004     RET
10005          a new '<gtk-paper-size>', use 'gtk-paper-size-free' to free it
10006
10007     Since 2.10
10008
10009 -- Function: gtk-paper-size-new-custom (name 'mchars')
10010          (display_name 'mchars') (width 'double') (height 'double')
10011          (unit '<gtk-unit>') =>  (ret '<gtk-paper-size>')
10012     Creates a new '<gtk-paper-size>' object with the given parameters.
10013
10014     NAME
10015          the paper name
10016
10017     DISPLAY-NAME
10018          the human-readable name
10019
10020     WIDTH
10021          the paper width, in units of UNIT
10022
10023     HEIGHT
10024          the paper height, in units of UNIT
10025
10026     UNIT
10027          the unit for WIDTH and HEIGHT
10028
10029     RET
10030          a new '<gtk-paper-size>' object, use 'gtk-paper-size-free' to
10031          free it
10032
10033     Since 2.10
10034
10035 -- Function: gtk-paper-size-is-equal (self '<gtk-paper-size>')
10036          (size2 '<gtk-paper-size>') =>  (ret 'bool')
10037     Compares two '<gtk-paper-size>' objects.
10038
10039     SIZE1
10040          a '<gtk-paper-size>' object
10041
10042     SIZE2
10043          another '<gtk-paper-size>' object
10044
10045     RET
10046          ''#t'', if SIZE1 and SIZE2 represent the same paper size
10047
10048     Since 2.10
10049
10050 -- Function: gtk-paper-size-get-name (self '<gtk-paper-size>') =>
10051          (ret 'mchars')
10052     Gets the name of the '<gtk-paper-size>'.
10053
10054     SIZE
10055          a '<gtk-paper-size>' object
10056
10057     RET
10058          the name of SIZE
10059
10060     Since 2.10
10061
10062 -- Function: gtk-paper-size-get-display-name (self '<gtk-paper-size>')
10063          =>  (ret 'mchars')
10064     Gets the human-readable name of the '<gtk-paper-size>'.
10065
10066     SIZE
10067          a '<gtk-paper-size>' object
10068
10069     RET
10070          the human-readable name of SIZE
10071
10072     Since 2.10
10073
10074 -- Function: gtk-paper-size-get-ppd-name (self '<gtk-paper-size>') =>
10075          (ret 'mchars')
10076     Gets the PPD name of the '<gtk-paper-size>', which may be ''#f''.
10077
10078     SIZE
10079          a '<gtk-paper-size>' object
10080
10081     RET
10082          the PPD name of SIZE
10083
10084     Since 2.10
10085
10086 -- Function: gtk-paper-size-get-width (self '<gtk-paper-size>')
10087          (unit '<gtk-unit>') =>  (ret 'double')
10088     Gets the paper width of the '<gtk-paper-size>', in units of UNIT.
10089
10090     SIZE
10091          a '<gtk-paper-size>' object
10092
10093     UNIT
10094          the unit for the return value
10095
10096     RET
10097          the paper width
10098
10099     Since 2.10
10100
10101 -- Function: gtk-paper-size-get-height (self '<gtk-paper-size>')
10102          (unit '<gtk-unit>') =>  (ret 'double')
10103     Gets the paper height of the '<gtk-paper-size>', in units of UNIT.
10104
10105     SIZE
10106          a '<gtk-paper-size>' object
10107
10108     UNIT
10109          the unit for the return value
10110
10111     RET
10112          the paper height
10113
10114     Since 2.10
10115
10116 -- Function: gtk-paper-size-is-custom (self '<gtk-paper-size>') =>
10117          (ret 'bool')
10118     Returns ''#t'' if SIZE is not a standard paper size.
10119
10120     SIZE
10121          a '<gtk-paper-size>' object
10122
10123     RET
10124          whether SIZE is a custom paper size.
10125
10126 -- Function: gtk-paper-size-set-size (self '<gtk-paper-size>')
10127          (width 'double') (height 'double') (unit '<gtk-unit>')
10128     Changes the dimensions of a SIZE to WIDTH x HEIGHT.
10129
10130     SIZE
10131          a custom '<gtk-paper-size>' object
10132
10133     WIDTH
10134          the new width in units of UNIT
10135
10136     HEIGHT
10137          the new height in units of UNIT
10138
10139     UNIT
10140          the unit for WIDTH and HEIGHT
10141
10142     Since 2.10
10143
10144 -- Function: gtk-paper-size-get-default =>  (ret 'mchars')
10145     Returns the name of the default paper size, which depends on the
10146     current locale.
10147
10148     RET
10149          the name of the default paper size.  The string is owned by
10150          GTK+ and should not be modified.
10151
10152     Since 2.10
10153
10154