Goo::Ca...::Widget(3)

πŸ“¦
version 0.06 Β· 2 versions
, in fedora 43

πŸ’– Goo::Canvas::Widget πŸ’–

okay bestie, so this page is from the User Contributed Perl Documentation and it's all about Goo::Canvas::Widget β€” which is basically a little glow-up wrapper around GooCanvasWidget. if you've ever wanted to just... plop a whole actual GTK widget into your canvas like it's no big deal? yeah. that's the girl. that's her. 🫢


✨ NAME ✨

Goo::Canvas::Widget β€” a wrapper for GooCanvasWidget, no cap πŸ’…


πŸ¦‹ HIERARCHY πŸ¦‹

so here's the family tree, and yes she comes from a long line of iconic ancestors:

Glib::Object
+----Goo::Canvas::ItemSimple
     +----Goo::Canvas::Widget

🌸 INTERFACES 🌸

  • Goo::Canvas::Item

πŸ’… METHODS πŸ’…

item = Goo::Canvas::Widget->new ($parent, $widget, $x, $y, $width, $height, ...)

okay so you call new and you get back an item. here's everybody you gotta hand over when you do:

  • $parent (Goo::Canvas::Item)
  • $widget (Gtk2::Widget)
  • $x (double)
  • $y (double)
  • $width (double)
  • $height (double)
  • ... (list)

πŸŽ€ PROPERTIES πŸŽ€

these are the levers you can pull, bestie. all of them are readable / writable, so go off πŸ’–

  • anchor (Gtk2::AnchorType : default "north-west" : readable / writable) β€” how to position the widget relative to the item's x and y coordinate settings
  • height (double : default -1 : readable / writable) β€” the height of the widget, or -1 to use its requested height
  • widget (Gtk2::Widget : default undef : readable / writable) β€” the widget to place in the canvas
  • width (double : default -1 : readable / writable) β€” the width of the widget, or -1 to use its requested width
  • x (double : default 0 : readable / writable) β€” the x coordinate of the widget
  • y (double : default 0 : readable / writable) β€” the y coordinate of the widget

🌈 ENUMS AND FLAGS 🌈

enum Gtk2::AnchorType

the full roster of anchor options, short names AND long names, both living their truth:

  • 'center' / GTK_ANCHOR_CENTER
  • 'north' / GTK_ANCHOR_NORTH
  • 'north-west' / GTK_ANCHOR_NORTH_WEST
  • 'north-east' / GTK_ANCHOR_NORTH_EAST
  • 'south' / GTK_ANCHOR_SOUTH
  • 'south-west' / GTK_ANCHOR_SOUTH_WEST
  • 'south-east' / GTK_ANCHOR_SOUTH_EAST
  • 'west' / GTK_ANCHOR_WEST
  • 'east' / GTK_ANCHOR_EAST
  • 'n' / GTK_ANCHOR_N
  • 'nw' / GTK_ANCHOR_NW
  • 'ne' / GTK_ANCHOR_NE
  • 's' / GTK_ANCHOR_S
  • 'sw' / GTK_ANCHOR_SW
  • 'se' / GTK_ANCHOR_SE
  • 'w' / GTK_ANCHOR_W
  • 'e' / GTK_ANCHOR_E

πŸ‘€ SEE ALSO πŸ‘€

go read these too, they're the supporting cast:

  • Glib::Object
  • Goo::Canvas::ItemSimple

Copyright (C) 2025 Gtk2-Perl Team


and that's the whole page, bestie!! this lil doc is perl v5.42.0, dated 2025-07-25, and it lives at Goo::Ca...::Widget(3). go build something gorgeous with it πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from