Sophie

Sophie

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

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::WIconPair 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_1WIconPair.html">WIconPair</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::WIconPair Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Wt::WIconPair" --><!-- doxytag: inherits="Wt::WCompositeWidget" -->
<p>A widget that shows one of two icons depending on its state.  
 <a href="classWt_1_1WIconPair.html#details">More...</a></p>

<p><code>#include &lt;Wt/WIconPair&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Wt::WIconPair:</div>
<div class="dyncontent">
<div class="center"><img src="classWt_1_1WIconPair__inherit__graph.png" border="0" usemap="#Wt_1_1WIconPair_inherit__map" alt="Inheritance graph"/></div>
<map name="Wt_1_1WIconPair_inherit__map" id="Wt_1_1WIconPair_inherit__map">
<area shape="rect" href="classWt_1_1WCompositeWidget.html" title="A widget that hides the implementation of composite widgets." alt="" coords="5,155,168,181"/><area shape="rect" href="classWt_1_1WWidget.html" title="The abstract base class for a user&#45;interface component." alt="" coords="37,80,136,107"/><area shape="rect" href="classWt_1_1WObject.html" title="A base class for objects that participate in the signal/slot system." alt="" coords="39,5,135,32"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classWt_1_1WIconPair-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">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WIconPair.html#abcba8fda209d3dae4869fa8d82d5ba36">WIconPair</a> (const std::string &amp;icon1URL, const std::string &amp;icon2URL, bool clickIsSwitch=true, <a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *parent=0)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct an icon pair from the two icons.  <a href="#abcba8fda209d3dae4869fa8d82d5ba36"></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_1WIconPair.html#a84029cf28869da70946b078841518e54">setState</a> (int num)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the state, which determines the visible icon.  <a href="#a84029cf28869da70946b078841518e54"></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_1WIconPair.html#a538584ae901a6d69b7808e326cda09c9">state</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the current state.  <a href="#a538584ae901a6d69b7808e326cda09c9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad6eed0ffbd0915da07e0365eb07ec515"></a><!-- doxytag: member="Wt::WIconPair::icon1" ref="ad6eed0ffbd0915da07e0365eb07ec515" args="() const " -->
<a class="el" href="classWt_1_1WImage.html">WImage</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WIconPair.html#ad6eed0ffbd0915da07e0365eb07ec515">icon1</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the first icon image. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4b9167325de2f95cce47714d2531dfc1"></a><!-- doxytag: member="Wt::WIconPair::icon2" ref="a4b9167325de2f95cce47714d2531dfc1" args="() const " -->
<a class="el" href="classWt_1_1WImage.html">WImage</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WIconPair.html#a4b9167325de2f95cce47714d2531dfc1">icon2</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the second icon image. <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_1WIconPair.html#a97187962ca2272b1665aa2ca267c6d7f">showIcon1</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the state to 0 (show icon 1).  <a href="#a97187962ca2272b1665aa2ca267c6d7f"></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_1WIconPair.html#a774952e5c30f47d0b1d213e01448325d">showIcon2</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the state to 1 (show icon 2).  <a href="#a774952e5c30f47d0b1d213e01448325d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1EventSignal.html">EventSignal</a>&lt; <a class="el" href="classWt_1_1WMouseEvent.html">WMouseEvent</a> &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WIconPair.html#ab5bbb66929dfbdf8918c7ddbf70639eb">icon1Clicked</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Signal emitted when clicked while in state 0 (icon 1 is shown).  <a href="#ab5bbb66929dfbdf8918c7ddbf70639eb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1EventSignal.html">EventSignal</a>&lt; <a class="el" href="classWt_1_1WMouseEvent.html">WMouseEvent</a> &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WIconPair.html#a9dabd7d16e62298ebab6a95054e50321">icon2Clicked</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Signal emitted when clicked while in state 1 (icon 2 is shown).  <a href="#a9dabd7d16e62298ebab6a95054e50321"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>A widget that shows one of two icons depending on its state. </p>
<p>This is a utility class that simply manages two images, only one of which is shown at a single time, which reflects the current 'state'.</p>
<p>The widget may react to click events, by changing state.</p>
<h3>CSS</h3>
<p>This widget does not provide styling, and can be styled using inline or external CSS as appropriate. The image may be styled via the <code>&lt;img&gt;</code> elements. </p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="abcba8fda209d3dae4869fa8d82d5ba36"></a><!-- doxytag: member="Wt::WIconPair::WIconPair" ref="abcba8fda209d3dae4869fa8d82d5ba36" args="(const std::string &amp;icon1URL, const std::string &amp;icon2URL, bool clickIsSwitch=true, WContainerWidget *parent=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Wt::WIconPair::WIconPair </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>icon1URL</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>icon2URL</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>clickIsSwitch</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classWt_1_1WContainerWidget.html">WContainerWidget</a> *&#160;</td>
          <td class="paramname"><em>parent</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Construct an icon pair from the two icons. </p>
<p>The constructor takes the URL of the two icons. When <code>clickIsSwitch</code> is set <code>true</code>, clicking on the icon will switch state. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ab5bbb66929dfbdf8918c7ddbf70639eb"></a><!-- doxytag: member="Wt::WIconPair::icon1Clicked" ref="ab5bbb66929dfbdf8918c7ddbf70639eb" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1EventSignal.html">EventSignal</a>&lt; <a class="el" href="classWt_1_1WMouseEvent.html">WMouseEvent</a> &gt; &amp; Wt::WIconPair::icon1Clicked </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Signal emitted when clicked while in state 0 (icon 1 is shown). </p>
<p>Equivalent to: </p>
<div class="fragment"><pre class="fragment"> <a class="code" href="classWt_1_1WIconPair.html#ad6eed0ffbd0915da07e0365eb07ec515" title="Returns the first icon image.">icon1</a>()-&gt;clicked()
</pre></div> 
</div>
</div>
<a class="anchor" id="a9dabd7d16e62298ebab6a95054e50321"></a><!-- doxytag: member="Wt::WIconPair::icon2Clicked" ref="a9dabd7d16e62298ebab6a95054e50321" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1EventSignal.html">EventSignal</a>&lt; <a class="el" href="classWt_1_1WMouseEvent.html">WMouseEvent</a> &gt; &amp; Wt::WIconPair::icon2Clicked </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Signal emitted when clicked while in state 1 (icon 2 is shown). </p>
<p>Equivalent to: </p>
<div class="fragment"><pre class="fragment"> <a class="code" href="classWt_1_1WIconPair.html#a4b9167325de2f95cce47714d2531dfc1" title="Returns the second icon image.">icon2</a>()-&gt;clicked()
</pre></div> 
</div>
</div>
<a class="anchor" id="a84029cf28869da70946b078841518e54"></a><!-- doxytag: member="Wt::WIconPair::setState" ref="a84029cf28869da70946b078841518e54" args="(int num)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WIconPair::setState </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>num</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the state, which determines the visible icon. </p>
<p>The first icon has number 0, and the second icon has number 1.</p>
<p>The default state is 0.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WIconPair.html#a538584ae901a6d69b7808e326cda09c9" title="Returns the current state.">state()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a97187962ca2272b1665aa2ca267c6d7f"></a><!-- doxytag: member="Wt::WIconPair::showIcon1" ref="a97187962ca2272b1665aa2ca267c6d7f" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WIconPair::showIcon1 </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the state to 0 (show icon 1). </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WIconPair.html#a84029cf28869da70946b078841518e54" title="Sets the state, which determines the visible icon.">setState(int)</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a774952e5c30f47d0b1d213e01448325d"></a><!-- doxytag: member="Wt::WIconPair::showIcon2" ref="a774952e5c30f47d0b1d213e01448325d" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WIconPair::showIcon2 </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the state to 1 (show icon 2). </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WIconPair.html#a84029cf28869da70946b078841518e54" title="Sets the state, which determines the visible icon.">setState(int)</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a538584ae901a6d69b7808e326cda09c9"></a><!-- doxytag: member="Wt::WIconPair::state" ref="a538584ae901a6d69b7808e326cda09c9" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Wt::WIconPair::state </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the current state. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WIconPair.html#a84029cf28869da70946b078841518e54" title="Sets the state, which determines the visible icon.">setState()</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>