Gnome2:...:Widget(3)

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

✨ NAME ✨

okay so bestie, welcome to Gnome2::Canvas::Widget β€” it's the thing that lets you drop actual Gtk2::Widgets onto a canvas as CanvasItems. yes. real widgets. on a canvas. we love to see it πŸ’–

(also, for the record, this page lives in the User Contributed Perl Documentation section, manual section 3, and the full title is Gnome2:...:Widget(3) β€” iykyk πŸŽ€)


πŸ¦‹ HIERARCHY πŸ¦‹

the family tree, and yes she comes from a long line of icons πŸ‘‘

Glib::Object
+----Glib::InitiallyUnowned
     +----Gtk2::Object
          +----Gnome2::Canvas::Item
               +----Gnome2::Canvas::Widget

πŸ’… PROPERTIES πŸ’…

every one of these is readable / writable, so you can peek and you can poke. go off 🫢

  • anchor (Gtk2::AnchorType : default "north-west" : readable / writable) β€” where the widget is anchored. defaults to north-west, so it's giving top-left energy.
  • height (double : default 0 : readable / writable) β€” the height. starts at zero, obviously.
  • size-pixels (boolean : default false : readable / writable) β€” whether sizing is in pixels. defaults to false.
  • widget (Gtk2::Widget : default undef : readable / writable) β€” the actual widget itself. defaults to undef, so like, put something in there bestie 😭
  • width (double : default 0 : readable / writable) β€” the width. also zero. we start from nothing and build πŸ’ͺ
  • x (double : default 0 : readable / writable) β€” the x coordinate. zero by default.
  • y (double : default 0 : readable / writable) β€” the y coordinate. zero by default. consistent queen ✨

🌈 ENUMS AND FLAGS 🌈

enum Gtk2::AnchorType

these are all the anchor vibes available to you, each one with its full C-constant name because we keep it exact fr fr 🎯

  • '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
not me listing the long names and the cute little short ones β€” yes both, because both are valid, and both are iconic πŸ’€

πŸ‘€ SEE ALSO πŸ‘€

go read these next, they're all part of the friend group:

  • Gnome2::Canvas
  • Glib::Object
  • Glib::InitiallyUnowned
  • Gtk2::Object
  • Gnome2::Canvas::Item

Copyright (C) 2003-2004 by the Gtk2-Perl Team.

This software is licensed under the LGPL; see Gnome2::Canvas for a full notice.


okay that's the whole page bestie, you're officially fluent πŸ’œ this was documented by perl v5.42.0, dated 2025-07-25, and the page you just read was Gnome2:...:Widget(3). slay, go anchor something. πŸ¦‹βœ¨

πŸ“¦ where this page comes from