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
|
<!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::WStackedWidget 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_1WStackedWidget.html">WStackedWidget</a>
</div>
</div>
<div class="contents">
<h1>Wt::WStackedWidget Class Reference</h1><!-- doxytag: class="Wt::WStackedWidget" --><!-- doxytag: inherits="Wt::WContainerWidget" -->A container widget that stacks its widgets on top of each other.
<a href="#_details">More...</a>
<p>
<code>#include <Wt/WStackedWidget></code>
<p>
<div class="dynheader">
Inheritance diagram for Wt::WStackedWidget:</div>
<div class="dynsection">
<p><center><img src="classWt_1_1WStackedWidget__inherit__graph.png" border="0" usemap="#Wt_1_1WStackedWidget__inherit__map" alt="Inheritance graph"></center>
<map name="Wt_1_1WStackedWidget__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-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-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_1WStackedWidget-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="32b77a6dded133822098ac759d108bbe"></a><!-- doxytag: member="Wt::WStackedWidget::WStackedWidget" ref="32b77a6dded133822098ac759d108bbe" args="(WContainerWidget *parent=0)" -->
</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WStackedWidget.html#32b77a6dded133822098ac759d108bbe">WStackedWidget</a> (<a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *parent=0)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Created a new stacked container widget. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WStackedWidget.html#ffaa67bed3b16d9cca3c83a1d9386918">addWidget</a> (<a class="el" href="classWt_1_1WWidget.html">WWidget</a> *widget)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Adds a child widget to this container. <a href="#ffaa67bed3b16d9cca3c83a1d9386918"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a20b9fec2222f2ee97eca2b0c07fb3f3"></a><!-- doxytag: member="Wt::WStackedWidget::count" ref="a20b9fec2222f2ee97eca2b0c07fb3f3" args="() const " -->
int </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WStackedWidget.html#a20b9fec2222f2ee97eca2b0c07fb3f3">count</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of widgets in the stack. <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_1WStackedWidget.html#47fd91b7a51f57f341fde82b611cc1a1">currentIndex</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the index of the widget that is currently shown. <a href="#47fd91b7a51f57f341fde82b611cc1a1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classWt_1_1WWidget.html">WWidget</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WStackedWidget.html#82b399a7a80f64617b1e8995999476d2">currentWidget</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the widget that is currently shown. <a href="#82b399a7a80f64617b1e8995999476d2"></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_1WStackedWidget.html#6847fbec442359b1c1637ec5fe31d6f1">indexOf</a> (<a class="el" href="classWt_1_1WWidget.html">WWidget</a> *widget) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the index of the given widget. <a href="#6847fbec442359b1c1637ec5fe31d6f1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7a199e9cf57bee54333880534070767c"></a><!-- doxytag: member="Wt::WStackedWidget::insertWidget" ref="7a199e9cf57bee54333880534070767c" args="(int index, WWidget *widget)" -->
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WStackedWidget.html#7a199e9cf57bee54333880534070767c">insertWidget</a> (int index, <a class="el" href="classWt_1_1WWidget.html">WWidget</a> *widget)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Insert a widget at a given index. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WStackedWidget.html#c6df7a2910d43efead64405866043156">removeWidget</a> (<a class="el" href="classWt_1_1WWidget.html">WWidget</a> *widget)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Removes a child widget from this container. <a href="#c6df7a2910d43efead64405866043156"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classWt_1_1WWidget.html">WWidget</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WStackedWidget.html#e027e1c38b6f987b3b072d3e3931ccd7">widget</a> (int index) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the widget at the specified index. <a href="#e027e1c38b6f987b3b072d3e3931ccd7"></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_1WStackedWidget.html#4a2f79cf685ade6ad529e0673e22e6b0">setCurrentIndex</a> (int index)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Shows a particular widget. <a href="#4a2f79cf685ade6ad529e0673e22e6b0"></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_1WStackedWidget.html#460ba17f219b8cc75748735417b04828">setCurrentWidget</a> (<a class="el" href="classWt_1_1WWidget.html">WWidget</a> *widget)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Shows a particular widget. <a href="#460ba17f219b8cc75748735417b04828"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A container widget that stacks its widgets on top of each other.
<p>
This is a container widgets which at all times has only one item visible. The widget accomplishes this using <a class="el" href="classWt_1_1WWebWidget.html#bf00d84015803f7553c9e6650dc10bd4" title="Sets whether the widget is hidden.">setHidden(bool)</a> on the children.<p>
Using <a class="el" href="classWt_1_1WStackedWidget.html#47fd91b7a51f57f341fde82b611cc1a1" title="Returns the index of the widget that is currently shown.">currentIndex()</a> and <a class="el" href="classWt_1_1WStackedWidget.html#4a2f79cf685ade6ad529e0673e22e6b0" title="Shows a particular widget.">setCurrentIndex(int index)</a> you can retrieve or set the visible widget.<p>
WStackedWidget, like <a class="el" href="classWt_1_1WContainerWidget.html" title="A widget that holds and manages child widgets.">WContainerWidget</a>, is by default not inline.<p>
<h3>CSS</h3>
<p>
The widget is rendered using an HTML <code><div></code> tag and does not provide styling. It 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_1WMenu.html" title="A widget that shows a menu of options.">WMenu</a> </dd></dl>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="ffaa67bed3b16d9cca3c83a1d9386918"></a><!-- doxytag: member="Wt::WStackedWidget::addWidget" ref="ffaa67bed3b16d9cca3c83a1d9386918" args="(WWidget *widget)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WStackedWidget::addWidget </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WWidget.html">WWidget</a> * </td>
<td class="paramname"> <em>widget</em> </td>
<td> ) </td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Adds a child widget to this container.
<p>
This is equivalent to passing this container as the parent when constructing the child. The widget is appended to the list of children, and thus also layed-out at the end.
<p>Reimplemented from <a class="el" href="classWt_1_1WContainerWidget.html#2cfe66d9b62940f889e99538a9f478d2">Wt::WContainerWidget</a>.</p>
</div>
</div><p>
<a class="anchor" name="47fd91b7a51f57f341fde82b611cc1a1"></a><!-- doxytag: member="Wt::WStackedWidget::currentIndex" ref="47fd91b7a51f57f341fde82b611cc1a1" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int Wt::WStackedWidget::currentIndex </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns the index of the widget that is currently shown.
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WStackedWidget.html#4a2f79cf685ade6ad529e0673e22e6b0" title="Shows a particular widget.">setCurrentIndex()</a>, <a class="el" href="classWt_1_1WStackedWidget.html#82b399a7a80f64617b1e8995999476d2" title="Returns the widget that is currently shown.">currentWidget()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="82b399a7a80f64617b1e8995999476d2"></a><!-- doxytag: member="Wt::WStackedWidget::currentWidget" ref="82b399a7a80f64617b1e8995999476d2" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classWt_1_1WWidget.html">WWidget</a> * Wt::WStackedWidget::currentWidget </td>
<td>(</td>
<td class="paramname"> </td>
<td> ) </td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns the widget that is currently shown.
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WStackedWidget.html#460ba17f219b8cc75748735417b04828" title="Shows a particular widget.">setCurrentWidget()</a>, <a class="el" href="classWt_1_1WStackedWidget.html#47fd91b7a51f57f341fde82b611cc1a1" title="Returns the index of the widget that is currently shown.">currentIndex()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="6847fbec442359b1c1637ec5fe31d6f1"></a><!-- doxytag: member="Wt::WStackedWidget::indexOf" ref="6847fbec442359b1c1637ec5fe31d6f1" args="(WWidget *widget) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int Wt::WStackedWidget::indexOf </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WWidget.html">WWidget</a> * </td>
<td class="paramname"> <em>widget</em> </td>
<td> ) </td>
<td> const<code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns the index of the given widget.
<p>
Returns -1 if the <code>widget</code> was not added.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WStackedWidget.html#e027e1c38b6f987b3b072d3e3931ccd7" title="Returns the widget at the specified index.">widget()</a> </dd></dl>
<p>Reimplemented from <a class="el" href="classWt_1_1WContainerWidget.html#7cf9f4f1c261080bce30b6a6ea19014e">Wt::WContainerWidget</a>.</p>
</div>
</div><p>
<a class="anchor" name="c6df7a2910d43efead64405866043156"></a><!-- doxytag: member="Wt::WStackedWidget::removeWidget" ref="c6df7a2910d43efead64405866043156" args="(WWidget *widget)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WStackedWidget::removeWidget </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WWidget.html">WWidget</a> * </td>
<td class="paramname"> <em>widget</em> </td>
<td> ) </td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Removes a child widget from this container.
<p>
This removes the widget from this container, but does not delete the widget !
<p>Reimplemented from <a class="el" href="classWt_1_1WContainerWidget.html#4292867b1872bd31c7d0c3346d988470">Wt::WContainerWidget</a>.</p>
</div>
</div><p>
<a class="anchor" name="e027e1c38b6f987b3b072d3e3931ccd7"></a><!-- doxytag: member="Wt::WStackedWidget::widget" ref="e027e1c38b6f987b3b072d3e3931ccd7" args="(int index) const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classWt_1_1WWidget.html">WWidget</a> * Wt::WStackedWidget::widget </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"> <em>index</em> </td>
<td> ) </td>
<td> const<code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns the widget at the specified index.
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WStackedWidget.html#6847fbec442359b1c1637ec5fe31d6f1" title="Returns the index of the given widget.">indexOf()</a> </dd></dl>
<p>Reimplemented from <a class="el" href="classWt_1_1WContainerWidget.html#53c79a7311ffe3c132b50bdbb830856d">Wt::WContainerWidget</a>.</p>
</div>
</div><p>
<a class="anchor" name="4a2f79cf685ade6ad529e0673e22e6b0"></a><!-- doxytag: member="Wt::WStackedWidget::setCurrentIndex" ref="4a2f79cf685ade6ad529e0673e22e6b0" args="(int index)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WStackedWidget::setCurrentIndex </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"> <em>index</em> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Shows a particular widget.
<p>
The widget with index <code>index</code> is made visible, while all other widgets are invisible.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WStackedWidget.html#47fd91b7a51f57f341fde82b611cc1a1" title="Returns the index of the widget that is currently shown.">currentIndex()</a>, <a class="el" href="classWt_1_1WStackedWidget.html#460ba17f219b8cc75748735417b04828" title="Shows a particular widget.">setCurrentWidget()</a> </dd></dl>
</div>
</div><p>
<a class="anchor" name="460ba17f219b8cc75748735417b04828"></a><!-- doxytag: member="Wt::WStackedWidget::setCurrentWidget" ref="460ba17f219b8cc75748735417b04828" args="(WWidget *widget)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Wt::WStackedWidget::setCurrentWidget </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classWt_1_1WWidget.html">WWidget</a> * </td>
<td class="paramname"> <em>widget</em> </td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Shows a particular widget.
<p>
The widget <code>widget</code>, which must have been added before, is made visible, while all other widgets are invisible.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WStackedWidget.html#82b399a7a80f64617b1e8995999476d2" title="Returns the widget that is currently shown.">currentWidget()</a>, <a class="el" href="classWt_1_1WStackedWidget.html#4a2f79cf685ade6ad529e0673e22e6b0" title="Shows a particular widget.">setCurrentIndex()</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 <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>
|