File: classWt_1_1WGroupBox.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 (157 lines) | stat: -rw-r--r-- 12,961 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
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
<!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::WGroupBox 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_1WGroupBox.html">WGroupBox</a>
  </div>
</div>
<div class="contents">
<h1>Wt::WGroupBox Class Reference</h1><!-- doxytag: class="Wt::WGroupBox" --><!-- doxytag: inherits="Wt::WContainerWidget" -->A widget which group widgets into a frame with a title.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;Wt/WGroupBox&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for Wt::WGroupBox:</div>
<div class="dynsection">
<p><center><img src="classWt_1_1WGroupBox__inherit__graph.png" border="0" usemap="#Wt_1_1WGroupBox__inherit__map" alt="Inheritance graph"></center>
<map name="Wt_1_1WGroupBox__inherit__map">
<area shape="rect" href="classWt_1_1WContainerWidget.html" title="A widget that holds and manages child widgets." alt="" coords="5,304,157,331"><area shape="rect" href="classWt_1_1WInteractWidget.html" title="An abstract widget that can receive user&#45;interface interaction." alt="" coords="11,229,152,256"><area shape="rect" href="classWt_1_1WWebWidget.html" title="A base class for widgets with an HTML counterpart." alt="" coords="20,155,143,181"><area shape="rect" href="classWt_1_1WWidget.html" title="The abstract base class for a user&#45;interface component." alt="" coords="33,80,129,107"><area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="33,5,129,32"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>

<p>
<a href="classWt_1_1WGroupBox-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="9b12382d30cb1aecbe6be0374a0a8dc8"></a><!-- doxytag: member="Wt::WGroupBox::WGroupBox" ref="9b12382d30cb1aecbe6be0374a0a8dc8" args="(WContainerWidget *parent=0)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WGroupBox.html#9b12382d30cb1aecbe6be0374a0a8dc8">WGroupBox</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 a groupbox with empty title. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f6ba26c8f1d3b8fcd5bcfbc9dfcb993f"></a><!-- doxytag: member="Wt::WGroupBox::WGroupBox" ref="f6ba26c8f1d3b8fcd5bcfbc9dfcb993f" args="(const WString &amp;title, WContainerWidget *parent=0)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WGroupBox.html#f6ba26c8f1d3b8fcd5bcfbc9dfcb993f">WGroupBox</a> (const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;title, <a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *parent=0)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a groupbox with given title message. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fc668f60e7b6cbeb609c2cb355538d68"></a><!-- doxytag: member="Wt::WGroupBox::title" ref="fc668f60e7b6cbeb609c2cb355538d68" args="() const " -->
const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WGroupBox.html#fc668f60e7b6cbeb609c2cb355538d68">title</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the title. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="369081aa62b840875cac9ee5d24bd64e"></a><!-- doxytag: member="Wt::WGroupBox::setTitle" ref="369081aa62b840875cac9ee5d24bd64e" args="(const WString &amp;title)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WGroupBox.html#369081aa62b840875cac9ee5d24bd64e">setTitle</a> (const <a class="el" href="classWt_1_1WString.html">WString</a> &amp;title)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the title. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WGroupBox.html#44bbe83b4a9af80c5d50e5671c2d2df6">refresh</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Refresh the widget.  <a href="#44bbe83b4a9af80c5d50e5671c2d2df6"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WGroupBox.html#2ac619eeb41a1c4a9da2404922fc861b">propagateSetEnabled</a> (bool enabled)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Propagates that a widget was enabled or disabled through children.  <a href="#2ac619eeb41a1c4a9da2404922fc861b"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A widget which group widgets into a frame with a title. 
<p>
This is typically used in a form to group certain form elements together.<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>
Like <a class="el" href="classWt_1_1WContainerWidget.html" title="A widget that holds and manages child widgets.">WContainerWidget</a>, WGroupBox is by default displayed as a <a class="el" href="classWt_1_1WWidget.html#c78e3af143883334c82031790c87416e">block</a>.<p>
<div align="center">
<img src="WGroupBox-1.png" alt="WGroupBox-1.png">
<p><strong>WGroupBox example</strong></p></div>
 <h3>CSS</h3>
<p>
The widget corresponds to the HTML <code>&lt;fieldset&gt;</code> tag, and the title in a nested <code>&lt;legend&gt;</code> tag. This widget does not provide styling, and can be styled using inline or external CSS as appropriate. <hr><h2>Member Function Documentation</h2>
<a class="anchor" name="44bbe83b4a9af80c5d50e5671c2d2df6"></a><!-- doxytag: member="Wt::WGroupBox::refresh" ref="44bbe83b4a9af80c5d50e5671c2d2df6" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WGroupBox::refresh           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Refresh the widget. 
<p>
The refresh method is invoked when the locale is changed using <a class="el" href="classWt_1_1WApplication.html#5c9cc1350019d69f154a2b44cdaf2596" title="Changes the locale.">WApplication::setLocale()</a> or when the user hit the refresh button.<p>
The widget must actualize its contents in response. 
<p>Reimplemented from <a class="el" href="classWt_1_1WWebWidget.html#8d0b7883f2f77a0c24b8fb911a8086a8">Wt::WWebWidget</a>.</p>

</div>
</div><p>
<a class="anchor" name="2ac619eeb41a1c4a9da2404922fc861b"></a><!-- doxytag: member="Wt::WGroupBox::propagateSetEnabled" ref="2ac619eeb41a1c4a9da2404922fc861b" args="(bool enabled)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WGroupBox::propagateSetEnabled           </td>
          <td>(</td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>enabled</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Propagates that a widget was enabled or disabled through children. 
<p>
When enabling or disabling a widget, you usually also want to disable contained children. This method is called by <a class="el" href="classWt_1_1WWebWidget.html#0d73f278ece864ab5322e92ff5f6de6c" title="Sets whether the widget is disabled.">setDisabled()</a> to propagate its state to all children.<p>
You may want to reimplement this method if they wish to render differently when a widget is disabled. The default implementation will propagate the signal to all children. 
<p>Reimplemented from <a class="el" href="classWt_1_1WWebWidget.html#a9655ae1c50b9c979b6fe93f9d0064d3">Wt::WWebWidget</a>.</p>

</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>