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 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Wt: Wt::WButtonGroup Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<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>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<div class="navpath"><a class="el" href="namespaceWt.html">Wt</a>::<a class="el" href="classWt_1_1WButtonGroup.html">WButtonGroup</a>
</div>
</div>
<div class="contents">
<h1>Wt::WButtonGroup Class Reference</h1><!-- doxytag: class="Wt::WButtonGroup" --><!-- doxytag: inherits="Wt::WObject" -->A class for grouping radio buttons logically together.
<a href="#_details">More...</a>
<p>
<code>#include <Wt/WButtonGroup></code>
<p>
<div class="dynheader">
Inheritance diagram for Wt::WButtonGroup:</div>
<div class="dynsection">
<p><center><img src="classWt_1_1WButtonGroup__inherit__graph.png" border="0" usemap="#Wt_1_1WButtonGroup__inherit__map" alt="Inheritance graph"></center>
<map name="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><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
<p>
<a href="classWt_1_1WButtonGroup-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 Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2e29884c479c910861aa6f023d324210"></a><!-- doxytag: member="Wt::WButtonGroup::WButtonGroup" ref="2e29884c479c910861aa6f023d324210" args="(WObject *parent=0)" -->
</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WButtonGroup.html#2e29884c479c910861aa6f023d324210">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" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WButtonGroup.html#0f1876538ca9400a0afc7e2d2831e7a9">~WButtonGroup</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#0f1876538ca9400a0afc7e2d2831e7a9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WButtonGroup.html#bbe8605c1e57e75316731af9124bacca">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="#bbe8605c1e57e75316731af9124bacca"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WButtonGroup.html#3a6b317dc22600acd1344de9e6a05987">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="#3a6b317dc22600acd1344de9e6a05987"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WButtonGroup.html#de4ea1cf5ac08b17e0f92153c98204d3">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="#de4ea1cf5ac08b17e0f92153c98204d3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WButtonGroup.html#9b2c7ea25d0e83d9ae894c2f0ce9bd67">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="#9b2c7ea25d0e83d9ae894c2f0ce9bd67"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap 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#d77d4e097182bea774d3d5d34c548145">button</a> (int id) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the button for the given id. <a href="#d77d4e097182bea774d3d5d34c548145"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WButtonGroup.html#3afa1365a54718ace10b42f2e3a345bc">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="#3afa1365a54718ace10b42f2e3a345bc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WButtonGroup.html#badc2ee3d7c98c6d4f7f0dcf3384d3be">id</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the (unique) identifier for this object. <a href="#badc2ee3d7c98c6d4f7f0dcf3384d3be"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="92ad438da83c631b10b69096a6d3b653"></a><!-- doxytag: member="Wt::WButtonGroup::buttons" ref="92ad438da83c631b10b69096a6d3b653" 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#92ad438da83c631b10b69096a6d3b653">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" nowrap align="right" valign="top"><a class="anchor" name="ff9a2079d4fffaf4d2aa5c816bd37abf"></a><!-- doxytag: member="Wt::WButtonGroup::count" ref="ff9a2079d4fffaf4d2aa5c816bd37abf" args="() const " -->
int </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WButtonGroup.html#ff9a2079d4fffaf4d2aa5c816bd37abf">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" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WButtonGroup.html#00f6285ab6326a6fef8b9ca7c7646948">checkedId</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the id of the checked button. <a href="#00f6285ab6326a6fef8b9ca7c7646948"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WButtonGroup.html#c67ce8ffc614cb7319efa4657c57f25a">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="#c67ce8ffc614cb7319efa4657c57f25a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap 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#92ed2843d2fdf9dfacc9d3e27b5ac994">checkedButton</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the checked radiobutton. <a href="#92ed2843d2fdf9dfacc9d3e27b5ac994"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WButtonGroup.html#968222f7cba72561b1712c90efc30d46">setSelectedButtonIndex</a> (int idx)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the currently checked radiobutton. <a href="#968222f7cba72561b1712c90efc30d46"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WButtonGroup.html#44aa1dc058bbfbc698289d56ba0424ee">selectedButtonIndex</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the index of the checked radiobutton. <a href="#44aa1dc058bbfbc698289d56ba0424ee"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap 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#d5661cc6137de244819f47f492b42687">checkedChanged</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Signal emitted when a button was checked. <a href="#d5661cc6137de244819f47f492b42687"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A class for grouping radio buttons logically together.
<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>
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#908574da36efe50c70fc6a9d77f045cd" title="Returns the button group.">WRadioButton::group()</a>. When a button is deleted, it is automatically removed its button group.<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>
Usage example: <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" title="A class for grouping radio buttons logically together.">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#d77d4e097182bea774d3d5d34c548145" 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#bbe8605c1e57e75316731af9124bacca" 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#bbe8605c1e57e75316731af9124bacca" 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#bbe8605c1e57e75316731af9124bacca" title="Adds a radio button to the group.">addButton</a>(button, NoVote);
group-><a class="code" href="classWt_1_1WButtonGroup.html#c67ce8ffc614cb7319efa4657c57f25a" title="Sets the currently checked radiobutton.">setCheckedButton</a>(group-><a class="code" href="classWt_1_1WButtonGroup.html#d77d4e097182bea774d3d5d34c548145" title="Returns the button for the given id.">button</a>(NoVote));
</pre></div><p>
<dl class="see" compact><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>
<hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="0f1876538ca9400a0afc7e2d2831e7a9"></a><!-- doxytag: member="Wt::WButtonGroup::~WButtonGroup" ref="0f1876538ca9400a0afc7e2d2831e7a9" 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>
This does not delete the radio buttons, but simply removes them from the group.
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="bbe8605c1e57e75316731af9124bacca"></a><!-- doxytag: member="Wt::WButtonGroup::addButton" ref="bbe8605c1e57e75316731af9124bacca" 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><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Adds a radio button to the group.
<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" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WButtonGroup.html#de4ea1cf5ac08b17e0f92153c98204d3" title="Removes a radio button from the group.">removeButton(WRadioButton *)</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="3a6b317dc22600acd1344de9e6a05987"></a><!-- doxytag: member="Wt::WButtonGroup::addButton" ref="3a6b317dc22600acd1344de9e6a05987" 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><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Adds a radio button to the group.
<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" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WButtonGroup.html#9b2c7ea25d0e83d9ae894c2f0ce9bd67" title="Removes a radio button from the group.">removeButton(Ext::RadioButton *)</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="de4ea1cf5ac08b17e0f92153c98204d3"></a><!-- doxytag: member="Wt::WButtonGroup::removeButton" ref="de4ea1cf5ac08b17e0f92153c98204d3" 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" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WButtonGroup.html#bbe8605c1e57e75316731af9124bacca" title="Adds a radio button to the group.">addButton(WRadioButton *, int)</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="9b2c7ea25d0e83d9ae894c2f0ce9bd67"></a><!-- doxytag: member="Wt::WButtonGroup::removeButton" ref="9b2c7ea25d0e83d9ae894c2f0ce9bd67" 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" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WButtonGroup.html#3a6b317dc22600acd1344de9e6a05987" title="Adds a radio button to the group.">addButton(Ext::RadioButton *, int)</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="d77d4e097182bea774d3d5d34c548145"></a><!-- doxytag: member="Wt::WButtonGroup::button" ref="d77d4e097182bea774d3d5d34c548145" 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" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WButtonGroup.html#3afa1365a54718ace10b42f2e3a345bc" title="Returns the id for the given button.">id()</a>, <a class="el" href="classWt_1_1WButtonGroup.html#bbe8605c1e57e75316731af9124bacca" title="Adds a radio button to the group.">addButton()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="3afa1365a54718ace10b42f2e3a345bc"></a><!-- doxytag: member="Wt::WButtonGroup::id" ref="3afa1365a54718ace10b42f2e3a345bc" 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" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WButtonGroup.html#d77d4e097182bea774d3d5d34c548145" title="Returns the button for the given id.">button()</a>, <a class="el" href="classWt_1_1WButtonGroup.html#bbe8605c1e57e75316731af9124bacca" title="Adds a radio button to the group.">addButton()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="badc2ee3d7c98c6d4f7f0dcf3384d3be"></a><!-- doxytag: member="Wt::WButtonGroup::id" ref="badc2ee3d7c98c6d4f7f0dcf3384d3be" 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> [inline, virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns the (unique) identifier for this object.
<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>
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#93ff9d1ca04e733cd54cd40a06775f7e" title="Sets the CSS Id.">WWidget::setId()</a>. The auto-generated id is created by concatenating <a class="el" href="classWt_1_1WObject.html#5cad0cc3f73402de1422747653ece18f" title="Returns the object name.">objectName()</a> with a unique number.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WWidget.html#a2b7078b3b43d53a85e5244b45d504f7" 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#5c5cc1d7aada99baf97d0dc203e42154">Wt::WObject</a>.</p>
</div>
</div><p>
<a class="anchor" name="00f6285ab6326a6fef8b9ca7c7646948"></a><!-- doxytag: member="Wt::WButtonGroup::checkedId" ref="00f6285ab6326a6fef8b9ca7c7646948" 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>
Returns the id of the currently checked button, or -1 if no button is currently checked.
</div>
</div><p>
<a class="anchor" name="c67ce8ffc614cb7319efa4657c57f25a"></a><!-- doxytag: member="Wt::WButtonGroup::setCheckedButton" ref="c67ce8ffc614cb7319efa4657c57f25a" 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>
The button <code>button</code> of this group is checked. A value of <code>0</code> will uncheck all radiobuttons.<p>
Initially, no button is checked.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WButtonGroup.html#00f6285ab6326a6fef8b9ca7c7646948" title="Returns the id of the checked button.">checkedId()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="92ed2843d2fdf9dfacc9d3e27b5ac994"></a><!-- doxytag: member="Wt::WButtonGroup::checkedButton" ref="92ed2843d2fdf9dfacc9d3e27b5ac994" 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>
If there is no radiobutton currently checked this function returns <code>0</code>.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WButtonGroup.html#c67ce8ffc614cb7319efa4657c57f25a" title="Sets the currently checked radiobutton.">setCheckedButton()</a>, <a class="el" href="classWt_1_1WButtonGroup.html#44aa1dc058bbfbc698289d56ba0424ee" title="Returns the index of the checked radiobutton.">selectedButtonIndex()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="968222f7cba72561b1712c90efc30d46"></a><!-- doxytag: member="Wt::WButtonGroup::setSelectedButtonIndex" ref="968222f7cba72561b1712c90efc30d46" 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>
Sets the <code>idx'th</code> radiobutton checked. A value of -1 will uncheck all radiobuttons.<p>
Initially, no button is checked.
</div>
</div><p>
<a class="anchor" name="44aa1dc058bbfbc698289d56ba0424ee"></a><!-- doxytag: member="Wt::WButtonGroup::selectedButtonIndex" ref="44aa1dc058bbfbc698289d56ba0424ee" 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>
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#00f6285ab6326a6fef8b9ca7c7646948" 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" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WButtonGroup.html#00f6285ab6326a6fef8b9ca7c7646948" title="Returns the id of the checked button.">checkedId()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="d5661cc6137de244819f47f492b42687"></a><!-- doxytag: member="Wt::WButtonGroup::checkedChanged" ref="d5661cc6137de244819f47f492b42687" 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>
The argument passed is the new <a class="el" href="classWt_1_1WButtonGroup.html#92ed2843d2fdf9dfacc9d3e27b5ac994" title="Returns the checked radiobutton.">checkedButton()</a>.
</div>
</div><p>
</div>
<hr size="1"><address style="align: right;"><small>
Generated on Fri Mar 26 17:12:06 2010 for <a href="http://www.webtoolkit.eu/wt/">Wt</a> by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6</small></address>
</body>
</html>
|