1Gtk2::Action(3)       User Contributed Perl Documentation      Gtk2::Action(3)
2
3
4

NAME

6       Gtk2::Action - wrapper for GtkAction
7

HIERARCHY

9         Glib::Object
10         +----Gtk2::Action
11

INTERFACES

13         Gtk2::Buildable
14

CONSTRUCTOR

16   action = Gtk2::Action->new (key=>value,...)
17       Create and return a new action object.  Note that this is the "new" of
18       Glib::Object, not "gtk_action_new".  Eg.
19
20           Gtk2::Action->new (name => 'open-foo',
21                              stock_id => 'gtk-open',
22                              tooltip => 'Start a foo');
23
24       The keyword/value style is more flexible and a little clearer than the
25       four direct arguments of "gtk_action_new" (and also works better for
26       subclasses).
27

METHODS

29   $action->set_accel_group ($accel_group)
30       ·   $accel_group (Gtk2::AccelGroup or undef)
31
32   string = $action->get_accel_path
33       Since: gtk+ 2.6
34
35   $action->set_accel_path ($accel_path)
36       ·   $accel_path (string)
37
38   $action->activate
39   boolean = $action->get_always_show_image
40       Since: gtk+ 2.20
41
42   $action->set_always_show_image ($always_show)
43       ·   $always_show (boolean)
44
45       Since: gtk+ 2.20
46
47   $action->block_activate
48       Since: gtk+ 2.16
49
50   $action->block_activate_from ($proxy)
51       ·   $proxy (Gtk2::Widget)
52
53   $action->connect_accelerator
54   $action->connect_proxy ($proxy)
55       ·   $proxy (Gtk2::Widget)
56
57   widget = $action->create_icon ($icon_size)
58       ·   $icon_size (Gtk2::IconSize)
59
60   widget = $action->create_menu
61       Since: gtk+ 2.12
62
63   widget = $action->create_menu_item
64   widget = $action->create_tool_item
65   $action->disconnect_accelerator
66   $action->disconnect_proxy ($proxy)
67       ·   $proxy (Gtk2::Widget)
68
69   string or undef = $action->get_icon_name
70       Since: gtk+ 2.16
71
72   $action->set_icon_name ($icon_name)
73       ·   $icon_name (string or undef)
74
75       Since: gtk+ 2.16
76
77   boolean = $action->get_is_important
78       Since: gtk+ 2.16
79
80   $action->set_is_important ($is_important)
81       ·   $is_important (boolean)
82
83       Since: gtk+ 2.16
84
85   boolean = $action->is_sensitive
86   boolean = $action->is_visible
87   string or undef = $action->get_label
88       Since: gtk+ 2.16
89
90   $action->set_label ($label)
91       ·   $label (string)
92
93       Since: gtk+ 2.16
94
95   string = $action->get_name
96   list = $action->get_proxies
97   boolean = $action->get_sensitive
98   $action->set_sensitive ($sensitive)
99       ·   $sensitive (boolean)
100
101       Since: gtk+ 2.6
102
103   string or undef = $action->get_short_label
104       Since: gtk+ 2.16
105
106   $action->set_short_label ($short_label)
107       ·   $short_label (string)
108
109       Since: gtk+ 2.16
110
111   string or undef = $action->get_stock_id
112       Since: gtk+ 2.16
113
114   $action->set_stock_id ($stock_id)
115       ·   $stock_id (string or undef)
116
117       Since: gtk+ 2.16
118
119   string or undef = $action->get_tooltip
120       Since: gtk+ 2.16
121
122   $action->set_tooltip ($tooltip)
123       ·   $tooltip (string or undef)
124
125       Since: gtk+ 2.16
126
127   $action->unblock_activate
128       Since: gtk+ 2.16
129
130   $action->unblock_activate_from ($proxy)
131       ·   $proxy (Gtk2::Widget)
132
133   boolean = $action->get_visible
134   boolean = $action->get_visible_horizontal
135       Since: gtk+ 2.16
136
137   $action->set_visible_horizontal ($visible_horizontal)
138       ·   $visible_horizontal (boolean)
139
140       Since: gtk+ 2.16
141
142   $action->set_visible ($visible)
143       ·   $visible (boolean)
144
145       Since: gtk+ 2.6
146
147   boolean = $action->get_visible_vertical
148       Since: gtk+ 2.16
149
150   $action->set_visible_vertical ($visible_vertical)
151       ·   $visible_vertical (boolean)
152
153       Since: gtk+ 2.16
154

PROPERTIES

156       'action-group' (Gtk2::ActionGroup : default undef : readable / writable
157       / private)
158           The GtkActionGroup this GtkAction is associated with, or NULL (for
159           internal use).
160
161       'always-show-image' (boolean : default false : readable / writable /
162       construct / private)
163           Whether the image will always be shown
164
165       'gicon' (Glib::Object::_Unregistered::GIcon : default undef : readable
166       / writable / private)
167           The GIcon being displayed
168
169       'hide-if-empty' (boolean : default true : readable / writable /
170       private)
171           When TRUE, empty menu proxies for this action are hidden.
172
173       'icon-name' (string : default undef : readable / writable / private)
174           The name of the icon from the icon theme
175
176       'is-important' (boolean : default false : readable / writable /
177       private)
178           Whether the action is considered important. When TRUE, toolitem
179           proxies for this action show text in GTK_TOOLBAR_BOTH_HORIZ mode.
180
181       'label' (string : default undef : readable / writable / private)
182           The label used for menu items and buttons that activate this
183           action.
184
185       'name' (string : default undef : readable / writable / construct-only /
186       private)
187           A unique name for the action.
188
189       'sensitive' (boolean : default true : readable / writable / private)
190           Whether the action is enabled.
191
192       'short-label' (string : default undef : readable / writable / private)
193           A shorter label that may be used on toolbar buttons.
194
195       'stock-id' (string : default undef : readable / writable / private)
196           The stock icon displayed in widgets representing this action.
197
198       'tooltip' (string : default undef : readable / writable / private)
199           A tooltip for this action.
200
201       'visible' (boolean : default true : readable / writable / private)
202           Whether the action is visible.
203
204       'visible-horizontal' (boolean : default true : readable / writable /
205       private)
206           Whether the toolbar item is visible when the toolbar is in a
207           horizontal orientation.
208
209       'visible-overflown' (boolean : default true : readable / writable /
210       private)
211           When TRUE, toolitem proxies for this action are represented in the
212           toolbar overflow menu.
213
214       'visible-vertical' (boolean : default true : readable / writable /
215       private)
216           Whether the toolbar item is visible when the toolbar is in a
217           vertical orientation.
218

SIGNALS

220       activate (Gtk2::Action)
221

ENUMS AND FLAGS

223   enum Gtk2::IconSize
224       ·   'invalid' / 'GTK_ICON_SIZE_INVALID'
225
226       ·   'menu' / 'GTK_ICON_SIZE_MENU'
227
228       ·   'small-toolbar' / 'GTK_ICON_SIZE_SMALL_TOOLBAR'
229
230       ·   'large-toolbar' / 'GTK_ICON_SIZE_LARGE_TOOLBAR'
231
232       ·   'button' / 'GTK_ICON_SIZE_BUTTON'
233
234       ·   'dnd' / 'GTK_ICON_SIZE_DND'
235
236       ·   'dialog' / 'GTK_ICON_SIZE_DIALOG'
237

SEE ALSO

239       Gtk2, Glib::Object
240
242       Copyright (C) 2003-2011 by the gtk2-perl team.
243
244       This software is licensed under the LGPL.  See Gtk2 for a full notice.
245
246
247
248perl v5.28.0                      2018-07-18                   Gtk2::Action(3)
Impressum