<!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::CheckMenuItem 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::CheckMenuItem Class Reference<br> <small> [<a class="el" href="group__Widgets.html">Widgets</a>, <a class="el" href="group__Menus.html">Menu classes</a>]</small> </h1>A menu item that maintains the state of a boolean value in addition to a Gtk::MenuItem's usual role in activating application code. <a href="#_details">More...</a> <p> Inheritance diagram for Gtk::CheckMenuItem:<p><center><img src="classGtk_1_1CheckMenuItem__inherit__graph.png" border="0" usemap="#Gtk_1_1CheckMenuItem__inherit__map" alt="Inheritance graph"></center> <map name="Gtk_1_1CheckMenuItem__inherit__map"> <area href="classGtk_1_1RadioMenuItem.html" shape="rect" coords="9,641,137,659" alt=""> <area href="classGtk_1_1MenuItem.html" shape="rect" coords="25,502,121,521" alt=""> <area href="classGtk_1_1Item.html" shape="rect" coords="41,433,105,451" alt=""> <area href="classGtk_1_1Bin.html" shape="rect" coords="45,363,101,382" alt=""> <area href="classGtk_1_1Container.html" shape="rect" coords="25,294,121,313" alt=""> <area href="classGtk_1_1Widget.html" shape="rect" coords="35,225,112,243" alt=""> <area href="classGtk_1_1Object.html" shape="rect" coords="35,155,112,174" alt=""> <area href="classGlib_1_1Object.html" shape="rect" coords="33,86,113,105" alt=""> <area href="classGlib_1_1ObjectBase.html" shape="rect" coords="19,17,128,35" alt=""> </map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classGtk_1_1CheckMenuItem-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_1CheckMenuItem.html#a0">~CheckMenuItem</a> ()</td></tr> <tr><td nowrap align=right valign=top>GtkCheckMenuItem* </td><td valign=bottom><a class="el" href="classGtk_1_1CheckMenuItem.html#a1">gobj</a> ()</td></tr> <tr><td nowrap align=right valign=top>const GtkCheckMenuItem* </td><td valign=bottom><a class="el" href="classGtk_1_1CheckMenuItem.html#a2">gobj</a> () const</td></tr> <tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classGtk_1_1CheckMenuItem.html#a3">CheckMenuItem</a> ()</td></tr> <tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classGtk_1_1CheckMenuItem.html#a4">CheckMenuItem</a> (const <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>& label, bool mnemonic=false)</td></tr> <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classGtk_1_1CheckMenuItem.html#a5">set_active</a> (bool state=true)</td></tr> <tr><td nowrap align=right valign=top>bool </td><td valign=bottom><a class="el" href="classGtk_1_1CheckMenuItem.html#a6">get_active</a> () const</td></tr> <tr><td> </td><td><font size=-1><em>Returns whether the check menu item is active.</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_1CheckMenuItem.html#a7">toggled</a> ()</td></tr> <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classGtk_1_1CheckMenuItem.html#a8">set_inconsistent</a> (bool setting=true)</td></tr> <tr><td> </td><td><font size=-1><em>If the user has selected a range of elements (such as some text or spreadsheet cells) that are affected by a boolean setting, and the current values in that range are inconsistent, you may want to display the check in an "in between" state.</em> <a href="#a8"></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_1CheckMenuItem.html#a9">get_inconsistent</a> () const</td></tr> <tr><td> </td><td><font size=-1><em>Retrieves the value set by <a class="el" href="classGtk_1_1CheckMenuItem.html#a8">set_inconsistent()</a>.</em> <a href="#a9"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top><a class="el" href="classGlib_1_1SignalProxy0.html">Glib::SignalProxy0</a><void> </td><td valign=bottom><a class="el" href="classGtk_1_1CheckMenuItem.html#a10">signal_toggled</a> ()</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_1CheckMenuItem.html#a11">property_active</a> ()</td></tr> <tr><td> </td><td><font size=-1><em>Triggered when the item is redrawn (e.g.after being toggled) Overload this signal if you want to implement your own check item look.</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><bool> </td><td valign=bottom><a class="el" href="classGtk_1_1CheckMenuItem.html#a12">property_inconsistent</a> ()</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_1CheckMenuItem.html#b0">draw_indicator_vfunc</a> (GdkRectangle* area)</td></tr> <tr><td nowrap align=right valign=top>virtual void </td><td valign=bottom><a class="el" href="classGtk_1_1CheckMenuItem.html#b1">on_toggled</a> ()</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::CheckMenuItem* </td><td valign=bottom><a class="el" href="classGtk_1_1CheckMenuItem.html#k0">wrap</a> (GtkCheckMenuItem* object, bool take_copy=false)</td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> A menu item that maintains the state of a boolean value in addition to a Gtk::MenuItem's usual role in activating application code. <p> A check box indicating the state of the boolean value is displayed at the left side of the <a class="el" href="classGtk_1_1MenuItem.html">Gtk::MenuItem</a>. Activating the <a class="el" href="classGtk_1_1MenuItem.html">Gtk::MenuItem</a> toggles the value. <p> <hr><h2>Constructor & Destructor Documentation</h2> <a name="a0" doxytag="Gtk::CheckMenuItem::~CheckMenuItem"></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::CheckMenuItem::~CheckMenuItem </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="a3" doxytag="Gtk::CheckMenuItem::CheckMenuItem"></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::CheckMenuItem::CheckMenuItem </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> </td> </tr> </table> <a name="a4" doxytag="Gtk::CheckMenuItem::CheckMenuItem"></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::CheckMenuItem::CheckMenuItem </td> <td class="md" valign="top">(</td> <td class="md" nowrap valign="top">const <a class="el" href="classGlib_1_1ustring.html">Glib::ustring</a>& </td> <td class="mdname" nowrap> <em>label</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>bool </td> <td class="mdname" nowrap> <em>mnemonic</em> = false</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [explicit]</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="b0" doxytag="Gtk::CheckMenuItem::draw_indicator_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::CheckMenuItem::draw_indicator_vfunc </td> <td class="md" valign="top">(</td> <td class="md" nowrap valign="top">GdkRectangle* </td> <td class="mdname1" valign="top" nowrap> <em>area</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="a6" doxytag="Gtk::CheckMenuItem::get_active"></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::CheckMenuItem::get_active </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> Returns whether the check menu item is active. <p> See <a class="el" href="classGtk_1_1CheckMenuItem.html#a5">set_active()</a>. <dl compact><dt><b>Returns:</b></dt><dd><code>true</code> if the menu item is checked. </dd></dl> </td> </tr> </table> <a name="a9" doxytag="Gtk::CheckMenuItem::get_inconsistent"></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::CheckMenuItem::get_inconsistent </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> Retrieves the value set by <a class="el" href="classGtk_1_1CheckMenuItem.html#a8">set_inconsistent()</a>. <p> <dl compact><dt><b>Returns:</b></dt><dd><code>true</code> if inconsistent. </dd></dl> </td> </tr> </table> <a name="a2" doxytag="Gtk::CheckMenuItem::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 GtkCheckMenuItem* Gtk::CheckMenuItem::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_1MenuItem.html#a2">Gtk::MenuItem</a>. <p> Reimplemented in <a class="el" href="classGtk_1_1RadioMenuItem.html#a2">Gtk::RadioMenuItem</a>. </td> </tr> </table> <a name="a1" doxytag="Gtk::CheckMenuItem::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"> GtkCheckMenuItem* Gtk::CheckMenuItem::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_1MenuItem.html#a1">Gtk::MenuItem</a>. <p> Reimplemented in <a class="el" href="classGtk_1_1RadioMenuItem.html#a1">Gtk::RadioMenuItem</a>. </td> </tr> </table> <a name="b1" doxytag="Gtk::CheckMenuItem::on_toggled"></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::CheckMenuItem::on_toggled </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="a11" doxytag="Gtk::CheckMenuItem::property_active"></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::CheckMenuItem::property_active </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> Triggered when the item is redrawn (e.g.after being toggled) Overload this signal if you want to implement your own check item look. <p> Otherwise, you most likely don't care about it. The GdkRectangle specifies the area of the widget which will get redrawn. </td> </tr> </table> <a name="a12" doxytag="Gtk::CheckMenuItem::property_inconsistent"></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::CheckMenuItem::property_inconsistent </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> </td> </tr> </table> <a name="a5" doxytag="Gtk::CheckMenuItem::set_active"></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::CheckMenuItem::set_active </td> <td class="md" valign="top">(</td> <td class="md" nowrap valign="top">bool </td> <td class="mdname1" valign="top" nowrap> <em>state</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> </td> </tr> </table> <a name="a8" doxytag="Gtk::CheckMenuItem::set_inconsistent"></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::CheckMenuItem::set_inconsistent </td> <td class="md" valign="top">(</td> <td class="md" nowrap valign="top">bool </td> <td class="mdname1" valign="top" nowrap> <em>setting</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> If the user has selected a range of elements (such as some text or spreadsheet cells) that are affected by a boolean setting, and the current values in that range are inconsistent, you may want to display the check in an "in between" state. <p> This function turns on "in between" display. Normally you would turn off the inconsistent state again if the user explicitly selects a setting. This has to be done manually, <a class="el" href="classGtk_1_1CheckMenuItem.html#a8">set_inconsistent()</a> only affects visual appearance, it doesn't affect the semantics of the widget. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign=top><em>setting</em> </td><td><code>true</code> to display an "inconsistent" third state check. </td></tr> </table> </dl> </td> </tr> </table> <a name="a10" doxytag="Gtk::CheckMenuItem::signal_toggled"></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_1SignalProxy0.html">Glib::SignalProxy0</a><void> Gtk::CheckMenuItem::signal_toggled </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>void toggled()</code> </dd></dl> </td> </tr> </table> <a name="a7" doxytag="Gtk::CheckMenuItem::toggled"></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::CheckMenuItem::toggled </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> </td> </tr> </table> <hr><h2>Friends And Related Function Documentation</h2> <a name="k0" doxytag="Gtk::CheckMenuItem::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::CheckMenuItem* wrap </td> <td class="md" valign="top">(</td> <td class="md" nowrap valign="top">GtkCheckMenuItem* </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="checkmenuitem_8h.html">checkmenuitem.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>