1Gnome2::AppHelper(3)  User Contributed Perl Documentation Gnome2::AppHelper(3)
2
3
4

NAME

6       Gnome2::AppHelper
7

GnomeUIInfo

9       In Gnome2 GnomeUIInfo's are often used as a convenient way to create
10       GUI's.  In Perl, GnomeUIInfo's are always references to arrays of
11       items.  Items can either be references to hashs or references to
12       arrays:
13
14       Hash Reference
15           When using hash references, items are specified by giving key-value
16           pairs.  A typical example:
17
18             { type => "item", label => "Quit", callback => sub { exit(0); } }
19
20           For the list of valid keys, see below.
21
22       Array References
23           When using array references, items are a list of the following
24           keys, in this order:
25
26             type,
27             label,
28             hint,
29             moreinfo,
30             pixmap_type,
31             pixmap_info,
32             accelerator_key and
33             modifiers.
34
35           The example from above would become:
36
37             [ "item", "Item", undef, sub { exit(0); },
38               undef, undef, undef, undef ]
39
40       To create multi-level structures, you use the "subtree" type and the
41       "subtree" key, as in the following example:
42
43         {
44           type => "subtree",
45           label => "Radio Items",
46           subtree => [
47             {
48               type => "radioitems",
49               moreinfo => [
50                 {
51                   type => "item",
52                   label => "A"
53                 },
54                 {
55                   type => "item",
56                   label => "B"
57                 },
58                 {
59                   type => "item",
60                   label => "C"
61                 },
62                 {
63                   type => "item",
64                   label => "D"
65                 },
66                 {
67                   type => "item",
68                   label => "E"
69                 }
70               ]
71             }
72           ]
73         }
74

METHODS

76   Gnome2->accelerators_sync
77   $menu_shell->fill_menu ($uiinfo, $accel_group, $uline_accels, $pos)
78       •   $uiinfo (Gnome2::UIInfo)
79
80       •   $accel_group (Gtk2::AccelGroup)
81
82       •   $uline_accels (boolean)
83
84       •   $pos (integer)
85
86   $toolbar->fill_toolbar ($uiinfo, $accel_group)
87       •   $uiinfo (Gnome2::UIInfo)
88
89       •   $accel_group (Gtk2::AccelGroup)
90
91   list = $parent->find_menu_pos ($path)
92       •   $path (string)
93
94       Returns the GtkWidget and the position associated with the path.
95
96   $bar->install_menu_hints ($uiinfo)
97       •   $uiinfo (Gnome2::UIInfo)
98

SEE ALSO

100       Gnome2
101
103       Copyright (C) 2003-2004 by the gtk2-perl team.
104
105       This software is licensed under the LGPL.  See Gnome2 for a full
106       notice.
107
108
109
110perl v5.34.0                      2022-01-21              Gnome2::AppHelper(3)
Impressum