<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>Gtk::Scale class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head> <body bgcolor="#ffffff"> <table border="0" width="100%"> <tr> <td width="10%" height="40"><img src="../../images/gtkmm_logo.gif" alt="logo" border="0" width="100%" height="100%"/></td> <td width="90%" height="40"><img src="../../images/top.gif" alt="top" width="100%" height="40"/></td> </tr> </table> <center> <a class="qindex" href="../../index.html">Main Page</a> <a href="group__Widgets.html">Widgets</a> <a class="qindex" href="namespaces.html"> Namespaces</a> <a href="../../tutorial/html/index.html"> Book</a> </center> <hr width="100%"/> <!-- Generated by Doxygen 1.3-rc1 --> <h1>Gtk::Scale Class Reference<br> <small> [<a class="el" href="group__Widgets.html">Widgets</a>]</small> </h1>Abstract base clase for <a class="el" href="classGtk_1_1HScale.html">Gtk::HScale</a> and <a class="el" href="classGtk_1_1VScale.html">Gtk::VScale</a>. <a href="#_details">More...</a> <p> Inheritance diagram for Gtk::Scale:<p><center><img src="classGtk_1_1Scale__inherit__graph.png" border="0" usemap="#Gtk_1_1Scale__inherit__map" alt="Inheritance graph"></center> <map name="Gtk_1_1Scale__inherit__map"> <area href="classGtk_1_1HScale.html" shape="rect" coords="7,433,87,451" alt=""> <area href="classGtk_1_1VScale.html" shape="rect" coords="111,433,193,451" alt=""> <area href="classGtk_1_1Range.html" shape="rect" coords="60,294,137,313" alt=""> <area href="classGtk_1_1Widget.html" shape="rect" coords="60,225,137,243" alt=""> <area href="classGtk_1_1Object.html" shape="rect" coords="60,155,137,174" alt=""> <area href="classGlib_1_1Object.html" shape="rect" coords="59,86,139,105" alt=""> <area href="classGlib_1_1ObjectBase.html" shape="rect" coords="44,17,153,35" alt=""> </map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classGtk_1_1Scale-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0> <tr><td></td></tr> <tr><td colspan=2><br><h2>Public Methods</h2></td></tr> <tr><td nowrap align=right valign=top>virtual </td><td valign=bottom><a class="el" href="classGtk_1_1Scale.html#a0">~Scale</a> ()</td></tr> <tr><td nowrap align=right valign=top>GtkScale* </td><td valign=bottom><a class="el" href="classGtk_1_1Scale.html#a1">gobj</a> ()</td></tr> <tr><td nowrap align=right valign=top>const GtkScale* </td><td valign=bottom><a class="el" href="classGtk_1_1Scale.html#a2">gobj</a> () const</td></tr> <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classGtk_1_1Scale.html#a3">set_digits</a> (int digits)</td></tr> <tr><td> </td><td><font size=-1><em>Set the number of decimal digits.</em> <a href="#a3"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>int </td><td valign=bottom><a class="el" href="classGtk_1_1Scale.html#a4">get_digits</a> () const</td></tr> <tr><td> </td><td><font size=-1><em>Get the number of decimal digits.</em> <a href="#a4"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classGtk_1_1Scale.html#a5">set_draw_value</a> (bool draw_value=true)</td></tr> <tr><td> </td><td><font size=-1><em>Set whether the current value is displayed as a string next to the slider.</em> <a href="#a5"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classGtk_1_1Scale.html#a6">get_draw_value</a> () const</td></tr> <tr><td> </td><td><font size=-1><em>Get whether the current value is displayed as a string next to the slider.</em> <a href="#a6"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classGtk_1_1Scale.html#a7">set_value_pos</a> (<a class="el" href="group__gtkmmEnums.html#a82">PositionType</a> pos)</td></tr> <tr><td> </td><td><font size=-1><em>Set the position in which the value is displayed.</em> <a href="#a7"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top><a class="el" href="group__gtkmmEnums.html#a82">PositionType</a> </td><td valign=bottom><a class="el" href="classGtk_1_1Scale.html#a8">get_value_pos</a> () const</td></tr> <tr><td> </td><td><font size=-1><em>Get the position in which the value is displayed.</em> <a href="#a8"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top><a class="el" href="classGlib_1_1SignalProxy1.html">Glib::SignalProxy1</a>< <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>,<br> double > </td><td valign=bottom><a class="el" href="classGtk_1_1Scale.html#a9">signal_format_value</a> ()</td></tr> <tr><td nowrap align=right valign=top><a class="el" href="classGlib_1_1PropertyProxy.html">Glib::PropertyProxy</a><int> </td><td valign=bottom><a class="el" href="classGtk_1_1Scale.html#a10">property_digits</a> ()</td></tr> <tr><td> </td><td><font size=-1><em>Number of displayed decimal digits.</em> <a href="#a10"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top><a class="el" href="classGlib_1_1PropertyProxy.html">Glib::PropertyProxy</a><bool> </td><td valign=bottom><a class="el" href="classGtk_1_1Scale.html#a11">property_draw_value</a> ()</td></tr> <tr><td> </td><td><font size=-1><em>Whether to draw the value as a string next to slider.</em> <a href="#a11"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top><a class="el" href="classGlib_1_1PropertyProxy.html">Glib::PropertyProxy</a><<a class="el" href="group__gtkmmEnums.html#a82">PositionType</a>> </td><td valign=bottom><a class="el" href="classGtk_1_1Scale.html#a12">property_value_pos</a> ()</td></tr> <tr><td> </td><td><font size=-1><em>The position in which the value is displayed.</em> <a href="#a12"></a><em></em></font><br><br></td></tr> <tr><td colspan=2><br><h2>Protected Methods</h2></td></tr> <tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="classGtk_1_1Scale.html#b0">draw_value_vfunc</a> ()</td></tr> <tr><td nowrap align=right valign=top>virtual <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a> </td><td valign=bottom><a class="el" href="classGtk_1_1Scale.html#b1">on_format_value</a> (double value)</td></tr> <tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classGtk_1_1Scale.html#b2">Scale</a> ()</td></tr> <tr><td nowrap align=right valign=top>virtual int </td><td valign=bottom><a class="el" href="classGtk_1_1Scale.html#b3">calc_digits_</a> (double step)</td></tr> <tr><td colspan=2><br><h2>Related Functions</h2></td></tr> <tr><td colspan=2>(Note that these are not member functions.)<br><br></td></tr> <tr><td nowrap align=right valign=top>Gtk::Scale* </td><td valign=bottom><a class="el" href="classGtk_1_1Scale.html#k0">wrap</a> (GtkScale* object, bool take_copy=false)</td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Abstract base clase for <a class="el" href="classGtk_1_1HScale.html">Gtk::HScale</a> and <a class="el" href="classGtk_1_1VScale.html">Gtk::VScale</a>. <p> A Gtk::Scale is a slider control used to select a numeric value. To use it, you'll probably want to investigate the methods on its base class, <a class="el" href="classGtk_1_1Range.html">Gtk::Range</a>, in addition to the methods for Gtk::Scale itself. To set the value of a scale, you would normally use <a class="el" href="classGtk_1_1Range.html#a13">set_value()</a>. To detect changes to the value, you would normally use <a class="el" href="classGtk_1_1Range.html#a15">signal_value_changed()</a>. <p> The Gtk::Scale widget is an abstract class, used only for deriving the subclasses <a class="el" href="classGtk_1_1HScale.html">Gtk::HScale</a> and <a class="el" href="classGtk_1_1VScale.html">Gtk::VScale</a>, so you should instantiate them instead. <p> <hr><h2>Constructor & Destructor Documentation</h2> <a name="a0" doxytag="Gtk::Scale::~Scale"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual Gtk::Scale::~Scale </td> <td class="md" valign="top">(</td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> </td> </tr> </table> <a name="b2" doxytag="Gtk::Scale::Scale"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> Gtk::Scale::Scale </td> <td class="md" valign="top">(</td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [protected]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> </td> </tr> </table> <hr><h2>Member Function Documentation</h2> <a name="b3" doxytag="Gtk::Scale::calc_digits_"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual int Gtk::Scale::calc_digits_ </td> <td class="md" valign="top">(</td> <td class="md" nowrap valign="top">double </td> <td class="mdname1" valign="top" nowrap> <em>step</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [protected, virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> </td> </tr> </table> <a name="b0" doxytag="Gtk::Scale::draw_value_vfunc"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual void Gtk::Scale::draw_value_vfunc </td> <td class="md" valign="top">(</td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [protected, virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> </td> </tr> </table> <a name="a4" doxytag="Gtk::Scale::get_digits"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> int Gtk::Scale::get_digits </td> <td class="md" valign="top">(</td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const</td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Get the number of decimal digits. <p> </td> </tr> </table> <a name="a6" doxytag="Gtk::Scale::get_draw_value"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> bool Gtk::Scale::get_draw_value </td> <td class="md" valign="top">(</td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const</td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Get whether the current value is displayed as a string next to the slider. <p> </td> </tr> </table> <a name="a8" doxytag="Gtk::Scale::get_value_pos"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="group__gtkmmEnums.html#a82">PositionType</a> Gtk::Scale::get_value_pos </td> <td class="md" valign="top">(</td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const</td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Get the position in which the value is displayed. <p> </td> </tr> </table> <a name="a2" doxytag="Gtk::Scale::gobj"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> const GtkScale* Gtk::Scale::gobj </td> <td class="md" valign="top">(</td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const<code> [inline]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> <p> Reimplemented from <a class="el" href="classGtk_1_1Range.html#a2">Gtk::Range</a>. <p> Reimplemented in <a class="el" href="classGtk_1_1VScale.html#a2">Gtk::VScale</a>, and <a class="el" href="classGtk_1_1HScale.html#a2">Gtk::HScale</a>. </td> </tr> </table> <a name="a1" doxytag="Gtk::Scale::gobj"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> GtkScale* Gtk::Scale::gobj </td> <td class="md" valign="top">(</td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [inline]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> <p> Reimplemented from <a class="el" href="classGtk_1_1Range.html#a1">Gtk::Range</a>. <p> Reimplemented in <a class="el" href="classGtk_1_1VScale.html#a1">Gtk::VScale</a>, and <a class="el" href="classGtk_1_1HScale.html#a1">Gtk::HScale</a>. </td> </tr> </table> <a name="b1" doxytag="Gtk::Scale::on_format_value"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a> Gtk::Scale::on_format_value </td> <td class="md" valign="top">(</td> <td class="md" nowrap valign="top">double </td> <td class="mdname1" valign="top" nowrap> <em>value</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [protected, virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> </td> </tr> </table> <a name="a10" doxytag="Gtk::Scale::property_digits"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="classGlib_1_1PropertyProxy.html">Glib::PropertyProxy</a><int> Gtk::Scale::property_digits </td> <td class="md" valign="top">(</td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Number of displayed decimal digits. <p> </td> </tr> </table> <a name="a11" doxytag="Gtk::Scale::property_draw_value"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="classGlib_1_1PropertyProxy.html">Glib::PropertyProxy</a><bool> Gtk::Scale::property_draw_value </td> <td class="md" valign="top">(</td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Whether to draw the value as a string next to slider. <p> </td> </tr> </table> <a name="a12" doxytag="Gtk::Scale::property_value_pos"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="classGlib_1_1PropertyProxy.html">Glib::PropertyProxy</a><<a class="el" href="group__gtkmmEnums.html#a82">PositionType</a>> Gtk::Scale::property_value_pos </td> <td class="md" valign="top">(</td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> The position in which the value is displayed. <p> </td> </tr> </table> <a name="a3" doxytag="Gtk::Scale::set_digits"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void Gtk::Scale::set_digits </td> <td class="md" valign="top">(</td> <td class="md" nowrap valign="top">int </td> <td class="mdname1" valign="top" nowrap> <em>digits</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Set the number of decimal digits. <p> This also causes the adjustment to be rounded off so the retrieved value matches the value the user sees. Setting digits to 1 gives for example 1.0, 2 gives 1.00, etc. </td> </tr> </table> <a name="a5" doxytag="Gtk::Scale::set_draw_value"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void Gtk::Scale::set_draw_value </td> <td class="md" valign="top">(</td> <td class="md" nowrap valign="top">bool </td> <td class="mdname1" valign="top" nowrap> <em>draw_value</em> = true </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Set whether the current value is displayed as a string next to the slider. <p> </td> </tr> </table> <a name="a7" doxytag="Gtk::Scale::set_value_pos"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void Gtk::Scale::set_value_pos </td> <td class="md" valign="top">(</td> <td class="md" nowrap valign="top"><a class="el" href="group__gtkmmEnums.html#a82">PositionType</a> </td> <td class="mdname1" valign="top" nowrap> <em>pos</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Set the position in which the value is displayed. <p> </td> </tr> </table> <a name="a9" doxytag="Gtk::Scale::signal_format_value"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="classGlib_1_1SignalProxy1.html">Glib::SignalProxy1</a><<a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>,double> Gtk::Scale::signal_format_value </td> <td class="md" valign="top">(</td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> <dl compact><dt><b>Prototype:</b></dt><dd><code><a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a> format_value(double value)</code> </dd></dl> </td> </tr> </table> <hr><h2>Friends And Related Function Documentation</h2> <a name="k0" doxytag="Gtk::Scale::wrap"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> Gtk::Scale* wrap </td> <td class="md" valign="top">(</td> <td class="md" nowrap valign="top">GtkScale* </td> <td class="mdname" nowrap> <em>object</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>bool </td> <td class="mdname" nowrap> <em>take_copy</em> = false</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [related]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> </td> </tr> </table> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="scale_8h.html">scale.h</a></ul> <hr><address><small> Generated for gtkmm by <a href="http://www.doxygen.org/index.html"> Doxygen</a> 1.3-rc1 © 1997-2001</small></address> </body> </html>