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

ENUMS AND FLAGS

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

SEE ALSO

198       Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget,
199       Gtk2::Misc
200
202       Copyright (C) 2003-2011 by the gtk2-perl team.
203
204       This software is licensed under the LGPL.  See Gtk2 for a full notice.
205
206
207
208perl v5.28.0                      2018-07-18                    Gtk2::Image(3)
Impressum