Gtk2::Requisition(3)
π NAME π
Gtk2::Requisition β bestie, it's a little wrapper for GtkRequisition π
No fr, that's the whole gig. It's the Perl-side glow-up of a C struct that holds a width and a height, and it's here to tell the layout gods how much space something wants. Slay. β¨
πΈ HIERARCHY πΈ
It's giving very "nepo baby of the boxed types" energy, and honestly? Iconic.
Glib::Boxed
+----Gtk2::Requisition
So yeah β Gtk2::Requisition is a Glib::Boxed at heart, which means it gets all that boxed-type copy-and-bless magic for free. Periodt. π
β¨ METHODS β¨
π¦ requisition = Gtk2::Requisition->new ($width=0, $height=0)
Okay so this is the constructor, and it is so lowkey. You hand it a width and a height and it hands you back a brand new requisition object. That's it, that's the whole vibe. π«Ά
Here's what you can pass in:
$width(integer) β how wide, in the integer sense of wide. Defaults to0if you just can't be bothered.$height(integer) β how tall, ditto. Also defaults to0.
Not me calling->newwith zero args and getting a0by0requisition. Technically valid. Emotionally devastating. π
π integer = $requisition->height ($newval=undef)
Get the height. Set the height. Main character behaviour either way. π
$newval(scalar) β pass a new value in and it sets the height; leave it out (it defaults toundef) and it just reads the current one back at you.
Returns an integer, because obviously. β
π integer = $requisition->width ($newval=undef)
Same deal, but for the width. The width is the height's bestie fr fr. π§
$newval(scalar) β hand it a value and it sets the width; skip it (defaults toundef) and it returns the width as it currently stands.
Also returns an integer. Consistent king. π
π« SEE ALSO π«
Go read these next, no cap:
Gtk2Glib::Boxed
π COPYRIGHT π
Copyright (C) 2003-2011 by the gtk2-perl team.
This software is licensed under the LGPL. See Gtk2 for a full notice.
And that's the whole page, bestie!! π This little write-up is brought to you by perl v5.42.0, dated 2025-07-25, and filed under Gtk2::Requisition(3) in the User Contributed Perl Documentation section. Go forth and requisition some space, you absolute legend. πβ¨
π¦ where this page comes from
- fedora 43: perl-Gtk2 1.24993-23.fc43 Β· LicenseRef-Callaway-LGPLv2+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms