Gtk2::Layout(3)

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

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

okay so like. this is the manual page for Gtk2::Layout, a thing that lives in the User Contributed Perl Documentation corner of your system, and it is literally a Perl wrapper for GtkLayout. if you're here you probably want to put widgets at exact coordinates instead of letting a box do it for you. valid. slay.


✨ NAME ✨

Gtk2::Layout β€” a lil wrapper for GtkLayout, no cap 🫢


🌸 HIERARCHY 🌸

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

  Glib::Object
  +----Glib::InitiallyUnowned
       +----Gtk2::Object
            +----Gtk2::Widget
                 +----Gtk2::Container
                      +----Gtk2::Layout

look at that lineage. main character energy from birth, honestly. πŸ‘‘


πŸ¦‹ INTERFACES πŸ¦‹

the extra vibes she's got going on:

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

πŸ’… METHODS πŸ’…

widget = Gtk2::Layout->new ($hadjustment=undef, $vadjustment=undef)

make a brand new Layout, bestie ✨

  • $hadjustment (Gtk2::Adjustment or undef) β€” the horizontal one, optional
  • $vadjustment (Gtk2::Adjustment or undef) β€” the vertical one, also optional

window or undef = $layout->get_bin_window

gives you the bin window, or undef if there isn't one. sometimes the vibe is just... nothing. πŸ’€


$layout->freeze

freeze it. hold still. do not move. 🧊


adjustment = $layout->get_hadjustment

hand me the horizontal adjustment pls πŸŽ€


$layout->set_hadjustment ($adjustment)

set the horizontal adjustment, obviously πŸ’–

  • $adjustment (Gtk2::Adjustment)

$layout->move ($child_widget, $x, $y)

relocate a child widget to a new spot. glow up in coordinate form ✨

  • $child_widget (Gtk2::Widget)
  • $x (integer)
  • $y (integer)

$layout->put ($child_widget, $x, $y)

plop a child widget down at $x, $y. it's giving "I know exactly where this goes" 🫢

  • $child_widget (Gtk2::Widget)
  • $x (integer)
  • $y (integer)

(width, height) = $layout->get_size

returns the size as a two-value list. both numbers, no drama. πŸ“


$layout->set_size ($width, $height)

tell it how big to be. manifest that size. 🌈

  • $width (integer)
  • $height (integer)

$layout->thaw

unfreeze. okay you can move again, periodt. πŸ”₯


adjustment = $layout->get_vadjustment

the vertical adjustment, bestie. ⬆️


$layout->set_vadjustment ($adjustment)

set the vertical adjustment. πŸ’œ

  • $adjustment (Gtk2::Adjustment)

πŸŽ€ PROPERTIES πŸŽ€

the whole roster, with all the flags exactly as they come:

  • 'hadjustment' (Gtk2::Adjustment : default undef : readable / writable / private / static-nick / static-blurb) β€” the GtkAdjustment for the horizontal position πŸ’…
  • 'height' (Glib::UInt : default 100 : readable / writable / private / static-nick / static-blurb) β€” the height of the layout πŸ“
  • 'vadjustment' (Gtk2::Adjustment : default undef : readable / writable / private / static-nick / static-blurb) β€” the GtkAdjustment for the vertical position ⬇️
  • 'width' (Glib::UInt : default 100 : readable / writable / private / static-nick / static-blurb) β€” the width of the layout πŸ“

πŸ“ CHILD PROPERTIES πŸ“

yes, the children get their own properties. nepotism? maybe. iconic? also yes.

  • 'x' (integer : default 0 : readable / writable / private / static-nick / static-blurb) β€” X position of child widget 🌸
  • 'y' (integer : default 0 : readable / writable / private / static-nick / static-blurb) β€” Y position of child widget 🌸

⭐ SIGNALS ⭐

one signal, and she's serving:

  • set-scroll-adjustments (Gtk2::Layout, Gtk2::Adjustment, Gtk2::Adjustment) πŸ””

πŸ‘€ SEE ALSO πŸ‘€

go read these next, iykyk:

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


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

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


ngl, that's the whole page. every flag, every default, every child property β€” all of it, untouched. the facts didn't change, only the outfit did. πŸ’–

perl v5.42.0 Β· 2025-07-25 Β· and that's the Gtk2::Layout(3) era, mwah πŸ’‹ ✨

πŸ“¦ where this page comes from