gtk.Rulera base class for horizontal or vertical rulersSynopsisgtk.Rulergtk.Widgetset_metricmetricset_rangelowerupperpositionmax_sizedraw_ticksdraw_posget_metricget_rangeAncestry+-- gobject.GObject
+-- gtk.Object
+-- gtk.Widget
+-- gtk.Ruler
Implemented Interfacesgtk.Ruler
implements
gtk.Buildablegtk.Ruler Propertiesgtk.Object Propertiesgtk.Widget Properties
"lower"Read-Writethe lower limit of the ruler"max-size"Read-Writethe maximum size of the ruler"metric"Read-WriteThe metric used for the ruler. This property is available
in GTK+ 2.8 and above."position"Read-Writethe position of the mark on the ruler"upper"Read-Writethe upper limit of the ruler
gtk.Ruler Style Propertiesgtk.Widget Style Propertiesgtk.Ruler Signal Prototypesgobject.GObject Signal Prototypesgtk.Object Signal Prototypesgtk.Widget Signal PrototypesDescriptionThis widget is considered too specialized or little-used for
PyGTK and GTK+, and will in the future be moved to some other package. If
your application needs this widget, feel free to use it, as the widget does
work and is useful in some applications; it's just not of general interest.
However, it will eventually move out of the PyGTK and GTK+
distribution.The gtk.Ruler widget is a
base class for horizontal and vertical rulers. Rulers are used to show the
mouse pointer's location in a window. Within the ruler a small triangle
indicates the location of the mouse relative to the horizontal or vertical
ruler. See gtk.HRuler to learn
about horizontal rulers. See gtk.VRuler to learn
about vertical rulers.Methodsgtk.Ruler.set_metricset_metricmetricmetric :the measurement unitsThe set_metric() method sets the
measurement units of the ruler to the value specified by
metric. Available units are
gtk.PIXELS, gtk.INCHES, or
gtk.CENTIMETERS. The default unit of measurement is
gtk.PIXELS.gtk.Ruler.set_rangeset_rangelowerupperpositionmax_sizelower :the upper limit of the rulerupper :the lower limit of the rulerposition :the position of the mark on the rulermax_size :the maximum size of the ruleThe set_range() method sets the range
of the ruler to the values specified by lower,
upper, position and
max_size (all values are floats).gtk.Ruler.draw_ticksdraw_ticksThe draw_ticks() method is overridden
by the gtk.Ruler subclasses
(gtk.HRuler
and gtk.VRuler) to draw
the tick marks on the ruler. This method is not used by applications.gtk.Ruler.draw_posdraw_posThe draw_pos() method is overridden by
the gtk.Ruler
subclasses (gtk.HRuler and gtk.VRuler) to draw
the position mark on the ruler. This method is not used by
applications.gtk.Ruler.get_metricget_metricReturns :the measurement units currently used for the
rulerThe get_metric() method returns the
units used for a gtk.Ruler. See the
set_metric()
method.gtk.Ruler.get_rangeget_rangeReturns> :a tuple containing: the lower limit of the
ruler, the upper limit of the ruler, the current position of the mark on the
ruler and the maximum size of the ruler used when calculating the space to
leave for the text.The get_range() method returns a tuple
containing the values indicating the range and current position of a gtk.Ruler. See the
set_range()
method.