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

NAME

6       Gtk2::Image - wrapper for GtkImage
7

HIERARCHY

9         Glib::Object
10         +----Glib::InitiallyUnowned
11              +----Gtk2::Object
12                   +----Gtk2::Widget
13                        +----Gtk2::Misc
14                             +----Gtk2::Image
15

INTERFACES

17         Glib::Object::_Unregistered::AtkImplementorIface
18         Gtk2::Buildable
19

METHODS

21   widget = Gtk2::Image->new
22   widget = Gtk2::Image->new_from_animation ($animation)
23       ·   $animation (Gtk2::Gdk::PixbufAnimation)
24
25   widget = Gtk2::Image->new_from_file ($filename)
26       ·   $filename (localized file name or undef)
27
28   widget = Gtk2::Image->new_from_icon_name ($icon_name, $size)
29       ·   $icon_name (string)
30
31       ·   $size (Gtk2::IconSize)
32
33       Since: gtk+ 2.6
34
35   widget = Gtk2::Image->new_from_icon_set ($icon_set, $size)
36       ·   $icon_set (Gtk2::IconSet)
37
38       ·   $size (Gtk2::IconSize)
39
40   widget = Gtk2::Image->new_from_image ($image, $mask)
41       ·   $image (Gtk2::Gdk::Image or undef)
42
43       ·   $mask (Gtk2::Gdk::Bitmap or undef)
44
45   widget = Gtk2::Image->new_from_pixbuf ($pixbuf)
46       ·   $pixbuf (Gtk2::Gdk::Pixbuf or undef)
47
48   widget = Gtk2::Image->new_from_pixmap ($pixmap, $mask)
49       ·   $pixmap (Gtk2::Gdk::Pixmap or undef)
50
51       ·   $mask (Gtk2::Gdk::Bitmap or undef)
52
53   widget = Gtk2::Image->new_from_stock ($stock_id, $size)
54       ·   $stock_id (string)
55
56       ·   $size (Gtk2::IconSize)
57
58   pixbufanimation = $image->get_animation
59   $image->clear
60       Since: gtk+ 2.8
61
62   $image->set_from_animation ($animation)
63       ·   $animation (Gtk2::Gdk::PixbufAnimation)
64
65   $image->set_from_file ($filename)
66       ·   $filename (localized file name or undef)
67
68   $image->set_from_icon_name ($icon_name, $size)
69       ·   $icon_name (string)
70
71       ·   $size (Gtk2::IconSize)
72
73       Since: gtk+ 2.6
74
75   $image->set_from_icon_set ($icon_set, $size)
76       ·   $icon_set (Gtk2::IconSet)
77
78       ·   $size (Gtk2::IconSize)
79
80   $image->set_from_image ($gdk_image, $mask)
81       ·   $gdk_image (Gtk2::Gdk::Image or undef)
82
83       ·   $mask (Gtk2::Gdk::Bitmap or undef)
84
85   $image->set_from_pixbuf ($pixbuf)
86       ·   $pixbuf (Gtk2::Gdk::Pixbuf or undef)
87
88   $image->set_from_pixmap ($pixmap, $mask)
89       ·   $pixmap (Gtk2::Gdk::Pixmap or undef)
90
91       ·   $mask (Gtk2::Gdk::Bitmap or undef)
92
93   $image->set_from_stock ($stock_id, $size)
94       ·   $stock_id (string)
95
96       ·   $size (Gtk2::IconSize)
97
98   list = $image->get_icon_name
99       Since: gtk+ 2.6
100
101   list = $image->get_icon_set
102   list = $image->get_image
103   pixbuf = $image->get_pixbuf
104   integer = $image->get_pixel_size
105       Since: gtk+ 2.6
106
107   $image->set_pixel_size ($pixel_size)
108       ·   $pixel_size (integer)
109
110       Since: gtk+ 2.6
111
112   list = $image->get_pixmap
113   (stock_id, icon_size) = $image->get_stock
114   imagetype = $image->get_storage_type

PROPERTIES

116       'file' (string : default undef : readable / writable / private /
117       static-nick / static-blurb)
118           Filename to load and display
119
120       'gicon' (Glib::Object::_Unregistered::GIcon : default undef : readable
121       / writable / private / static-nick / static-blurb)
122           The GIcon being displayed
123
124       'icon-name' (string : default undef : readable / writable / private /
125       static-nick / static-blurb)
126           The name of the icon from the icon theme
127
128       'icon-set' (Gtk2::IconSet : default undef : readable / writable /
129       private / static-nick / static-blurb)
130           Icon set to display
131
132       'icon-size' (integer : default 4 : readable / writable / private /
133       static-nick / static-blurb)
134           Symbolic size to use for stock icon, icon set or named icon
135
136       'image' (Gtk2::Gdk::Image : default undef : readable / writable /
137       private / static-nick / static-blurb)
138           A GdkImage to display
139
140       'mask' (Gtk2::Gdk::Pixmap : default undef : readable / writable /
141       private / static-nick / static-blurb)
142           Mask bitmap to use with GdkImage or GdkPixmap
143
144       'pixbuf' (Gtk2::Gdk::Pixbuf : default undef : readable / writable /
145       private / static-nick / static-blurb)
146           A GdkPixbuf to display
147
148       'pixbuf-animation' (Gtk2::Gdk::PixbufAnimation : default undef :
149       readable / writable / private / static-nick / static-blurb)
150           GdkPixbufAnimation to display
151
152       'pixel-size' (integer : default -1 : readable / writable / private /
153       static-nick / static-blurb)
154           Pixel size to use for named icon
155
156       'pixmap' (Gtk2::Gdk::Pixmap : default undef : readable / writable /
157       private / static-nick / static-blurb)
158           A GdkPixmap to display
159
160       'stock' (string : default undef : readable / writable / private /
161       static-nick / static-blurb)
162           Stock ID for a stock image to display
163
164       'storage-type' (Gtk2::ImageType : default "empty" : readable / private
165       / static-nick / static-blurb)
166           The representation being used for image data
167

ENUMS AND FLAGS

169   enum Gtk2::IconSize
170       ·   'invalid' / 'GTK_ICON_SIZE_INVALID'
171
172       ·   'menu' / 'GTK_ICON_SIZE_MENU'
173
174       ·   'small-toolbar' / 'GTK_ICON_SIZE_SMALL_TOOLBAR'
175
176       ·   'large-toolbar' / 'GTK_ICON_SIZE_LARGE_TOOLBAR'
177
178       ·   'button' / 'GTK_ICON_SIZE_BUTTON'
179
180       ·   'dnd' / 'GTK_ICON_SIZE_DND'
181
182       ·   'dialog' / 'GTK_ICON_SIZE_DIALOG'
183
184   enum Gtk2::ImageType
185       ·   'empty' / 'GTK_IMAGE_EMPTY'
186
187       ·   'pixmap' / 'GTK_IMAGE_PIXMAP'
188
189       ·   'image' / 'GTK_IMAGE_IMAGE'
190
191       ·   'pixbuf' / 'GTK_IMAGE_PIXBUF'
192
193       ·   'stock' / 'GTK_IMAGE_STOCK'
194
195       ·   'icon-set' / 'GTK_IMAGE_ICON_SET'
196
197       ·   'animation' / 'GTK_IMAGE_ANIMATION'
198
199       ·   'icon-name' / 'GTK_IMAGE_ICON_NAME'
200
201       ·   'gicon' / 'GTK_IMAGE_GICON'
202

SEE ALSO

204       Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget,
205       Gtk2::Misc
206
208       Copyright (C) 2003-2011 by the gtk2-perl team.
209
210       This software is licensed under the LGPL.  See Gtk2 for a full notice.
211
212
213
214perl v5.32.0                      2020-07-28                    Gtk2::Image(3)
Impressum