<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>Wt: Wt::WButtonGroup Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css" /> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { searchBox.OnSelectItem(0); }); </script> </head> <body> <div id="top"><!-- do not remove this div! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">Wt  <span id="projectnumber">3.2.3</span> </div> </td> </tr> </tbody> </table> </div> <!-- Generated by Doxygen 1.7.5.1 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="inherits.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespaceWt.html">Wt</a> </li> <li class="navelem"><a class="el" href="classWt_1_1WButtonGroup.html">WButtonGroup</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> </div> <div class="headertitle"> <div class="title">Wt::WButtonGroup Class Reference</div> </div> </div> <div class="contents"> <!-- doxytag: class="Wt::WButtonGroup" --><!-- doxytag: inherits="Wt::WObject" --> <p>A class for grouping radio buttons logically together. <a href="classWt_1_1WButtonGroup.html#details">More...</a></p> <p><code>#include <Wt/WButtonGroup></code></p> <div class="dynheader"> Inheritance diagram for Wt::WButtonGroup:</div> <div class="dyncontent"> <div class="center"><img src="classWt_1_1WButtonGroup__inherit__graph.png" border="0" usemap="#Wt_1_1WButtonGroup_inherit__map" alt="Inheritance graph"/></div> <map name="Wt_1_1WButtonGroup_inherit__map" id="Wt_1_1WButtonGroup_inherit__map"> <area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="23,5,119,32"/></map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="classWt_1_1WButtonGroup-members.html">List of all members.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2e29884c479c910861aa6f023d324210"></a><!-- doxytag: member="Wt::WButtonGroup::WButtonGroup" ref="a2e29884c479c910861aa6f023d324210" args="(WObject *parent=0)" -->  </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WButtonGroup.html#a2e29884c479c910861aa6f023d324210">WButtonGroup</a> (<a class="el" href="classWt_1_1WObject.html">WObject</a> *parent=0)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a new empty button group. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WButtonGroup.html#a0f1876538ca9400a0afc7e2d2831e7a9">~WButtonGroup</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#a0f1876538ca9400a0afc7e2d2831e7a9"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WButtonGroup.html#abbe8605c1e57e75316731af9124bacca">addButton</a> (<a class="el" href="classWt_1_1WRadioButton.html">WRadioButton</a> *button, int id=-1)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Adds a radio button to the group. <a href="#abbe8605c1e57e75316731af9124bacca"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WButtonGroup.html#a3a6b317dc22600acd1344de9e6a05987">addButton</a> (<a class="el" href="classWt_1_1Ext_1_1RadioButton.html">Ext::RadioButton</a> *button, int id=-1)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Adds a radio button to the group. <a href="#a3a6b317dc22600acd1344de9e6a05987"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WButtonGroup.html#ade4ea1cf5ac08b17e0f92153c98204d3">removeButton</a> (<a class="el" href="classWt_1_1WRadioButton.html">WRadioButton</a> *button)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Removes a radio button from the group. <a href="#ade4ea1cf5ac08b17e0f92153c98204d3"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WButtonGroup.html#a9b2c7ea25d0e83d9ae894c2f0ce9bd67">removeButton</a> (<a class="el" href="classWt_1_1Ext_1_1RadioButton.html">Ext::RadioButton</a> *button)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Removes a radio button from the group. <a href="#a9b2c7ea25d0e83d9ae894c2f0ce9bd67"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1WRadioButton.html">WRadioButton</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WButtonGroup.html#ad77d4e097182bea774d3d5d34c548145">button</a> (int id) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the button for the given id. <a href="#ad77d4e097182bea774d3d5d34c548145"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WButtonGroup.html#a3afa1365a54718ace10b42f2e3a345bc">id</a> (<a class="el" href="classWt_1_1WRadioButton.html">WRadioButton</a> *button) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the id for the given button. <a href="#a3afa1365a54718ace10b42f2e3a345bc"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual const std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WButtonGroup.html#abadc2ee3d7c98c6d4f7f0dcf3384d3be">id</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the (unique) identifier for this object. <a href="#abadc2ee3d7c98c6d4f7f0dcf3384d3be"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a92ad438da83c631b10b69096a6d3b653"></a><!-- doxytag: member="Wt::WButtonGroup::buttons" ref="a92ad438da83c631b10b69096a6d3b653" args="() const " --> std::vector< <a class="el" href="classWt_1_1WRadioButton.html">WRadioButton</a> * > </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WButtonGroup.html#a92ad438da83c631b10b69096a6d3b653">buttons</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the buttons in this group. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aff9a2079d4fffaf4d2aa5c816bd37abf"></a><!-- doxytag: member="Wt::WButtonGroup::count" ref="aff9a2079d4fffaf4d2aa5c816bd37abf" args="() const " --> int </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WButtonGroup.html#aff9a2079d4fffaf4d2aa5c816bd37abf">count</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of radiobuttons in this group. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WButtonGroup.html#a00f6285ab6326a6fef8b9ca7c7646948">checkedId</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the id of the checked button. <a href="#a00f6285ab6326a6fef8b9ca7c7646948"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WButtonGroup.html#ac67ce8ffc614cb7319efa4657c57f25a">setCheckedButton</a> (<a class="el" href="classWt_1_1WRadioButton.html">WRadioButton</a> *button)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the currently checked radiobutton. <a href="#ac67ce8ffc614cb7319efa4657c57f25a"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1WRadioButton.html">WRadioButton</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WButtonGroup.html#a92ed2843d2fdf9dfacc9d3e27b5ac994">checkedButton</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the checked radiobutton. <a href="#a92ed2843d2fdf9dfacc9d3e27b5ac994"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WButtonGroup.html#a968222f7cba72561b1712c90efc30d46">setSelectedButtonIndex</a> (int idx)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the currently checked radiobutton. <a href="#a968222f7cba72561b1712c90efc30d46"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WButtonGroup.html#a44aa1dc058bbfbc698289d56ba0424ee">selectedButtonIndex</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the index of the checked radiobutton. <a href="#a44aa1dc058bbfbc698289d56ba0424ee"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1Signal.html">Signal</a>< <a class="el" href="classWt_1_1WRadioButton.html">WRadioButton</a> * > & </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WButtonGroup.html#ad5661cc6137de244819f47f492b42687">checkedChanged</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Signal emitted when a button was checked. <a href="#ad5661cc6137de244819f47f492b42687"></a><br/></td></tr> </table> <hr/><a name="details" id="details"></a><h2>Detailed Description</h2> <div class="textblock"><p>A class for grouping radio buttons logically together. </p> <p>A button group manages a set of <a class="el" href="classWt_1_1WRadioButton.html">radio buttons</a>, making them exclusive of each other.</p> <p>It is not a widget, but instead provides only a logical grouping. Radio buttons are aware of the group in which they have been added, see <a class="el" href="classWt_1_1WRadioButton.html#a908574da36efe50c70fc6a9d77f045cd" title="Returns the button group.">WRadioButton::group()</a>. When a button is deleted, it is automatically removed its button group.</p> <p>It allows you to associate id's with each button, which you may use to identify a particular button. The special value of -1 is reserved to indicate <em>no button</em>.</p> <p>Usage example: </p> <div class="fragment"><pre class="fragment"> <span class="keyword">enum</span> Vote { Republican = 1, Democrate = 2, NoVote = 10 }; <span class="comment">// use a group box as widget container for 3 radio buttons, with a title</span> <a class="code" href="classWt_1_1WGroupBox.html" title="A widget which group widgets into a frame with a title.">Wt::WGroupBox</a> *container = <span class="keyword">new</span> <a class="code" href="classWt_1_1WGroupBox.html" title="A widget which group widgets into a frame with a title.">Wt::WGroupBox</a>(<span class="stringliteral">"USA elections vote"</span>); <span class="comment">// use a button group to logically group the 3 options</span> <a class="code" href="classWt_1_1WButtonGroup.html" title="A class for grouping radio buttons logically together.">Wt::WButtonGroup</a> *group = <span class="keyword">new</span> <a class="code" href="classWt_1_1WButtonGroup.html#a2e29884c479c910861aa6f023d324210" title="Creates a new empty button group.">Wt::WButtonGroup</a>(<span class="keyword">this</span>); <a class="code" href="classWt_1_1WRadioButton.html" title="A user control that represents a radio button.">Wt::WRadioButton</a> *<a class="code" href="classWt_1_1WButtonGroup.html#ad77d4e097182bea774d3d5d34c548145" title="Returns the button for the given id.">button</a>; button = <span class="keyword">new</span> <a class="code" href="classWt_1_1WRadioButton.html" title="A user control that represents a radio button.">Wt::WRadioButton</a>(<span class="stringliteral">"I voted Republican"</span>, container); <span class="keyword">new</span> <a class="code" href="classWt_1_1WBreak.html" title="A widget that provides a line break between inline widgets.">Wt::WBreak</a>(container); group-><a class="code" href="classWt_1_1WButtonGroup.html#abbe8605c1e57e75316731af9124bacca" title="Adds a radio button to the group.">addButton</a>(button, Republican); button = <span class="keyword">new</span> <a class="code" href="classWt_1_1WRadioButton.html" title="A user control that represents a radio button.">Wt::WRadioButton</a>(<span class="stringliteral">"I voted Democrat"</span>, container); <span class="keyword">new</span> <a class="code" href="classWt_1_1WBreak.html" title="A widget that provides a line break between inline widgets.">Wt::WBreak</a>(container); group-><a class="code" href="classWt_1_1WButtonGroup.html#abbe8605c1e57e75316731af9124bacca" title="Adds a radio button to the group.">addButton</a>(button, Democrate); button = <span class="keyword">new</span> <a class="code" href="classWt_1_1WRadioButton.html" title="A user control that represents a radio button.">Wt::WRadioButton</a>(<span class="stringliteral">"I didn't vote"</span>, container); <span class="keyword">new</span> <a class="code" href="classWt_1_1WBreak.html" title="A widget that provides a line break between inline widgets.">Wt::WBreak</a>(container); group-><a class="code" href="classWt_1_1WButtonGroup.html#abbe8605c1e57e75316731af9124bacca" title="Adds a radio button to the group.">addButton</a>(button, NoVote); group-><a class="code" href="classWt_1_1WButtonGroup.html#ac67ce8ffc614cb7319efa4657c57f25a" title="Sets the currently checked radiobutton.">setCheckedButton</a>(group-><a class="code" href="classWt_1_1WButtonGroup.html#ad77d4e097182bea774d3d5d34c548145" title="Returns the button for the given id.">button</a>(NoVote)); </pre></div><dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WRadioButton.html" title="A user control that represents a radio button.">WRadioButton</a>, <a class="el" href="classWt_1_1Ext_1_1RadioButton.html" title="A user control that represents a radio button.">Ext::RadioButton</a> </dd></dl> </div><hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="a0f1876538ca9400a0afc7e2d2831e7a9"></a><!-- doxytag: member="Wt::WButtonGroup::~WButtonGroup" ref="a0f1876538ca9400a0afc7e2d2831e7a9" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Wt::WButtonGroup::~WButtonGroup </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Destructor. </p> <p>This does not delete the radio buttons, but simply removes them from the group. </p> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="abbe8605c1e57e75316731af9124bacca"></a><!-- doxytag: member="Wt::WButtonGroup::addButton" ref="abbe8605c1e57e75316731af9124bacca" args="(WRadioButton *button, int id=-1)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::WButtonGroup::addButton </td> <td>(</td> <td class="paramtype"><a class="el" href="classWt_1_1WRadioButton.html">WRadioButton</a> * </td> <td class="paramname"><em>button</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>id</em> = <code>-1</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Adds a radio button to the group. </p> <p>You can assign an id to the button. If <code>id</code> is -1, then a unique id will be generated.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WButtonGroup.html#ade4ea1cf5ac08b17e0f92153c98204d3" title="Removes a radio button from the group.">removeButton(WRadioButton *)</a> </dd></dl> </div> </div> <a class="anchor" id="a3a6b317dc22600acd1344de9e6a05987"></a><!-- doxytag: member="Wt::WButtonGroup::addButton" ref="a3a6b317dc22600acd1344de9e6a05987" args="(Ext::RadioButton *button, int id=-1)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::WButtonGroup::addButton </td> <td>(</td> <td class="paramtype"><a class="el" href="classWt_1_1Ext_1_1RadioButton.html">Ext::RadioButton</a> * </td> <td class="paramname"><em>button</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>id</em> = <code>-1</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Adds a radio button to the group. </p> <p>You can assign an id to the button. If <code>id</code> is -1, then a unique id will be generated.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WButtonGroup.html#a9b2c7ea25d0e83d9ae894c2f0ce9bd67" title="Removes a radio button from the group.">removeButton(Ext::RadioButton *)</a> </dd></dl> </div> </div> <a class="anchor" id="ad77d4e097182bea774d3d5d34c548145"></a><!-- doxytag: member="Wt::WButtonGroup::button" ref="ad77d4e097182bea774d3d5d34c548145" args="(int id) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classWt_1_1WRadioButton.html">WRadioButton</a> * Wt::WButtonGroup::button </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>id</em></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Returns the button for the given id. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WButtonGroup.html#a3afa1365a54718ace10b42f2e3a345bc" title="Returns the id for the given button.">id()</a>, <a class="el" href="classWt_1_1WButtonGroup.html#abbe8605c1e57e75316731af9124bacca" title="Adds a radio button to the group.">addButton()</a> </dd></dl> </div> </div> <a class="anchor" id="a92ed2843d2fdf9dfacc9d3e27b5ac994"></a><!-- doxytag: member="Wt::WButtonGroup::checkedButton" ref="a92ed2843d2fdf9dfacc9d3e27b5ac994" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classWt_1_1WRadioButton.html">WRadioButton</a> * Wt::WButtonGroup::checkedButton </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Returns the checked radiobutton. </p> <p>If there is no radiobutton currently checked this function returns <code>0</code>.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WButtonGroup.html#ac67ce8ffc614cb7319efa4657c57f25a" title="Sets the currently checked radiobutton.">setCheckedButton()</a>, <a class="el" href="classWt_1_1WButtonGroup.html#a44aa1dc058bbfbc698289d56ba0424ee" title="Returns the index of the checked radiobutton.">selectedButtonIndex()</a> </dd></dl> </div> </div> <a class="anchor" id="ad5661cc6137de244819f47f492b42687"></a><!-- doxytag: member="Wt::WButtonGroup::checkedChanged" ref="ad5661cc6137de244819f47f492b42687" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classWt_1_1Signal.html">Signal</a>< <a class="el" href="classWt_1_1WRadioButton.html">WRadioButton</a> * > & Wt::WButtonGroup::checkedChanged </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Signal emitted when a button was checked. </p> <p>The argument passed is the new <a class="el" href="classWt_1_1WButtonGroup.html#a92ed2843d2fdf9dfacc9d3e27b5ac994" title="Returns the checked radiobutton.">checkedButton()</a>. </p> </div> </div> <a class="anchor" id="a00f6285ab6326a6fef8b9ca7c7646948"></a><!-- doxytag: member="Wt::WButtonGroup::checkedId" ref="a00f6285ab6326a6fef8b9ca7c7646948" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int Wt::WButtonGroup::checkedId </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Returns the id of the checked button. </p> <p>Returns the id of the currently checked button, or -1 if no button is currently checked. </p> </div> </div> <a class="anchor" id="a3afa1365a54718ace10b42f2e3a345bc"></a><!-- doxytag: member="Wt::WButtonGroup::id" ref="a3afa1365a54718ace10b42f2e3a345bc" args="(WRadioButton *button) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int Wt::WButtonGroup::id </td> <td>(</td> <td class="paramtype"><a class="el" href="classWt_1_1WRadioButton.html">WRadioButton</a> * </td> <td class="paramname"><em>button</em></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Returns the id for the given button. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WButtonGroup.html#ad77d4e097182bea774d3d5d34c548145" title="Returns the button for the given id.">button()</a>, <a class="el" href="classWt_1_1WButtonGroup.html#abbe8605c1e57e75316731af9124bacca" title="Adds a radio button to the group.">addButton()</a> </dd></dl> </div> </div> <a class="anchor" id="abadc2ee3d7c98c6d4f7f0dcf3384d3be"></a><!-- doxytag: member="Wt::WButtonGroup::id" ref="abadc2ee3d7c98c6d4f7f0dcf3384d3be" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual const std::string Wt::WButtonGroup::id </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Returns the (unique) identifier for this object. </p> <p>For a WWidget, this corresponds to the id of the DOM element that represents the widget. This is not entirely unique, since a <a class="el" href="classWt_1_1WCompositeWidget.html">composite widget</a> shares the same id as its implementation.</p> <p>By default, the id is auto-generated, unless a custom id is set for a widget using <a class="el" href="classWt_1_1WWidget.html#a93ff9d1ca04e733cd54cd40a06775f7e" title="Sets the CSS Id.">WWidget::setId()</a>. The auto-generated id is created by concatenating <a class="el" href="classWt_1_1WObject.html#a5cad0cc3f73402de1422747653ece18f" title="Returns the object name.">objectName()</a> with a unique number.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WWidget.html#aa2b7078b3b43d53a85e5244b45d504f7" title="Returns a JavaScript expression to the corresponding DOM node.">WWidget::jsRef()</a> </dd></dl> <p>Reimplemented from <a class="el" href="classWt_1_1WObject.html#a5c5cc1d7aada99baf97d0dc203e42154">Wt::WObject</a>.</p> </div> </div> <a class="anchor" id="ade4ea1cf5ac08b17e0f92153c98204d3"></a><!-- doxytag: member="Wt::WButtonGroup::removeButton" ref="ade4ea1cf5ac08b17e0f92153c98204d3" args="(WRadioButton *button)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::WButtonGroup::removeButton </td> <td>(</td> <td class="paramtype"><a class="el" href="classWt_1_1WRadioButton.html">WRadioButton</a> * </td> <td class="paramname"><em>button</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Removes a radio button from the group. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WButtonGroup.html#abbe8605c1e57e75316731af9124bacca" title="Adds a radio button to the group.">addButton(WRadioButton *, int)</a> </dd></dl> </div> </div> <a class="anchor" id="a9b2c7ea25d0e83d9ae894c2f0ce9bd67"></a><!-- doxytag: member="Wt::WButtonGroup::removeButton" ref="a9b2c7ea25d0e83d9ae894c2f0ce9bd67" args="(Ext::RadioButton *button)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::WButtonGroup::removeButton </td> <td>(</td> <td class="paramtype"><a class="el" href="classWt_1_1Ext_1_1RadioButton.html">Ext::RadioButton</a> * </td> <td class="paramname"><em>button</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Removes a radio button from the group. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WButtonGroup.html#a3a6b317dc22600acd1344de9e6a05987" title="Adds a radio button to the group.">addButton(Ext::RadioButton *, int)</a> </dd></dl> </div> </div> <a class="anchor" id="a44aa1dc058bbfbc698289d56ba0424ee"></a><!-- doxytag: member="Wt::WButtonGroup::selectedButtonIndex" ref="a44aa1dc058bbfbc698289d56ba0424ee" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int Wt::WButtonGroup::selectedButtonIndex </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Returns the index of the checked radiobutton. </p> <p>The index reflects the order in which the buttons have been added to the button group. Use <a class="el" href="classWt_1_1WButtonGroup.html#a00f6285ab6326a6fef8b9ca7c7646948" title="Returns the id of the checked button.">checkedId()</a> if you want to know the id of the button that is currently checked. If there is no radiobutton selected this function returns -1.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WButtonGroup.html#a00f6285ab6326a6fef8b9ca7c7646948" title="Returns the id of the checked button.">checkedId()</a> </dd></dl> </div> </div> <a class="anchor" id="ac67ce8ffc614cb7319efa4657c57f25a"></a><!-- doxytag: member="Wt::WButtonGroup::setCheckedButton" ref="ac67ce8ffc614cb7319efa4657c57f25a" args="(WRadioButton *button)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::WButtonGroup::setCheckedButton </td> <td>(</td> <td class="paramtype"><a class="el" href="classWt_1_1WRadioButton.html">WRadioButton</a> * </td> <td class="paramname"><em>button</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Sets the currently checked radiobutton. </p> <p>The button <code>button</code> of this group is checked. A value of <code>0</code> will uncheck all radiobuttons.</p> <p>Initially, no button is checked.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WButtonGroup.html#a00f6285ab6326a6fef8b9ca7c7646948" title="Returns the id of the checked button.">checkedId()</a> </dd></dl> </div> </div> <a class="anchor" id="a968222f7cba72561b1712c90efc30d46"></a><!-- doxytag: member="Wt::WButtonGroup::setSelectedButtonIndex" ref="a968222f7cba72561b1712c90efc30d46" args="(int idx)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Wt::WButtonGroup::setSelectedButtonIndex </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>idx</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Sets the currently checked radiobutton. </p> <p>Sets the <code>idx'th</code> radiobutton checked. A value of -1 will uncheck all radiobuttons.</p> <p>Initially, no button is checked. </p> </div> </div> </div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <hr size="1"><address style="text-align: right; margin: 3px"><small> Generated on Thu Nov 1 2012 for <a href="http://www.webtoolkit.eu/wt">the C++ Web Toolkit (Wt)</a> by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" border="0" style="vertical-align: middle; display: inline-block; height: 2em"></a> 1.7.5.1</small></address> </body> </html>