<!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::WGroupBox 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_1WGroupBox.html">WGroupBox</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> | <a href="#pro-methods">Protected Member Functions</a> </div> <div class="headertitle"> <div class="title">Wt::WGroupBox Class Reference</div> </div> </div> <div class="contents"> <!-- doxytag: class="Wt::WGroupBox" --><!-- doxytag: inherits="Wt::WContainerWidget" --> <p>A widget which group widgets into a frame with a title. <a href="classWt_1_1WGroupBox.html#details">More...</a></p> <p><code>#include <Wt/WGroupBox></code></p> <div class="dynheader"> Inheritance diagram for Wt::WGroupBox:</div> <div class="dyncontent"> <div class="center"><img src="classWt_1_1WGroupBox__inherit__graph.png" border="0" usemap="#Wt_1_1WGroupBox_inherit__map" alt="Inheritance graph"/></div> <map name="Wt_1_1WGroupBox_inherit__map" id="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,160,331"/><area shape="rect" href="classWt_1_1WInteractWidget.html" title="An abstract widget that can receive user-interface interaction." alt="" coords="11,229,155,256"/><area shape="rect" href="classWt_1_1WWebWidget.html" title="A base class for widgets with an HTML counterpart." alt="" coords="19,155,147,181"/><area shape="rect" href="classWt_1_1WWidget.html" title="The abstract base class for a user-interface component." alt="" coords="33,80,132,107"/><area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="35,5,131,32"/></map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="classWt_1_1WGroupBox-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="a9b12382d30cb1aecbe6be0374a0a8dc8"></a><!-- doxytag: member="Wt::WGroupBox::WGroupBox" ref="a9b12382d30cb1aecbe6be0374a0a8dc8" args="(WContainerWidget *parent=0)" -->  </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WGroupBox.html#a9b12382d30cb1aecbe6be0374a0a8dc8">WGroupBox</a> (<a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *parent=0)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a groupbox with empty title. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af6ba26c8f1d3b8fcd5bcfbc9dfcb993f"></a><!-- doxytag: member="Wt::WGroupBox::WGroupBox" ref="af6ba26c8f1d3b8fcd5bcfbc9dfcb993f" args="(const WString &title, WContainerWidget *parent=0)" -->  </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WGroupBox.html#af6ba26c8f1d3b8fcd5bcfbc9dfcb993f">WGroupBox</a> (const <a class="el" href="classWt_1_1WString.html">WString</a> &title, <a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *parent=0)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a groupbox with given title message. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afc668f60e7b6cbeb609c2cb355538d68"></a><!-- doxytag: member="Wt::WGroupBox::title" ref="afc668f60e7b6cbeb609c2cb355538d68" args="() const " --> const <a class="el" href="classWt_1_1WString.html">WString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WGroupBox.html#afc668f60e7b6cbeb609c2cb355538d68">title</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the title. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a369081aa62b840875cac9ee5d24bd64e"></a><!-- doxytag: member="Wt::WGroupBox::setTitle" ref="a369081aa62b840875cac9ee5d24bd64e" args="(const WString &title)" --> void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WGroupBox.html#a369081aa62b840875cac9ee5d24bd64e">setTitle</a> (const <a class="el" href="classWt_1_1WString.html">WString</a> &title)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the title. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WGroupBox.html#a44bbe83b4a9af80c5d50e5671c2d2df6">refresh</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Refresh the widget. <a href="#a44bbe83b4a9af80c5d50e5671c2d2df6"></a><br/></td></tr> <tr><td colspan="2"><h2><a name="pro-methods"></a> Protected Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WGroupBox.html#a2ac619eeb41a1c4a9da2404922fc861b">propagateSetEnabled</a> (bool enabled)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Propagates that a widget was enabled or disabled through children. <a href="#a2ac619eeb41a1c4a9da2404922fc861b"></a><br/></td></tr> </table> <hr/><a name="details" id="details"></a><h2>Detailed Description</h2> <div class="textblock"><p>A widget which group widgets into a frame with a title. </p> <p>This is typically used in a form to group certain form elements together.</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#a9b12382d30cb1aecbe6be0374a0a8dc8" title="Creates a groupbox with empty 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-><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><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#ac78e3af143883334c82031790c87416e">block</a>.</p> <div class="image"> <img src="WGroupBox-1.png" alt="WGroupBox-1.png"/> <div class="caption"> WGroupBox example</div></div> <h3>CSS</h3> <p>The widget corresponds to the HTML <code><fieldset></code> tag, and the title in a nested <code><legend></code> tag. This widget does not provide styling, and can be styled using inline or external CSS as appropriate. </p> </div><hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a2ac619eeb41a1c4a9da2404922fc861b"></a><!-- doxytag: member="Wt::WGroupBox::propagateSetEnabled" ref="a2ac619eeb41a1c4a9da2404922fc861b" 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 </td> <td class="paramname"><em>enabled</em></td><td>)</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> <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#aa3be5434e20cd0bd428eeb6f89fc89bc" title="Sets whether the widget is disabled.">setDisabled()</a> to propagate its state to all children.</p> <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> <p>Reimplemented from <a class="el" href="classWt_1_1WInteractWidget.html#ac331a4996af95f7a60264f67d51a74d2">Wt::WInteractWidget</a>.</p> </div> </div> <a class="anchor" id="a44bbe83b4a9af80c5d50e5671c2d2df6"></a><!-- doxytag: member="Wt::WGroupBox::refresh" ref="a44bbe83b4a9af80c5d50e5671c2d2df6" 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>)</td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Refresh the widget. </p> <p>The refresh method is invoked when the locale is changed using <a class="el" href="classWt_1_1WApplication.html#a5c9cc1350019d69f154a2b44cdaf2596" title="Changes the locale.">WApplication::setLocale()</a> or when the user hit the refresh button.</p> <p>The widget must actualize its contents in response. </p> <p>Reimplemented from <a class="el" href="classWt_1_1WWebWidget.html#a48f8c17376bd04d1359481c5441f072a">Wt::WWebWidget</a>.</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>