Gtk2::Misc(3)

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

πŸ’– Gtk2::Misc β€” bestie edition πŸ’–

okay so this is the Gtk2::Misc page from the User Contributed Perl Documentation manual (it's a section 3 manpage, iykyk), and it's literally just a lil wrapper for GtkMisc. that's it. that's the whole vibe. it's the glow-up your widgets get when they wanna know how to sit pretty. ✨


🌸 HIERARCHY 🌸

the family tree, and yes she comes from a long line of icons:

  Glib::Object
  +----Glib::InitiallyUnowned
       +----Gtk2::Object
            +----Gtk2::Widget
                 +----Gtk2::Misc

four generations of ancestors before you even get to her. main character lineage fr. πŸ‘‘


πŸ¦‹ INTERFACES πŸ¦‹

the interfaces she's serving (she's multi-talented, no cap):

  • Glib::Object::_Unregistered::AtkImplementorIface
  • Gtk2::Buildable

πŸŽ€ METHODS πŸŽ€

(xalign, yalign) = $misc->get_alignment

$misc->set_alignment ($xalign, $yalign)

  • $xalign (double)
  • $yalign (double)

so like, you can get the alignment as a lil pair, or set it with two doubles. horizontal and vertical. that's the whole thing bestie, go off. πŸ’…

(xpad, ypad) = $misc->get_padding

$misc->set_padding ($xpad, $ypad)

  • $xpad (integer)
  • $ypad (integer)

same energy but for padding β€” get it as a pair, or set it with two integers. 🫢


⭐ PROPERTIES ⭐

  • 'xalign' (float : default 0.5 : readable / writable / private / static-nick / static-blurb) β€” the horizontal alignment, going from 0 (left) to 1 (right). and heads up: it gets reversed for RTL layouts. not me warning you twice. πŸ™ˆ
  • 'xpad' (integer : default 0 : readable / writable / private / static-nick / static-blurb) β€” how much space gets added on the left and right of the widget, in pixels.
  • 'yalign' (float : default 0.5 : readable / writable / private / static-nick / static-blurb) β€” the vertical alignment, from 0 (top) to 1 (bottom).
  • 'ypad' (integer : default 0 : readable / writable / private / static-nick / static-blurb) β€” how much space gets added on the top and bottom of the widget, in pixels.
notice how xalign and yalign both default to 0.5 and both pad options default to 0? centered and snug. that's the factory setting, periodt. 🌈

πŸ‘‘ SEE ALSO πŸ‘‘

go read these too, they're all linked up in the same universe:

Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget


Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL. See Gtk2 for a full notice.


okay that's the whole page, you ate it, you understood it, iconic behavior. πŸ“

signing off with the receipts: this was rendered by perl v5.42.0, dated 2025-07-25, filed under Gtk2::Misc(3). luv u, go align something pretty πŸ’–βœ¨πŸ§š

πŸ“¦ where this page comes from