Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > b3a1f4d91c26f535919e39e25606614a > files > 2094

wt-doc-3.2.3-1.fc18.noarch.rpm

<!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::WStackedWidget 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
   &#160;<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&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;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&#160;List</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;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_1WStackedWidget.html">WStackedWidget</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">Wt::WStackedWidget Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Wt::WStackedWidget" --><!-- doxytag: inherits="Wt::WContainerWidget" -->
<p>A container widget that stacks its widgets on top of each other.  
 <a href="classWt_1_1WStackedWidget.html#details">More...</a></p>

<p><code>#include &lt;Wt/WStackedWidget&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Wt::WStackedWidget:</div>
<div class="dyncontent">
<div class="center"><img src="classWt_1_1WStackedWidget__inherit__graph.png" border="0" usemap="#Wt_1_1WStackedWidget_inherit__map" alt="Inheritance graph"/></div>
<map name="Wt_1_1WStackedWidget_inherit__map" id="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,160,331"/><area shape="rect" href="classWt_1_1WInteractWidget.html" title="An abstract widget that can receive user&#45;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&#45;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_1WStackedWidget-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="a32b77a6dded133822098ac759d108bbe"></a><!-- doxytag: member="Wt::WStackedWidget::WStackedWidget" ref="a32b77a6dded133822098ac759d108bbe" args="(WContainerWidget *parent=0)" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WStackedWidget.html#a32b77a6dded133822098ac759d108bbe">WStackedWidget</a> (<a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *parent=0)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new stack. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WStackedWidget.html#affaa67bed3b16d9cca3c83a1d9386918">addWidget</a> (<a class="el" href="classWt_1_1WWidget.html">WWidget</a> *widget)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds a child widget to this container.  <a href="#affaa67bed3b16d9cca3c83a1d9386918"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WStackedWidget.html#a47fd91b7a51f57f341fde82b611cc1a1">currentIndex</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the index of the widget that is currently shown.  <a href="#a47fd91b7a51f57f341fde82b611cc1a1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1WWidget.html">WWidget</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WStackedWidget.html#a82b399a7a80f64617b1e8995999476d2">currentWidget</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the widget that is currently shown.  <a href="#a82b399a7a80f64617b1e8995999476d2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7a199e9cf57bee54333880534070767c"></a><!-- doxytag: member="Wt::WStackedWidget::insertWidget" ref="a7a199e9cf57bee54333880534070767c" args="(int index, WWidget *widget)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WStackedWidget.html#a7a199e9cf57bee54333880534070767c">insertWidget</a> (int index, <a class="el" href="classWt_1_1WWidget.html">WWidget</a> *widget)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Insert a widget at a given index. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WStackedWidget.html#a4a2f79cf685ade6ad529e0673e22e6b0">setCurrentIndex</a> (int index)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Changes the current widget.  <a href="#a4a2f79cf685ade6ad529e0673e22e6b0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WStackedWidget.html#ae0a85f389b655961c1b45a7ffea9ceed">setCurrentIndex</a> (int index, const <a class="el" href="classWt_1_1WAnimation.html">WAnimation</a> &amp;animation, bool autoReverse=true)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Changes the current widget using a custom animation.  <a href="#ae0a85f389b655961c1b45a7ffea9ceed"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WStackedWidget.html#a460ba17f219b8cc75748735417b04828">setCurrentWidget</a> (<a class="el" href="classWt_1_1WWidget.html">WWidget</a> *widget)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Changes the current widget.  <a href="#a460ba17f219b8cc75748735417b04828"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WStackedWidget.html#a46949b8def26baae654f54e3774da80e">setTransitionAnimation</a> (const <a class="el" href="classWt_1_1WAnimation.html">WAnimation</a> &amp;animation, bool autoReverse=false)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Specifies an animation used during transitions.  <a href="#a46949b8def26baae654f54e3774da80e"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>A container widget that stacks its widgets on top of each other. </p>
<p>This is a container widget which at all times has only one item visible. The widget accomplishes this using setHidden(bool) on the children.</p>
<p>Using <a class="el" href="classWt_1_1WStackedWidget.html#a47fd91b7a51f57f341fde82b611cc1a1" title="Returns the index of the widget that is currently shown.">currentIndex()</a> and <a class="el" href="classWt_1_1WStackedWidget.html#a4a2f79cf685ade6ad529e0673e22e6b0" title="Changes the current widget.">setCurrentIndex(int index)</a> you can retrieve or set the visible widget.</p>
<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>&lt;div&gt;</code> tag and does not provide styling. It can be styled using inline or external CSS as appropriate.</p>
<dl class="see"><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>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="affaa67bed3b16d9cca3c83a1d9386918"></a><!-- doxytag: member="Wt::WStackedWidget::addWidget" ref="affaa67bed3b16d9cca3c83a1d9386918" 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> *&#160;</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>
<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>

<p>Reimplemented from <a class="el" href="classWt_1_1WContainerWidget.html#a2cfe66d9b62940f889e99538a9f478d2">Wt::WContainerWidget</a>.</p>

</div>
</div>
<a class="anchor" id="a47fd91b7a51f57f341fde82b611cc1a1"></a><!-- doxytag: member="Wt::WStackedWidget::currentIndex" ref="a47fd91b7a51f57f341fde82b611cc1a1" 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"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WStackedWidget.html#a4a2f79cf685ade6ad529e0673e22e6b0" title="Changes the current widget.">setCurrentIndex()</a>, <a class="el" href="classWt_1_1WStackedWidget.html#a82b399a7a80f64617b1e8995999476d2" title="Returns the widget that is currently shown.">currentWidget()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a82b399a7a80f64617b1e8995999476d2"></a><!-- doxytag: member="Wt::WStackedWidget::currentWidget" ref="a82b399a7a80f64617b1e8995999476d2" 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"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WStackedWidget.html#a460ba17f219b8cc75748735417b04828" title="Changes the current widget.">setCurrentWidget()</a>, <a class="el" href="classWt_1_1WStackedWidget.html#a47fd91b7a51f57f341fde82b611cc1a1" title="Returns the index of the widget that is currently shown.">currentIndex()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a4a2f79cf685ade6ad529e0673e22e6b0"></a><!-- doxytag: member="Wt::WStackedWidget::setCurrentIndex" ref="a4a2f79cf685ade6ad529e0673e22e6b0" 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&#160;</td>
          <td class="paramname"><em>index</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Changes the current widget. </p>
<p>The widget with index <code>index</code> is made visible, while all other widgets are hidden.</p>
<p>The change of current widget is done using the animation settings specified by <a class="el" href="classWt_1_1WStackedWidget.html#a46949b8def26baae654f54e3774da80e" title="Specifies an animation used during transitions.">setTransitionAnimation()</a>.</p>
<p>The default value for current index is 0 (provided thath</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WStackedWidget.html#a47fd91b7a51f57f341fde82b611cc1a1" title="Returns the index of the widget that is currently shown.">currentIndex()</a>, <a class="el" href="classWt_1_1WStackedWidget.html#a460ba17f219b8cc75748735417b04828" title="Changes the current widget.">setCurrentWidget()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ae0a85f389b655961c1b45a7ffea9ceed"></a><!-- doxytag: member="Wt::WStackedWidget::setCurrentIndex" ref="ae0a85f389b655961c1b45a7ffea9ceed" args="(int index, const WAnimation &amp;animation, bool autoReverse=true)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WStackedWidget::setCurrentIndex </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WAnimation.html">WAnimation</a> &amp;&#160;</td>
          <td class="paramname"><em>animation</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>autoReverse</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Changes the current widget using a custom animation. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WStackedWidget.html#a47fd91b7a51f57f341fde82b611cc1a1" title="Returns the index of the widget that is currently shown.">currentIndex()</a>, <a class="el" href="classWt_1_1WStackedWidget.html#a460ba17f219b8cc75748735417b04828" title="Changes the current widget.">setCurrentWidget()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a460ba17f219b8cc75748735417b04828"></a><!-- doxytag: member="Wt::WStackedWidget::setCurrentWidget" ref="a460ba17f219b8cc75748735417b04828" 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> *&#160;</td>
          <td class="paramname"><em>widget</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Changes the current widget. </p>
<p>The widget <code>widget</code>, which must have been added before, is made visible, while all other widgets are hidden.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WStackedWidget.html#a82b399a7a80f64617b1e8995999476d2" title="Returns the widget that is currently shown.">currentWidget()</a>, <a class="el" href="classWt_1_1WStackedWidget.html#a4a2f79cf685ade6ad529e0673e22e6b0" title="Changes the current widget.">setCurrentIndex()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a46949b8def26baae654f54e3774da80e"></a><!-- doxytag: member="Wt::WStackedWidget::setTransitionAnimation" ref="a46949b8def26baae654f54e3774da80e" args="(const WAnimation &amp;animation, bool autoReverse=false)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WStackedWidget::setTransitionAnimation </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classWt_1_1WAnimation.html">WAnimation</a> &amp;&#160;</td>
          <td class="paramname"><em>animation</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>autoReverse</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Specifies an animation used during transitions. </p>
<p>The animation is used to hide the previously current widget and show the next current widget using <a class="el" href="classWt_1_1WStackedWidget.html#a4a2f79cf685ade6ad529e0673e22e6b0" title="Changes the current widget.">setCurrentIndex()</a>.</p>
<p>The initial value for <code>animation</code> is WAnimation(), specifying no animation.</p>
<p>When <code>autoReverse</code> is set to <code>true</code>, then the reverse animation is chosen when the new index precedes the current index. This only applies to WAnimation::SlideLeft, WAnimation::SlideRight, WAnimation::SlideUp or WAnimation::SlideDown transition effects.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WStackedWidget.html#a4a2f79cf685ade6ad529e0673e22e6b0" title="Changes the current widget.">setCurrentIndex()</a> </dd></dl>

</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">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</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&nbsp;<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>