File: classWt_1_1WRadioButton.html

package info (click to toggle)
witty 3.1.2-3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 45,512 kB
  • ctags: 35,832
  • sloc: cpp: 69,469; ansic: 66,945; xml: 4,383; sh: 594; perl: 108; makefile: 106
file content (122 lines) | stat: -rw-r--r-- 11,151 bytes parent folder | download
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
<!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::WRadioButton 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&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;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&nbsp;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespaceWt.html">Wt</a>::<a class="el" href="classWt_1_1WRadioButton.html">WRadioButton</a>
  </div>
</div>
<div class="contents">
<h1>Wt::WRadioButton Class Reference</h1><!-- doxytag: class="Wt::WRadioButton" --><!-- doxytag: inherits="Wt::WAbstractToggleButton" -->A user control that represents a radio button.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;Wt/WRadioButton&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for Wt::WRadioButton:</div>
<div class="dynsection">
<p><center><img src="classWt_1_1WRadioButton__inherit__graph.png" border="0" usemap="#Wt_1_1WRadioButton__inherit__map" alt="Inheritance graph"></center>
<map name="Wt_1_1WRadioButton__inherit__map">
<area shape="rect" href="classWt_1_1WAbstractToggleButton.html" title="An abstract base class for radio buttons and check boxes." alt="" coords="5,379,187,405"><area shape="rect" href="classWt_1_1WFormWidget.html" title="An abstract widget that corresponds to an HTML form element." alt="" coords="32,304,160,331"><area shape="rect" href="classWt_1_1WInteractWidget.html" title="An abstract widget that can receive user&#45;interface interaction." alt="" coords="25,229,167,256"><area shape="rect" href="classWt_1_1WWebWidget.html" title="A base class for widgets with an HTML counterpart." alt="" coords="35,155,157,181"><area shape="rect" href="classWt_1_1WWidget.html" title="The abstract base class for a user&#45;interface component." alt="" coords="48,80,144,107"><area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="48,5,144,32"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>

<p>
<a href="classWt_1_1WRadioButton-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="f2a014f58ee5e9105e409c7e7b0219ff"></a><!-- doxytag: member="Wt::WRadioButton::WRadioButton" ref="f2a014f58ee5e9105e409c7e7b0219ff" args="(WContainerWidget *parent=0)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WRadioButton.html#f2a014f58ee5e9105e409c7e7b0219ff">WRadioButton</a> (<a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *parent=0)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates an unchecked radio button with empty label and optional parent. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1b05a25ac8803ad9cb96b441f0c09eee"></a><!-- doxytag: member="Wt::WRadioButton::WRadioButton" ref="1b05a25ac8803ad9cb96b441f0c09eee" args="(const WString &amp;text, WContainerWidget *parent=0)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WRadioButton.html#1b05a25ac8803ad9cb96b441f0c09eee">WRadioButton</a> (const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;text, <a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *parent=0)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates an unchecked radio button with given text and optional parent. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="234ed5e2d0e698b80d4e7c8b65f027c2"></a><!-- doxytag: member="Wt::WRadioButton::~WRadioButton" ref="234ed5e2d0e698b80d4e7c8b65f027c2" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WRadioButton.html#234ed5e2d0e698b80d4e7c8b65f027c2">~WRadioButton</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classWt_1_1WButtonGroup.html">WButtonGroup</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WRadioButton.html#908574da36efe50c70fc6a9d77f045cd">group</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the button group.  <a href="#908574da36efe50c70fc6a9d77f045cd"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A user control that represents a radio button. 
<p>
Use a <a class="el" href="classWt_1_1WButtonGroup.html" title="A class for grouping radio buttons logically together.">WButtonGroup</a> to group together radio buttons that reflect options that are mutually exclusive.<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" 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> *button;
 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-&gt;<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-&gt;<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-&gt;<a class="code" href="classWt_1_1WButtonGroup.html#bbe8605c1e57e75316731af9124bacca" title="Adds a radio button to the group.">addButton</a>(button, NoVote);

 group-&gt;<a class="code" href="classWt_1_1WButtonGroup.html#c67ce8ffc614cb7319efa4657c57f25a" title="Sets the currently checked radiobutton.">setCheckedButton</a>(group-&gt;<a class="code" href="classWt_1_1WButtonGroup.html#d77d4e097182bea774d3d5d34c548145" title="Returns the button for the given id.">button</a>(NoVote));
</pre></div><p>
WRadioButton is an <a class="el" href="classWt_1_1WWidget.html#c78e3af143883334c82031790c87416e">inline </a> widget.<p>
<h3>CSS</h3>
<p>
This widget corresponds to the HTML <code>&lt;input type="radio"&gt;</code> tag. Depending on whether a text is included, it may be nested in a <code>&lt;span&gt;</code> tag which also includes a rendered <a class="el" href="classWt_1_1WLabel.html" title="A label for a form field.">WLabel</a>. This widget does not provide styling, and can be styled using inline or external CSS as appropriate.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WAbstractToggleButton.html" title="An abstract base class for radio buttons and check boxes.">WAbstractToggleButton</a>, <a class="el" href="classWt_1_1WButtonGroup.html" title="A class for grouping radio buttons logically together.">WButtonGroup</a> </dd></dl>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="908574da36efe50c70fc6a9d77f045cd"></a><!-- doxytag: member="Wt::WRadioButton::group" ref="908574da36efe50c70fc6a9d77f045cd" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1WButtonGroup.html">WButtonGroup</a>* Wt::WRadioButton::group           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the button group. 
<p>
Returns the button group to which this button belongs.<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.">WButtonGroup::addButton(WRadioButton *, int)</a> </dd></dl>

</div>
</div><p>
</div>
<hr size="1"><address style="align: right;"><small>
Generated on Fri Mar 26 17:12:07 2010 for <a href="http://www.webtoolkit.eu/wt/">Wt</a> by&nbsp;<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>