/usr/share/gtk-doc/html/pygtk/class-gtkruler.html is in python-gtk2-doc 2.24.0-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.Ruler</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="gtk-class-reference.html" title="The gtk Class Reference"><link rel="prev" href="class-gtkrequisition.html" title="gtk.Requisition"><link rel="next" href="class-gtkscale.html" title="gtk.Scale"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gtk.Ruler</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkrequisition.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkscale.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.Ruler"><a name="class-gtkruler"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.Ruler</h2><p>gtk.Ruler — a base class for horizontal or vertical rulers</p></div><div class="refsect1" title="Synopsis"><a name="id3879645"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.Ruler</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gtkwidget.html" title="gtk.Widget">gtk.Widget</a></span></span>):
<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkruler.html#method-gtkruler--set-metric" title="gtk.Ruler.set_metric">set_metric</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>metric</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkruler.html#method-gtkruler--set-range" title="gtk.Ruler.set_range">set_range</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>lower</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>upper</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>position</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>max_size</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkruler.html#method-gtkruler--draw-ticks" title="gtk.Ruler.draw_ticks">draw_ticks</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkruler.html#method-gtkruler--draw-pos" title="gtk.Ruler.draw_pos">draw_pos</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkruler.html#method-gtkruler--get-metric" title="gtk.Ruler.get_metric">get_metric</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkruler.html#method-gtkruler--get-range" title="gtk.Ruler.get_range">get_range</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3879851"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
+-- <a class="link" href="class-gtkobject.html" title="gtk.Object">gtk.Object</a>
+-- <a class="link" href="class-gtkwidget.html" title="gtk.Widget">gtk.Widget</a>
+-- <a class="link" href="class-gtkruler.html" title="gtk.Ruler">gtk.Ruler</a>
</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id3879889"></a><h2>Implemented Interfaces</h2><p>
<a class="link" href="class-gtkruler.html" title="gtk.Ruler"><code class="classname">gtk.Ruler</code></a>
implements
<a class="link" href="class-gtkbuildable.html" title="gtk.Buildable"><code class="classname">gtk.Buildable</code></a>
</p></div><div class="refsect1" title="gtk.Ruler Properties"><a name="properties-gtkruler"></a><h2>gtk.Ruler Properties</h2><p><a class="link" href="class-gtkobject.html#properties-gtkobject" title="gtk.Object Properties">gtk.Object Properties</a></p><p><a class="link" href="class-gtkwidget.html#properties-gtkwidget" title="gtk.Widget Properties">gtk.Widget Properties</a></p><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"lower"</td><td valign="top">Read-Write</td><td valign="top">the lower limit of the ruler</td></tr><tr valign="top"><td valign="top">"max-size"</td><td valign="top">Read-Write</td><td valign="top">the maximum size of the ruler</td></tr><tr valign="top"><td valign="top">"metric"</td><td valign="top">Read-Write</td><td valign="top">The metric used for the ruler. This property is available
in GTK+ 2.8 and above.</td></tr><tr valign="top"><td valign="top">"position"</td><td valign="top">Read-Write</td><td valign="top">the position of the mark on the ruler</td></tr><tr valign="top"><td valign="top">"upper"</td><td valign="top">Read-Write</td><td valign="top">the upper limit of the ruler</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="gtk.Ruler Style Properties"><a name="style-properties-gtkruler"></a><h2>gtk.Ruler Style Properties</h2><p><a class="link" href="class-gtkwidget.html#style-properties-gtkwidget" title="gtk.Widget Style Properties">gtk.Widget Style Properties</a></p></div><div class="refsect1" title="gtk.Ruler Signal Prototypes"><a name="signal-prototypes-gtkruler"></a><h2>gtk.Ruler Signal Prototypes</h2><p><PYGTKDOCLINK HREF="signal-prototypes-gobject">gobject.GObject Signal Prototypes</PYGTKDOCLINK></p><p><a class="link" href="class-gtkobject.html#signal-prototypes-gtkobject" title="gtk.Object Signal Prototypes">gtk.Object Signal Prototypes</a></p><p><a class="link" href="class-gtkwidget.html#signal-prototypes-gtkwidget" title="gtk.Widget Signal Prototypes">gtk.Widget Signal Prototypes</a></p></div><div class="refsect1" title="Description"><a name="id3880130"></a><h2>Description</h2><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This 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.</p></div><p>The <a class="link" href="class-gtkruler.html" title="gtk.Ruler"><code class="classname">gtk.Ruler</code></a> 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 <a class="link" href="class-gtkhruler.html" title="gtk.HRuler"><code class="classname">gtk.HRuler</code></a> to learn
about horizontal rulers. See <a class="link" href="class-gtkvruler.html" title="gtk.VRuler"><code class="classname">gtk.VRuler</code></a> to learn
about vertical rulers.</p></div><div class="refsect1" title="Methods"><a name="id3880180"></a><h2>Methods</h2><div class="refsect2" title="gtk.Ruler.set_metric"><a name="method-gtkruler--set-metric"></a><h3>gtk.Ruler.set_metric</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_metric</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>metric</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>metric</code></strong> :</span></p></td><td>the measurement units</td></tr></tbody></table><p>The <code class="methodname">set_metric</code>() method sets the
measurement units of the ruler to the value specified by
<em class="parameter"><code>metric</code></em>. Available units are
<code class="literal">gtk.PIXELS</code>, <code class="literal">gtk.INCHES</code>, or
<code class="literal">gtk.CENTIMETERS</code>. The default unit of measurement is
<code class="literal">gtk.PIXELS</code>.</p></div><div class="refsect2" title="gtk.Ruler.set_range"><a name="method-gtkruler--set-range"></a><h3>gtk.Ruler.set_range</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_range</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>lower</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>upper</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>position</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>max_size</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>lower</code></strong> :</span></p></td><td>the upper limit of the ruler</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>upper</code></strong> :</span></p></td><td>the lower limit of the ruler</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>position</code></strong> :</span></p></td><td>the position of the mark on the ruler</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>max_size</code></strong> :</span></p></td><td>the maximum size of the rule</td></tr></tbody></table><p>The <code class="methodname">set_range</code>() method sets the range
of the ruler to the values specified by <em class="parameter"><code>lower</code></em>,
<em class="parameter"><code>upper</code></em>, <em class="parameter"><code>position</code></em> and
<em class="parameter"><code>max_size</code></em> (all values are floats).</p></div><div class="refsect2" title="gtk.Ruler.draw_ticks"><a name="method-gtkruler--draw-ticks"></a><h3>gtk.Ruler.draw_ticks</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">draw_ticks</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="methodname">draw_ticks</code>() method is overridden
by the <a class="link" href="class-gtkruler.html" title="gtk.Ruler"><code class="classname">gtk.Ruler</code></a> subclasses
(<a class="link" href="class-gtkhruler.html" title="gtk.HRuler"><code class="classname">gtk.HRuler</code></a>
and <a class="link" href="class-gtkvruler.html" title="gtk.VRuler"><code class="classname">gtk.VRuler</code></a>) to draw
the tick marks on the ruler. This method is not used by applications.</p></div><div class="refsect2" title="gtk.Ruler.draw_pos"><a name="method-gtkruler--draw-pos"></a><h3>gtk.Ruler.draw_pos</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">draw_pos</span>(<span class="methodparam"></span>)</code></pre><p>The <code class="methodname">draw_pos</code>() method is overridden by
the <a class="link" href="class-gtkruler.html" title="gtk.Ruler"><code class="classname">gtk.Ruler</code></a>
subclasses (<a class="link" href="class-gtkhruler.html" title="gtk.HRuler"><code class="classname">gtk.HRuler</code></a> and <a class="link" href="class-gtkvruler.html" title="gtk.VRuler"><code class="classname">gtk.VRuler</code></a>) to draw
the position mark on the ruler. This method is not used by
applications.</p></div><div class="refsect2" title="gtk.Ruler.get_metric"><a name="method-gtkruler--get-metric"></a><h3>gtk.Ruler.get_metric</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_metric</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the measurement units currently used for the
ruler</td></tr></tbody></table><p>The <code class="methodname">get_metric</code>() method returns the
units used for a <a class="link" href="class-gtkruler.html" title="gtk.Ruler"><code class="classname">gtk.Ruler</code></a>. See the
<a class="link" href="class-gtkruler.html#method-gtkruler--set-metric" title="gtk.Ruler.set_metric"><code class="methodname">set_metric</code>()</a>
method.</p></div><div class="refsect2" title="gtk.Ruler.get_range"><a name="method-gtkruler--get-range"></a><h3>gtk.Ruler.get_range</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_range</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>> :</span></p></td><td>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.</td></tr></tbody></table><p>The <code class="methodname">get_range</code>() method returns a tuple
containing the values indicating the range and current position of a <a class="link" href="class-gtkruler.html" title="gtk.Ruler"><code class="classname">gtk.Ruler</code></a>. See the
<a class="link" href="class-gtkruler.html#method-gtkruler--set-range" title="gtk.Ruler.set_range"><code class="methodname">set_range</code>()</a>
method.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gtkrequisition.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gtk-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gtkscale.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.Requisition </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.Scale</td></tr></table></div></body></html>
|