Gtk2::Adjustment(3)
π 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 π
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
- 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