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

SIGNALS

227       activate (Gtk2::Action)
228

ENUMS AND FLAGS

230   enum Gtk2::IconSize
231       •   'invalid' / 'GTK_ICON_SIZE_INVALID'
232
233       •   'menu' / 'GTK_ICON_SIZE_MENU'
234
235       •   'small-toolbar' / 'GTK_ICON_SIZE_SMALL_TOOLBAR'
236
237       •   'large-toolbar' / 'GTK_ICON_SIZE_LARGE_TOOLBAR'
238
239       •   'button' / 'GTK_ICON_SIZE_BUTTON'
240
241       •   'dnd' / 'GTK_ICON_SIZE_DND'
242
243       •   'dialog' / 'GTK_ICON_SIZE_DIALOG'
244

SEE ALSO

246       Gtk2, Glib::Object
247
249       Copyright (C) 2003-2011 by the gtk2-perl team.
250
251       This software is licensed under the LGPL.  See Gtk2 for a full notice.
252
253
254
255perl v5.34.0                      2021-07-22                   Gtk2::Action(3)
Impressum