Gtk2::Range(3)

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

πŸ’– Gtk2::Range β€” the manual, but make it make sense πŸ’–

okay so bestie. welcome to Gtk2::Range, from the User Contributed Perl Documentation corner of the Gtk2 family. this is the wrapper for GtkRange, and if you've ever dragged a scrollbar or a slider and felt something deep in your soul, that was a Range. she's the base class for the widgets that go from min to max and pick a value in between. iconic behavior, honestly. 🎚️✨


🌈 HIERARCHY 🌈

so this is the family tree, and yes she comes from a long line of distinguished ancestors:

Glib::Object
+----Glib::InitiallyUnowned
     +----Gtk2::Object
          +----Gtk2::Widget
               +----Gtk2::Range

the way that she is literally descended from Glib::Object through Glib::InitiallyUnowned, Gtk2::Object and Gtk2::Widget?? generational. πŸ‘‘


πŸ¦‹ INTERFACES πŸ¦‹

she also implements these, no big deal:

  • Glib::Object::_Unregistered::AtkImplementorIface
  • Gtk2::Buildable
  • Gtk2::Orientable

✨ METHODS ✨

πŸŽ€ adjustment = $range->get_adjustment

πŸŽ€ $range->set_adjustment ($adjustment)

get or set the adjustment. args:

  • $adjustment (Gtk2::Adjustment)

πŸŽ€ double = $range->get_fill_level

Since: gtk+ 2.12


πŸŽ€ $range->set_fill_level ($fill_level)

  • $fill_level (double)

Since: gtk+ 2.12


πŸŽ€ boolean = $range->get_flippable

Since: gtk+ 2.18


πŸŽ€ $range->set_flippable ($flippable)

  • $flippable (boolean)

Since: gtk+ 2.18


πŸŽ€ $range->set_increments ($step, $page)

sets how much a little nudge moves you vs. how much a whole page moves you:

  • $step (double)
  • $page (double)

πŸŽ€ boolean = $range->get_inverted

πŸŽ€ $range->set_inverted ($setting)

  • $setting (boolean)

πŸŽ€ sensitivitytype = $range->get_lower_stepper_sensitivity

Since: gtk+ 2.10


πŸŽ€ $range->set_lower_stepper_sensitivity ($sensitivity)

  • $sensitivity (Gtk2::SensitivityType)

Since: gtk+ 2.10


πŸŽ€ integer = $range->get_min_slider_size

Since: gtk+ 2.20


πŸŽ€ $range->set_min_slider_size ($min_size)

  • $min_size (boolean)

Since: gtk+ 2.20


πŸŽ€ rectangle = $range->get_range_rect

Since: gtk+ 2.20


πŸŽ€ $range->set_range ($min, $max)

  • $min (double)
  • $max (double)

πŸŽ€ boolean = $range->get_restrict_to_fill_level

Since: gtk+ 2.12


πŸŽ€ $range->set_restrict_to_fill_level ($restrict_to_fill_level)

  • $restrict_to_fill_level (boolean)

Since: gtk+ 2.12


πŸŽ€ boolean = $range->get_show_fill_level

Since: gtk+ 2.12


πŸŽ€ $range->set_show_fill_level ($show_fill_level)

  • $show_fill_level (boolean)

Since: gtk+ 2.12


πŸŽ€ (slider_start, slider_end) = $range->get_slider_range

Since: gtk+ 2.20


πŸŽ€ boolean = $range->get_slider_size_fixed

Since: gtk+ 2.20


πŸŽ€ $range->set_slider_size_fixed ($size_fixed)

  • $size_fixed (boolean)

Since: gtk+ 2.20


πŸŽ€ updatetype = $range->get_update_policy

πŸŽ€ $range->set_update_policy ($policy)

  • $policy (Gtk2::UpdateType)

πŸŽ€ sensitivitytype = $range->get_upper_stepper_sensitivity

Since: gtk+ 2.10


πŸŽ€ $range->set_upper_stepper_sensitivity ($sensitivity)

  • $sensitivity (Gtk2::SensitivityType)

Since: gtk+ 2.10


πŸŽ€ double = $range->get_value

πŸŽ€ $range->set_value ($value)

  • $value (double)

πŸ‘‘ PROPERTIES πŸ‘‘

okay these are the properties, with all their defaults and flags exactly as they are. do not come for me about the flags, i am just the messenger. πŸ’…

  • 'adjustment' (Gtk2::Adjustment : default undef : readable / writable / construct / private / static-nick / static-blurb) β€” The GtkAdjustment that contains the current value of this range object
  • 'fill-level' (double : default DBL_MAX : readable / writable / private / static-nick / static-blurb) β€” The fill level.
  • 'inverted' (boolean : default false : readable / writable / private / static-nick / static-blurb) β€” Invert direction slider moves to increase range value
  • 'lower-stepper-sensitivity' (Gtk2::SensitivityType : default "auto" : readable / writable / private / static-nick / static-blurb) β€” The sensitivity policy for the stepper that points to the adjustment's lower side
  • 'restrict-to-fill-level' (boolean : default true : readable / writable / private / static-nick / static-blurb) β€” Whether to restrict the upper boundary to the fill level.
  • 'round-digits' (integer : default -1 : readable / writable / private / static-nick / static-blurb) β€” The number of digits to round the value to.
  • 'show-fill-level' (boolean : default false : readable / writable / private / static-nick / static-blurb) β€” Whether to display a fill level indicator graphics on trough.
  • 'update-policy' (Gtk2::UpdateType : default "continuous" : readable / writable / private / static-nick / static-blurb) β€” How the range should be updated on the screen
  • 'upper-stepper-sensitivity' (Gtk2::SensitivityType : default "auto" : readable / writable / private / static-nick / static-blurb) β€” The sensitivity policy for the stepper that points to the adjustment's upper side

πŸ’… STYLE PROPERTIES πŸ’…

the aesthetic section. all of these are readable / private only, so look but don't touch, bestie:

  • 'activate-slider' (boolean : default false : readable / private / static-nick / static-blurb) β€” With this option set to TRUE, sliders will be drawn ACTIVE and with shadow IN while they are dragged
  • 'arrow-displacement-x' (integer : default 0 : readable / private / static-nick / static-blurb) β€” How far in the x direction to move the arrow when the button is depressed
  • 'arrow-displacement-y' (integer : default 0 : readable / private / static-nick / static-blurb) β€” How far in the y direction to move the arrow when the button is depressed
  • 'arrow-scaling' (float : default 0.5 : readable / private / static-nick / static-blurb) β€” Arrow scaling with regard to scroll button size
  • 'slider-width' (integer : default 14 : readable / private / static-nick / static-blurb) β€” Width of scrollbar or scale thumb
  • 'stepper-position-details' (boolean : default false : readable / private / static-nick / static-blurb) β€” When TRUE, the detail string for rendering the steppers is suffixed with position information
  • 'stepper-size' (integer : default 14 : readable / private / static-nick / static-blurb) β€” Length of step buttons at ends
  • 'stepper-spacing' (integer : default 0 : readable / private / static-nick / static-blurb) β€” Spacing between step buttons and thumb
  • 'trough-border' (integer : default 1 : readable / private / static-nick / static-blurb) β€” Spacing between thumb/steppers and outer trough bevel
  • 'trough-side-details' (boolean : default false : readable / private / static-nick / static-blurb) β€” When TRUE, the parts of the trough on the two sides of the slider are drawn with different details
  • 'trough-under-steppers' (boolean : default true : readable / private / static-nick / static-blurb) β€” Whether to draw trough for full length of range or exclude the steppers and spacing

πŸ”₯ SIGNALS πŸ”₯

she screams. here's everything she yells about:

  • adjust-bounds (Gtk2::Range, double)
  • boolean = change-value (Gtk2::Range, Gtk2::ScrollType, double)
  • move-slider (Gtk2::Range, Gtk2::ScrollType)
  • value-changed (Gtk2::Range)

🌸 ENUMS AND FLAGS 🌸

🧚 enum Gtk2::ScrollType

the full roster, no skips:

  • 'none' / GTK_SCROLL_NONE
  • 'jump' / GTK_SCROLL_JUMP
  • 'step-backward' / GTK_SCROLL_STEP_BACKWARD
  • 'step-forward' / GTK_SCROLL_STEP_FORWARD
  • 'page-backward' / GTK_SCROLL_PAGE_BACKWARD
  • 'page-forward' / GTK_SCROLL_PAGE_FORWARD
  • 'step-up' / GTK_SCROLL_STEP_UP
  • 'step-down' / GTK_SCROLL_STEP_DOWN
  • 'page-up' / GTK_SCROLL_PAGE_UP
  • 'page-down' / GTK_SCROLL_PAGE_DOWN
  • 'step-left' / GTK_SCROLL_STEP_LEFT
  • 'step-right' / GTK_SCROLL_STEP_RIGHT
  • 'page-left' / GTK_SCROLL_PAGE_LEFT
  • 'page-right' / GTK_SCROLL_PAGE_RIGHT
  • 'start' / GTK_SCROLL_START
  • 'end' / GTK_SCROLL_END

🧚 enum Gtk2::SensitivityType

  • 'auto' / GTK_SENSITIVITY_AUTO
  • 'on' / GTK_SENSITIVITY_ON
  • 'off' / GTK_SENSITIVITY_OFF

🧚 enum Gtk2::UpdateType

  • 'continuous' / GTK_UPDATE_CONTINUOUS
  • 'discontinuous' / GTK_UPDATE_DISCONTINUOUS
  • 'delayed' / GTK_UPDATE_DELAYED

πŸ’œ SEE ALSO πŸ’œ

go read these too, they're the friend group:

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


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

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


okay that's the whole page, no crumbs left. and for the sign-off: this was written for perl v5.42.0, dated 2025-07-25, and the page itself is Gtk2::Range(3). mwah, slay, go build a slider. πŸ’–βœ¨πŸŽ€πŸ¦‹
πŸ“¦ where this page comes from