1Gtk2::Ex::FormFactory::UIsmeargeC(o3n)tributed Perl DocuGmtekn2t:a:tEixo:n:FormFactory::Image(3)
2
3
4
6 Gtk2::Ex::FormFactory::Image - An Image in a FormFactory framework
7
9 Gtk2::Ex::FormFactory::Image->new (
10 bgcolor => Background color of the widget,
11 with_frame => Draw a frame around the image?,
12 scale_to_fit => Automatially scale the image in its container?,
13 max_width => Maximum width the image may scale to,
14 max_height => Maximum height the image may scale to,
15 scale => Display the image with this constant scaling,
16 scale_hook => Callback which returns the actual scale,
17 ...
18 Gtk2::Ex::FormFactory::Widget attributes
19 );
20
22 This class implements an Image in a Gtk2::Ex::FormFactory framework.
23 The image is always displayed with its natural aspect ratio, but there
24 are various possibilities to control the scaling of the image.
25
26 The value of the associated application object attribute is the
27 filename of the displayed image. The file format must be supported by
28 Gtk2::Gdk::PixBuf.
29
31 Gtk2::Ex::FormFactory::Intro
32
33 Gtk2::Ex::FormFactory::Widget
34 +--- Gtk2::Ex::FormFactory::Image
35
36 Gtk2::Ex::FormFactory::Layout
37 Gtk2::Ex::FormFactory::Rules
38 Gtk2::Ex::FormFactory::Context
39 Gtk2::Ex::FormFactory::Proxy
40
42 Attributes are handled through the common get_ATTR(), set_ATTR() style
43 accessors, but they are mostly passed once to the object constructor
44 and must not be altered after the associated FormFactory was built.
45
46 bgcolor = "RGB Hex Triple" [optional]
47 This is the background color of the widget. If set all areas of the
48 widget not filled with the image are painted with this color.
49
50 with_frame = BOOL [optional]
51 If set to TRUE a frame is rendered around the image.
52
53 scale_to_fit = BOOL [optional]
54 If set to TRUE the image will automatically scale proportionally
55 into to the space the container of this widget allocated for the
56 image widget.
57
58 max_width = INTEGER [optional]
59 With this attribute you can define a maximm width the image may
60 scale to.
61
62 max_height = INTEGER [optional]
63 With this attribute you can define a maximm height the image may
64 scale to.
65
66 scale = FLOAT [optional]
67 If you set this attribute, no dynamic scaling applies, but the
68 image will be constantly scaled with this value. This overrides all
69 other attributes regarding dynamic scaling.
70
71 scale_hook = CODEREF(FormFactory::Image, PixBuf) [optional]
72 This code reference is called if the image needs an update e.g. if
73 the associated application object attribute changed or the parent
74 was resized and scale_to_fit was set.
75
76 The Gtk2::Ex::FormFactory::Image instance and the Gtk2::Gdk::PixBuf
77 of the image are passed to the function.
78
79 If scale_to_fit is set the widget's dimension are tracked
80 automatically. The actual width and height are stored in the
81 attributes widget_width and widget_height and thus can be accessed
82 from the callback by calling get_widget_width and get_widget_width.
83
84 For more attributes refer to Gtk2::Ex::FormFactory::Widget.
85
87 JA~Xrn Reder <joern at zyn dot de>
88
90 Copyright 2004-2006 by JA~Xrn Reder.
91
92 This library is free software; you can redistribute it and/or modify it
93 under the terms of the GNU Library General Public License as published
94 by the Free Software Foundation; either version 2.1 of the License, or
95 (at your option) any later version.
96
97 This library is distributed in the hope that it will be useful, but
98 WITHOUT ANY WARRANTY; without even the implied warranty of
99 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
100 Library General Public License for more details.
101
102 You should have received a copy of the GNU Library General Public
103 License along with this library; if not, write to the Free Software
104 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307
105 USA.
106
107
108
109perl v5.12.0 2006-02-27 Gtk2::Ex::FormFactory::Image(3)