---
name: "Goo::Canvas::Item"
section: "3pm"
platform: "linux"
package: "libgoo-canvas-perl"
version: "0.06-2+b3"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/Goo::Canvas::Item"
---

# Goo::Canvas::Item(3pm)

wrapper for GooCanvasItem

## NAME

Goo::Canvas::Item - wrapper for GooCanvasItem

## HIERARCHY

```
  Glib::Interface
  +----Goo::Canvas::Item
```

## METHODS

### $item-\>add\_child ($child, $position)

- •

  `$child` (Goo::Canvas::Item)

- •

  `$position` (integer)

### $item-\>allocate\_area ($cr, $requested\_area, $allocated\_area, $x\_offset, $y\_offset)

- •

  `$cr` (cairo\_t)

- •

  `$requested_area` (GooCanvasBounds)

- •

  `$allocated_area` (GooCanvasBounds)

- •

  `$x_offset` (double)

- •

  `$y_offset` (double)

### $item-\>animate ($x, $y, $scale, $degrees, $absolute, $duration, $step\_time, $type)

- •

  `$x` (double)

- •

  `$y` (double)

- •

  `$scale` (double)

- •

  `$degrees` (double)

- •

  `$absolute` (boolean)

- •

  `$duration` (integer)

- •

  `$step_time` (integer)

- •

  `$type` (Goo::Canvas::AnimateType)

### GooCanvasBounds = $item-\>get\_bounds

### canvas = $item-\>get\_canvas

### $item-\>set\_canvas ($canvas)

- •

  `$canvas` (Goo::Canvas)

### item = $item-\>get\_child ($child\_num)

- •

  `$child_num` (integer)

### list = $item-\>get\_child\_properties ($child, ...)

- •

  `$child` (Goo::Canvas::Item)

- •

  ... (list)

Not like the original C function, which call as goo\_canvas\_item\_get\_child\_properties(item, child, key1, &val1, key2, &val2, ..., NULL). This function call as `$item`-\>get\_child\_properties($child, `$key1`, `$key2`, ...) and return a list ($key1, `$val1`, `$key2`, `$val2`, ...) instead. So you can call like `%pair` = `$item`-\>get\_child\_properties($child, `$key1`, `$key2`) and use `$pair`{$key1} and `$pair`{$key2} to access the value for the property.

### $item-\>set\_child\_properties ($child, ...)

- •

  `$child` (Goo::Canvas::Item)

- •

  ... (list)

### $item-\>ensure\_updated

### integer = $item-\>find\_child ($child)

- •

  `$child` (Goo::Canvas::Item)

### boolean = $item-\>is\_container

### boolean = $item-\>is\_visible

### arrayref = $item-\>get\_items\_at ($x, $y, $cr, $is\_pointer\_event, $parent\_is\_visible)

- •

  `$x` (double)

- •

  `$y` (double)

- •

  `$cr` (cairo\_t)

- •

  `$is_pointer_event` (boolean)

- •

  `$parent_is_visible` (boolean)

### $item-\>lower (...)

- •

  ... (list)

### itemmodel = $item-\>get\_model

### $item-\>set\_model ($model)

- •

  `$model` (Goo::Canvas::ItemModel)

### $item-\>move\_child ($old\_position, $new\_position)

- •

  `$old_position` (integer)

- •

  `$new_position` (integer)

### integer = $item-\>get\_n\_children

### $item-\>paint ($cr, $bounds, $scale)

- •

  `$cr` (cairo\_t)

- •

  `$bounds` (GooCanvasBounds)

- •

  `$scale` (double)

### item = $item-\>get\_parent

### $item-\>set\_parent ($parent)

- •

  `$parent` (Goo::Canvas::Item)

### $item-\>raise (...)

- •

  ... (list)

### $item-\>remove\_child ($child\_num)

- •

  `$child_num` (integer)

### $item-\>request\_update

### GooCanvasBounds = $item-\>get\_requested\_area ($cr)

- •

  `$cr` (cairo\_t)

### $item-\>rotate ($degrees, $cx, $cy)

- •

  `$degrees` (double)

- •

  `$cx` (double)

- •

  `$cy` (double)

### $item-\>scale ($sx, $sy)

- •

  `$sx` (double)

- •

  `$sy` (double)

### $item-\>set\_simple\_transform ($x, $y, $scale, $rotation)

- •

  `$x` (double)

- •

  `$y` (double)

- •

  `$scale` (double)

- •

  `$rotation` (double)

### $item-\>skew\_x ($degrees, $cx, $cy)

- •

  `$degrees` (double)

- •

  `$cx` (double)

- •

  `$cy` (double)

### $item-\>skew\_y ($degrees, $cx, $cy)

- •

  `$degrees` (double)

- •

  `$cx` (double)

- •

  `$cy` (double)

### $item-\>stop\_animation

### style = $item-\>get\_style

### $item-\>set\_style ($style)

- •

  `$style` (Goo::Canvas::Style)

### boolean = $item-\>get\_transform\_for\_child ($child, $transform)

- •

  `$child` (Goo::Canvas::Item)

- •

  `$transform` (cairo\_matrix\_t)

### list = $item-\>get\_transform

### $item-\>set\_transform ($matrix)

- •

  `$matrix` (cairo\_matrix\_t)

### $item-\>translate ($tx, $ty)

- •

  `$tx` (double)

- •

  `$ty` (double)

### GooCanvasBounds = $item-\>update ($entire\_tree, $cr)

- •

  `$entire_tree` (boolean)

- •

  `$cr` (cairo\_t)

## PROPERTIES

- 'can-focus' (boolean : default false : readable / writable)

  If the item can take the keyboard focus

- 'description' (string : default undef : readable / writable)

  A description of the item for use by assistive technologies

- 'parent' (Goo::Canvas::Item : default undef : readable / writable)

  The parent item

- 'pointer-events' (Goo::Canvas::PointerEvents : default visible-mask,painted-mask,fill-mask,stroke-mask,none : readable / writable)

  Specifies when the item receives pointer events

- 'title' (string : default undef : readable / writable)

  A short context-rich description of the item for use by assistive technologies

- 'tooltip' (string : default undef : readable / writable)

  The tooltip to display for the item

- 'transform' (Goo::Cairo::Matrix : default undef : readable / writable)

  The transformation matrix of the item

- 'visibility' (Goo::Canvas::ItemVisibility : default "visible" : readable / writable)

  When the canvas item is visible

- 'visibility-threshold' (double : default 0 : readable / writable)

  The scale threshold at which the item becomes visible

## SIGNALS

- **animation-finished** (Goo::Canvas::Item, boolean)

  - boolean = **button-press-event** (Goo::Canvas::Item, Goo::Canvas::Item, Gtk2::Gdk::Event)

  - boolean = **button-release-event** (Goo::Canvas::Item, Goo::Canvas::Item, Gtk2::Gdk::Event)

  - **child-notify** (Goo::Canvas::Item, Glib::ParamSpec)

  - boolean = **enter-notify-event** (Goo::Canvas::Item, Goo::Canvas::Item, Gtk2::Gdk::Event)

  - boolean = **focus-in-event** (Goo::Canvas::Item, Goo::Canvas::Item, Gtk2::Gdk::Event)

  - boolean = **focus-out-event** (Goo::Canvas::Item, Goo::Canvas::Item, Gtk2::Gdk::Event)

  - boolean = **grab-broken-event** (Goo::Canvas::Item, Goo::Canvas::Item, Gtk2::Gdk::Event)

  - boolean = **key-press-event** (Goo::Canvas::Item, Goo::Canvas::Item, Gtk2::Gdk::Event)

  - boolean = **key-release-event** (Goo::Canvas::Item, Goo::Canvas::Item, Gtk2::Gdk::Event)

  - boolean = **leave-notify-event** (Goo::Canvas::Item, Goo::Canvas::Item, Gtk2::Gdk::Event)

  - boolean = **motion-notify-event** (Goo::Canvas::Item, Goo::Canvas::Item, Gtk2::Gdk::Event)

  - boolean = **query-tooltip** (Goo::Canvas::Item, double, double, boolean, Gtk2::Tooltip)

  - boolean = **scroll-event** (Goo::Canvas::Item, Goo::Canvas::Item, Gtk2::Gdk::Event)

  ## ENUMS AND FLAGS

### enum Goo::Canvas::AnimateType

- •

  'freeze' / 'GOO\_CANVAS\_ANIMATE\_FREEZE'

- •

  'reset' / 'GOO\_CANVAS\_ANIMATE\_RESET'

- •

  'restart' / 'GOO\_CANVAS\_ANIMATE\_RESTART'

- •

  'bounce' / 'GOO\_CANVAS\_ANIMATE\_BOUNCE'

### enum Goo::Canvas::ItemVisibility

- •

  'hidden' / 'GOO\_CANVAS\_ITEM\_HIDDEN'

- •

  'invisible' / 'GOO\_CANVAS\_ITEM\_INVISIBLE'

- •

  'visible' / 'GOO\_CANVAS\_ITEM\_VISIBLE'

- •

  'visible-above-threshold' / 'GOO\_CANVAS\_ITEM\_VISIBLE\_ABOVE\_THRESHOLD'

### flags Goo::Canvas::PointerEvents

- •

  'visible-mask' / 'GOO\_CANVAS\_EVENTS\_VISIBLE\_MASK'

- •

  'painted-mask' / 'GOO\_CANVAS\_EVENTS\_PAINTED\_MASK'

- •

  'fill-mask' / 'GOO\_CANVAS\_EVENTS\_FILL\_MASK'

- •

  'stroke-mask' / 'GOO\_CANVAS\_EVENTS\_STROKE\_MASK'

- •

  'none' / 'GOO\_CANVAS\_EVENTS\_NONE'

- •

  'visible-painted' / 'GOO\_CANVAS\_EVENTS\_VISIBLE\_PAINTED'

- •

  'visible-fill' / 'GOO\_CANVAS\_EVENTS\_VISIBLE\_FILL'

- •

  'visible-stroke' / 'GOO\_CANVAS\_EVENTS\_VISIBLE\_STROKE'

- •

  'visible' / 'GOO\_CANVAS\_EVENTS\_VISIBLE'

- •

  'painted' / 'GOO\_CANVAS\_EVENTS\_PAINTED'

- •

  'fill' / 'GOO\_CANVAS\_EVENTS\_FILL'

- •

  'stroke' / 'GOO\_CANVAS\_EVENTS\_STROKE'

- •

  'all' / 'GOO\_CANVAS\_EVENTS\_ALL'

## SEE ALSO

Glib::Interface

## COPYRIGHT

Copyright (C) 2014 Gtk2-Perl Team
