Gtk2::Ruler(3)

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

πŸ’– NAME πŸ’–

Gtk2::Ruler β€” bestie, it's a wrapper for GtkRuler ✨ it's giving "measuring tape but make it GUI" fr fr πŸ“

This page lives in the User Contributed Perl Documentation, and the whole vibe is Gtk2::Ruler(3), iykyk.


πŸ¦‹ HIERARCHY πŸ¦‹

okay so the family tree, and yes we're doing the whole thing, no skipping:

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

look at her. four generations of iconic ancestry and she's the main character at the bottom πŸ’…


🌸 INTERFACES 🌸

the interfaces she serves, periodt:

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

✨ METHODS ✨

πŸŽ€ $ruler->draw_pos

that's it. that's the whole call. no args, no drama, she just does the thing 🫢

πŸŽ€ $ruler->draw_ticks

same energy, no arguments, just vibes and tick marks ✨

πŸŽ€ metrictype = $ruler->get_metric

hands you back the current metric type. lowkey the most chill getter ever πŸ’œ

πŸŽ€ $ruler->set_metric ($metric)

sets the metric. she takes one lil argument:

  • $metric (Gtk2::MetricType) β€” the metric type you want, bestie

πŸŽ€ (lower, upper, position, max_size) = $ruler->get_range

returns a whole lil squad of four values at once. iconic behaviour, honestly πŸŽ€

πŸŽ€ $ruler->set_range ($lower, $upper, $position, $max_size)

sets all four at once. arguments, in order:

  • $lower (double)
  • $upper (double)
  • $position (double)
  • $max_size (double)

πŸ’… PROPERTIES πŸ’…

every single one of these is readable / writable / private / static-nick / static-blurb, no cap. all five, same energy, go off queens πŸ‘‘

  • 'lower' (double : default 0 : readable / writable / private / static-nick / static-blurb) β€” lower limit of the ruler 🌈
  • 'max-size' (double : default 0 : readable / writable / private / static-nick / static-blurb) β€” maximum size of the ruler πŸ“
  • 'metric' (Gtk2::MetricType : default "pixels" : readable / writable / private / static-nick / static-blurb) β€” the metric used for the ruler ✨
  • 'position' (double : default 0 : readable / writable / private / static-nick / static-blurb) β€” position of the mark on the ruler 🎯
  • 'upper' (double : default 0 : readable / writable / private / static-nick / static-blurb) β€” upper limit of the ruler 🌸

🌈 ENUMS AND FLAGS 🌈

🧚 enum Gtk2::MetricType

the three options, bestie, and they are:

  • 'pixels' / 'GTK_PIXELS' ⭐
  • 'inches' / 'GTK_INCHES' ⭐
  • 'centimeters' / 'GTK_CENTIMETERS' ⭐

πŸ‘€ SEE ALSO πŸ‘€

go read these too, they're all linked up like a group chat:

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. (yes bestie, actually read it, it's the whole legal moment πŸ’€)


aww and that's the whole page πŸ₯Ή this doc was generated by perl v5.42.0 on 2025-07-25, and it's filed under Gtk2::Ruler(3) β€” slay, bye bestie, go measure something pretty πŸ’–βœ¨πŸŽ€
πŸ“¦ where this page comes from