Gtk2::Scale(3)
π Gtk2::Scale β the vibe check
okay bestie, so this is a page from the User Contributed Perl Documentation (that's the manual name, we stan a community effort) and it's all about Gtk2::Scale β literally just a thin little wrapper around GtkScale, the widget that gives you a slider with numbers on it. yes queen, that slider. the one you drag. iconic behavior.
β¨ NAME β¨
Gtk2::Scale β it's the wrapper for GtkScale. that's it, that's the name, short and sweet π
πΈ HIERARCHY πΈ
so like, here's the family tree, the ancestry, the lineage, the main character bloodline:
Glib::Object
+----Glib::InitiallyUnowned
+----Gtk2::Object
+----Gtk2::Widget
+----Gtk2::Range
+----Gtk2::Scale
every single one of those is its ancestor, no skips, no cuts. Gtk2::Scale is a Gtk2::Range is a Gtk2::Widget is a Gtk2::Object is a Glib::InitiallyUnowned is a Glib::Object. periodt π«Ά
π¦ INTERFACES π¦
it also implements these, bestie β think of them as the little extra personalities it carries around:
Glib::Object::_Unregistered::AtkImplementorIfaceGtk2::BuildableGtk2::Orientable
β METHODS β
π $scale->add_mark ($value, $position, $markup)
drops a lil mark on the scale. here's the tea on the args:
$value(double)$position(Gtk2::PositionType)$markup(string or undef)
Since: gtk+ 2.16 β so if you're on something ancient, this one's not gonna pick up the phone π
π $scale->clear_marks
yeets every single mark off the scale. clean slate, fresh start, new era β¨
Since: gtk+ 2.16
π integer = $scale->get_digits / $scale->set_digits ($digits)
get or set how many decimal places are shown. args:
$digits(integer)
π boolean = $scale->get_draw_value / $scale->set_draw_value ($draw_value)
get or set whether the value text is actually drawn. args:
$draw_value(boolean)
π layout = $scale->get_layout
hands you the Pango::Layout used for the value text. lowkey useful.
Since: gtk+ 2.4
π (x, y) = $scale->get_layout_offsets
gives you back the offsets, as a two-element list. coordinates girlies rise π
Since: gtk+ 2.4
π positiontype = $scale->get_value_pos / $scale->set_value_pos ($pos)
where the value text sits. args:
$pos(Gtk2::PositionType)
π PROPERTIES π
'digits'(integer : default 1 : readable / writable / private / static-nick / static-blurb) β the number of decimal places that are displayed in the value'draw-value'(boolean : default true : readable / writable / private / static-nick / static-blurb) β whether the current value is displayed as a string next to the slider'value-pos'(Gtk2::PositionType : default"top": readable / writable / private / static-nick / static-blurb) β the position in which the current value is displayed
π STYLE PROPERTIES π
these ones are read-only bestie, look but don't touch:
'slider-length'(integer : default 31 : readable / private / static-nick / static-blurb) β length of scale's slider'value-spacing'(integer : default 2 : readable / private / static-nick / static-blurb) β space between value text and the slider/trough area
π₯ SIGNALS π₯
string = format-value (Gtk2::Scale, double)
it fires, you hand back a string, the scale shows your string. chef's kiss, no notes π
π§ ENUMS AND FLAGS π§
enum Gtk2::PositionType
'left'/GTK_POS_LEFT'right'/GTK_POS_RIGHT'top'/GTK_POS_TOP'bottom'/GTK_POS_BOTTOM
all four, all accounted for, nothing missing π
π SEE ALSO π
go read these too, they're all in the same friend group:
Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Range
π 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, we ate and left no crumbs π«Ά this was Gtk2::Scale(3), generated from perl v5.42.0 on 2025-07-25 β mwah, drink water, go forth and slay your sliders πβ¨π
π¦ 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