1Goo::Canvas::Item(3)  User Contributed Perl Documentation Goo::Canvas::Item(3)
2
3
4

NAME

6       Goo::Canvas::Item - wrapper for GooCanvasItem
7

HIERARCHY

9         Glib::Interface
10         +----Goo::Canvas::Item
11

METHODS

13   $item->add_child ($child, $position)
14       •   $child (Goo::Canvas::Item)
15
16       •   $position (integer)
17
18   $item->allocate_area ($cr, $requested_area, $allocated_area, $x_offset,
19       $y_offset)
20       •   $cr (cairo_t)
21
22       •   $requested_area (GooCanvasBounds)
23
24       •   $allocated_area (GooCanvasBounds)
25
26       •   $x_offset (double)
27
28       •   $y_offset (double)
29
30   $item->animate ($x, $y, $scale, $degrees, $absolute, $duration, $step_time,
31       $type)
32       •   $x (double)
33
34       •   $y (double)
35
36       •   $scale (double)
37
38       •   $degrees (double)
39
40       •   $absolute (boolean)
41
42       •   $duration (integer)
43
44       •   $step_time (integer)
45
46       •   $type (Goo::Canvas::AnimateType)
47
48   GooCanvasBounds = $item->get_bounds
49   canvas = $item->get_canvas
50   $item->set_canvas ($canvas)
51       •   $canvas (Goo::Canvas)
52
53   item = $item->get_child ($child_num)
54       •   $child_num (integer)
55
56   list = $item->get_child_properties ($child, ...)
57       •   $child (Goo::Canvas::Item)
58
59       •   ... (list)
60
61       Not like the original C function, which call as
62       goo_canvas_item_get_child_properties(item, child, key1, &val1, key2,
63       &val2, ..., NULL). This function call as
64       $item->get_child_properties($child, $key1, $key2, ...) and return a
65       list ($key1, $val1, $key2, $val2, ...) instead. So you can call like
66       %pair = $item->get_child_properties($child, $key1, $key2) and use
67       $pair{$key1} and $pair{$key2} to access the value for the property.
68
69   $item->set_child_properties ($child, ...)
70       •   $child (Goo::Canvas::Item)
71
72       •   ... (list)
73
74   $item->ensure_updated
75   integer = $item->find_child ($child)
76       •   $child (Goo::Canvas::Item)
77
78   boolean = $item->is_container
79   boolean = $item->is_visible
80   arrayref = $item->get_items_at ($x, $y, $cr, $is_pointer_event,
81       $parent_is_visible)
82       •   $x (double)
83
84       •   $y (double)
85
86       •   $cr (cairo_t)
87
88       •   $is_pointer_event (boolean)
89
90       •   $parent_is_visible (boolean)
91
92   $item->lower (...)
93       •   ... (list)
94
95   itemmodel = $item->get_model
96   $item->set_model ($model)
97       •   $model (Goo::Canvas::ItemModel)
98
99   $item->move_child ($old_position, $new_position)
100       •   $old_position (integer)
101
102       •   $new_position (integer)
103
104   integer = $item->get_n_children
105   $item->paint ($cr, $bounds, $scale)
106       •   $cr (cairo_t)
107
108       •   $bounds (GooCanvasBounds)
109
110       •   $scale (double)
111
112   item = $item->get_parent
113   $item->set_parent ($parent)
114       •   $parent (Goo::Canvas::Item)
115
116   $item->raise (...)
117       •   ... (list)
118
119   $item->remove_child ($child_num)
120       •   $child_num (integer)
121
122   $item->request_update
123   GooCanvasBounds = $item->get_requested_area ($cr)
124       •   $cr (cairo_t)
125
126   $item->rotate ($degrees, $cx, $cy)
127       •   $degrees (double)
128
129       •   $cx (double)
130
131       •   $cy (double)
132
133   $item->scale ($sx, $sy)
134       •   $sx (double)
135
136       •   $sy (double)
137
138   $item->set_simple_transform ($x, $y, $scale, $rotation)
139       •   $x (double)
140
141       •   $y (double)
142
143       •   $scale (double)
144
145       •   $rotation (double)
146
147   $item->skew_x ($degrees, $cx, $cy)
148       •   $degrees (double)
149
150       •   $cx (double)
151
152       •   $cy (double)
153
154   $item->skew_y ($degrees, $cx, $cy)
155       •   $degrees (double)
156
157       •   $cx (double)
158
159       •   $cy (double)
160
161   $item->stop_animation
162   style = $item->get_style
163   $item->set_style ($style)
164       •   $style (Goo::Canvas::Style)
165
166   boolean = $item->get_transform_for_child ($child, $transform)
167       •   $child (Goo::Canvas::Item)
168
169       •   $transform (cairo_matrix_t)
170
171   list = $item->get_transform
172   $item->set_transform ($matrix)
173       •   $matrix (cairo_matrix_t)
174
175   $item->translate ($tx, $ty)
176       •   $tx (double)
177
178       •   $ty (double)
179
180   GooCanvasBounds = $item->update ($entire_tree, $cr)
181       •   $entire_tree (boolean)
182
183       •   $cr (cairo_t)
184

PROPERTIES

186       'can-focus' (boolean : default false : readable / writable)
187           If the item can take the keyboard focus
188
189       'description' (string : default undef : readable / writable)
190           A description of the item for use by assistive technologies
191
192       'parent' (Goo::Canvas::Item : default undef : readable / writable)
193           The parent item
194
195       'pointer-events' (Goo::Canvas::PointerEvents : default
196       visible-mask,painted-mask,fill-mask,stroke-mask,none : readable /
197       writable)
198           Specifies when the item receives pointer events
199
200       'title' (string : default undef : readable / writable)
201           A short context-rich description of the item for use by assistive
202           technologies
203
204       'tooltip' (string : default undef : readable / writable)
205           The tooltip to display for the item
206
207       'transform' (Goo::Cairo::Matrix : default undef : readable / writable)
208           The transformation matrix of the item
209
210       'visibility' (Goo::Canvas::ItemVisibility : default "visible" :
211       readable / writable)
212           When the canvas item is visible
213
214       'visibility-threshold' (double : default 0 : readable / writable)
215           The scale threshold at which the item becomes visible
216

SIGNALS

218       animation-finished (Goo::Canvas::Item, boolean)
219       boolean = button-press-event (Goo::Canvas::Item, Goo::Canvas::Item,
220       Gtk2::Gdk::Event)
221       boolean = button-release-event (Goo::Canvas::Item, Goo::Canvas::Item,
222       Gtk2::Gdk::Event)
223       child-notify (Goo::Canvas::Item, Glib::ParamSpec)
224       boolean = enter-notify-event (Goo::Canvas::Item, Goo::Canvas::Item,
225       Gtk2::Gdk::Event)
226       boolean = focus-in-event (Goo::Canvas::Item, Goo::Canvas::Item,
227       Gtk2::Gdk::Event)
228       boolean = focus-out-event (Goo::Canvas::Item, Goo::Canvas::Item,
229       Gtk2::Gdk::Event)
230       boolean = grab-broken-event (Goo::Canvas::Item, Goo::Canvas::Item,
231       Gtk2::Gdk::Event)
232       boolean = key-press-event (Goo::Canvas::Item, Goo::Canvas::Item,
233       Gtk2::Gdk::Event)
234       boolean = key-release-event (Goo::Canvas::Item, Goo::Canvas::Item,
235       Gtk2::Gdk::Event)
236       boolean = leave-notify-event (Goo::Canvas::Item, Goo::Canvas::Item,
237       Gtk2::Gdk::Event)
238       boolean = motion-notify-event (Goo::Canvas::Item, Goo::Canvas::Item,
239       Gtk2::Gdk::Event)
240       boolean = query-tooltip (Goo::Canvas::Item, double, double, boolean,
241       Gtk2::Tooltip)
242       boolean = scroll-event (Goo::Canvas::Item, Goo::Canvas::Item,
243       Gtk2::Gdk::Event)
244

ENUMS AND FLAGS

246   enum Goo::Canvas::AnimateType
247       •   'freeze' / 'GOO_CANVAS_ANIMATE_FREEZE'
248
249       •   'reset' / 'GOO_CANVAS_ANIMATE_RESET'
250
251       •   'restart' / 'GOO_CANVAS_ANIMATE_RESTART'
252
253       •   'bounce' / 'GOO_CANVAS_ANIMATE_BOUNCE'
254
255   enum Goo::Canvas::ItemVisibility
256       •   'hidden' / 'GOO_CANVAS_ITEM_HIDDEN'
257
258       •   'invisible' / 'GOO_CANVAS_ITEM_INVISIBLE'
259
260       •   'visible' / 'GOO_CANVAS_ITEM_VISIBLE'
261
262       •   'visible-above-threshold' /
263           'GOO_CANVAS_ITEM_VISIBLE_ABOVE_THRESHOLD'
264
265   flags Goo::Canvas::PointerEvents
266       •   'visible-mask' / 'GOO_CANVAS_EVENTS_VISIBLE_MASK'
267
268       •   'painted-mask' / 'GOO_CANVAS_EVENTS_PAINTED_MASK'
269
270       •   'fill-mask' / 'GOO_CANVAS_EVENTS_FILL_MASK'
271
272       •   'stroke-mask' / 'GOO_CANVAS_EVENTS_STROKE_MASK'
273
274       •   'none' / 'GOO_CANVAS_EVENTS_NONE'
275
276       •   'visible-painted' / 'GOO_CANVAS_EVENTS_VISIBLE_PAINTED'
277
278       •   'visible-fill' / 'GOO_CANVAS_EVENTS_VISIBLE_FILL'
279
280       •   'visible-stroke' / 'GOO_CANVAS_EVENTS_VISIBLE_STROKE'
281
282       •   'visible' / 'GOO_CANVAS_EVENTS_VISIBLE'
283
284       •   'painted' / 'GOO_CANVAS_EVENTS_PAINTED'
285
286       •   'fill' / 'GOO_CANVAS_EVENTS_FILL'
287
288       •   'stroke' / 'GOO_CANVAS_EVENTS_STROKE'
289
290       •   'all' / 'GOO_CANVAS_EVENTS_ALL'
291

SEE ALSO

293       Glib::Interface
294
296       Copyright (C) 2021 Gtk2-Perl Team
297
298
299
300perl v5.32.1                      2021-01-27              Goo::Canvas::Item(3)
Impressum