Gtk2::Adjustment(3)

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

πŸ’– Gtk2::Adjustment β€” the wrapper for GtkAdjustment πŸ’–

okay bestie, listen. this is Gtk2::Adjustment β€” literally just the Perl wrapper for GtkAdjustment. that's it, that's the whole vibe. it holds a value and a range and tells everyone when stuff moves. scrollbars LIVE on this thing. πŸŽ€


🌸 HIERARCHY 🌸

the family tree, and yes she has main character energy all the way down:

  Glib::Object
  +----Glib::InitiallyUnowned
       +----Gtk2::Object
            +----Gtk2::Adjustment

✨ METHODS ✨

πŸ¦‹ object = Gtk2::Adjustment->new ($value, $lower, $upper, $step_increment, $page_increment, $page_size)

build a whole new adjustment from scratch, six numbers, no cap:

  • $value (double)
  • $lower (double)
  • $upper (double)
  • $step_increment (double)
  • $page_increment (double)
  • $page_size (double)

πŸ¦‹ $adjustment->changed

it's giving "hey everyone, something changed." πŸ’…

πŸ¦‹ $adjustment->clamp_page ($lower, $upper)

squeeze the page into place between two bounds:

  • $lower (double)
  • $upper (double)

πŸ¦‹ $adjustment->configure ($value, $lower, $upper, $step_increment, $page_increment, $page_size)

set ALL six of the things at once, glow-up style:

  • $value (double)
  • $lower (double)
  • $upper (double)
  • $step_increment (double)
  • $page_increment (double)
  • $page_size (double)
Since: gtk+ 2.14 ✨

πŸ¦‹ $adjustment->set_lower ($newval), $adjustment->set_page_increment ($newval), $adjustment->set_page_size ($newval), $adjustment->set_step_increment ($newval), $adjustment->set_upper ($newval)

  • $newval (double)

these are the ✨fancy✨ setters. they differ from the plain ->lower etc setters because they actually emit "notify" and "changed" signals β€” but ONLY if $newval is different from the current value. no change, no signal, periodt.

the matching get_lower etc are not wrapped, because they're literally the same as the lower etc field accessors down below. no need to duplicate the queen. πŸ‘‘

Since: gtk+ 2.14 ✨

πŸ¦‹ the six field accessors

double = $adjustment->value
double = $adjustment->value ($newval)
double = $adjustment->lower
double = $adjustment->lower ($newval)
double = $adjustment->upper
double = $adjustment->upper ($newval)
double = $adjustment->step_increment
double = $adjustment->step_increment ($newval)
double = $adjustment->page_increment
double = $adjustment->page_increment ($newval)
double = $adjustment->page_size
double = $adjustment->page_size ($newval)
  • $newval (double)

get or set the six fields of a Gtk2::Adjustment. that's the whole job bestie. 🫢

the setter functions store $newval and return the old value. and ngl, heads up: they don't emit any signals. it's fully up to you to emit "notify" (because the fields are also properties, iykyk) and "changed" or "value-changed" β€” whenever you're ready. no pressure. πŸ’…

πŸ¦‹ $adjustment->value_changed

πŸ¦‹ double = $adjustment->get_value

πŸ¦‹ $adjustment->set_value ($value)

  • $value (double)

πŸ‘‘ PROPERTIES πŸ‘‘

every single one of these is double : default 0 : readable / writable / private / static-nick / static-blurb. yes, all six. iconic consistency honestly.

  • 'lower' β€” the minimum value of the adjustment
  • 'page-increment' β€” the page increment of the adjustment
  • 'page-size' β€” the page size of the adjustment
  • 'step-increment' β€” the step increment of the adjustment
  • 'upper' β€” the maximum value of the adjustment
  • 'value' β€” the value of the adjustment

πŸ”” SIGNALS πŸ””

  • changed (Gtk2::Adjustment)
  • value-changed (Gtk2::Adjustment)

🫢 SEE ALSO 🫢

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

go read those too, bestie, they're the whole friend group. 🌈


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 tea πŸ“ β€” this page came from perl v5.42.0, dated 2025-07-25, in Gtk2::Adjustment(3). slay, bye bestie! πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from