Sophie

Sophie

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

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 examples: IconPair Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</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 examples
   &#160;<span id="projectnumber">3.2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</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>
    </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>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a>  </div>
  <div class="headertitle">
<div class="title">IconPair Class Reference<div class="ingroups"><a class="el" href="group__treelist.html">Treelist example</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="IconPair" --><!-- doxytag: inherits="Wt::WCompositeWidget" -->
<p>An icon pair (identical to WIconPair)  
 <a href="classIconPair.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="IconPair_8h_source.html">IconPair.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for IconPair:</div>
<div class="dyncontent">
<div class="center"><img src="classIconPair__inherit__graph.png" border="0" usemap="#IconPair_inherit__map" alt="Inheritance graph"/></div>
<map name="IconPair_inherit__map" id="IconPair_inherit__map">
<area shape="rect" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WCompositeWidget.html" title="Wt::WCompositeWidget" alt="" coords="5,155,168,181"/><area shape="rect" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html" title="Wt::WWidget" alt="" coords="37,80,136,107"/><area shape="rect" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WObject.html" title="Wt::WObject" alt="" coords="39,5,135,32"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classIconPair-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="classIconPair.html#ae046514e1811766cbb4568ff5067de57">IconPair</a> (const std::string icon1URI, const std::string icon2URI, bool clickIsSwitch=true, <a class="elRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html">Wt::WContainerWidget</a> *<a class="elRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html#a3461e31818c4d2f516641bdaf508312a">parent</a>=0)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a two-state icon widget.  <a href="#ae046514e1811766cbb4568ff5067de57"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIconPair.html#a349d74977ef2174b64bab37e2b9a27ea">setState</a> (int num)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set which icon should be visible.  <a href="#a349d74977ef2174b64bab37e2b9a27ea"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIconPair.html#a8ad646ae8a69c65428c6244bb3af24e6">state</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current state.  <a href="#a8ad646ae8a69c65428c6244bb3af24e6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WImage.html">Wt::WImage</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIconPair.html#afaed887865e6069e3c4689feed6cf43a">icon1</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the first icon image.  <a href="#afaed887865e6069e3c4689feed6cf43a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WImage.html">Wt::WImage</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIconPair.html#aa7fcead5a40120b8765213c217351cda">icon2</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the second icon image.  <a href="#aa7fcead5a40120b8765213c217351cda"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIconPair.html#ac4fc5158f2431ff46f81943db2c6edca">showIcon1</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set state to 0 (show icon 1).  <a href="#ac4fc5158f2431ff46f81943db2c6edca"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIconPair.html#a4a06f61619db889f4f11adac37e45b42">showIcon2</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set state to 1 (show icon 2).  <a href="#a4a06f61619db889f4f11adac37e45b42"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1EventSignal.html">Wt::EventSignal</a><br class="typebreak"/>
&lt; <a class="elRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WMouseEvent.html">Wt::WMouseEvent</a> &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIconPair.html#add2ab8e518f79ef40d8000f32bc004dc">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="#add2ab8e518f79ef40d8000f32bc004dc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1EventSignal.html">Wt::EventSignal</a><br class="typebreak"/>
&lt; <a class="elRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WMouseEvent.html">Wt::WMouseEvent</a> &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIconPair.html#aaa5a73811e71280dcdf2ce4e9efc540a">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="#aaa5a73811e71280dcdf2ce4e9efc540a"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIconPair.html#a6f89d1e7951bcc1e060b9bc73bc97a7e">undoShowIcon1</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Undo function for prelearning <a class="el" href="classIconPair.html#ac4fc5158f2431ff46f81943db2c6edca" title="Set state to 0 (show icon 1).">showIcon1()</a>  <a href="#a6f89d1e7951bcc1e060b9bc73bc97a7e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIconPair.html#a28fe301bcdd61cb0f022cb3aac17de6d">undoShowIcon2</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Undo function for prelearning <a class="el" href="classIconPair.html#a4a06f61619db889f4f11adac37e45b42" title="Set state to 1 (show icon 2).">showIcon2()</a>  <a href="#a28fe301bcdd61cb0f022cb3aac17de6d"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html">Wt::WContainerWidget</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIconPair.html#ac05f98096ddc1f784692a45714380dc7">impl_</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WImage.html">Wt::WImage</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIconPair.html#afaea8a9d7016035313d7ff57386ecd0a">icon1_</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">First icon.  <a href="#afaea8a9d7016035313d7ff57386ecd0a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WImage.html">Wt::WImage</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIconPair.html#a38a46596764e5dc56fec4d3e0c0479e9">icon2_</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Second icon.  <a href="#a38a46596764e5dc56fec4d3e0c0479e9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIconPair.html#aae00701197f8c04483503c8f11be2fe9">previousState_</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Undo state for prelearning stateless <a class="el" href="classIconPair.html#ac4fc5158f2431ff46f81943db2c6edca" title="Set state to 0 (show icon 1).">showIcon1()</a> and <a class="el" href="classIconPair.html#a4a06f61619db889f4f11adac37e45b42" title="Set state to 1 (show icon 2).">showIcon2()</a> slots.  <a href="#aae00701197f8c04483503c8f11be2fe9"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>An icon pair (identical to WIconPair) </p>
<p>This widget manages two images, only one of which is shown at a single time.</p>
<p>The widget may also react to click events, by changing state.</p>
<p>This widget is part of the Wt treelist example, where it is used to represent the expand/collapse icons, and the corresponding map open/close icon.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classTreeNode.html" title="Example implementation of a single tree list node.">TreeNode</a> </dd></dl>

<p>Definition at line <a class="el" href="IconPair_8h_source.html#l00034">34</a> of file <a class="el" href="IconPair_8h_source.html">IconPair.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ae046514e1811766cbb4568ff5067de57"></a><!-- doxytag: member="IconPair::IconPair" ref="ae046514e1811766cbb4568ff5067de57" args="(const std::string icon1URI, const std::string icon2URI, bool clickIsSwitch=true, Wt::WContainerWidget *parent=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">IconPair::IconPair </td>
          <td>(</td>
          <td class="paramtype">const std::string&#160;</td>
          <td class="paramname"><em>icon1URI</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string&#160;</td>
          <td class="paramname"><em>icon2URI</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="elRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html">Wt::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 a two-state icon widget. </p>
<p>The constructor takes the URI of the two icons. When clickIsSwitch is set true, clicking on the icon will switch state. </p>

<p>Definition at line <a class="el" href="IconPair_8C_source.html#l00012">12</a> of file <a class="el" href="IconPair_8C_source.html">IconPair.C</a>.</p>
<div class="fragment"><pre class="fragment">  : <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WCompositeWidget.html#a43fc53dd07a7568cb153822c439c4c65">Wt::WCompositeWidget</a>(parent),
    <a class="code" href="classIconPair.html#ac05f98096ddc1f784692a45714380dc7">impl_</a>(<span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html">Wt::WContainerWidget</a>()),
    <a class="code" href="classIconPair.html#afaea8a9d7016035313d7ff57386ecd0a" title="First icon.">icon1_</a>(<span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WImage.html">Wt::WImage</a>(icon1URI, <a class="code" href="classIconPair.html#ac05f98096ddc1f784692a45714380dc7">impl_</a>)),
    <a class="code" href="classIconPair.html#a38a46596764e5dc56fec4d3e0c0479e9" title="Second icon.">icon2_</a>(<span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WImage.html">Wt::WImage</a>(icon2URI, <a class="code" href="classIconPair.html#ac05f98096ddc1f784692a45714380dc7">impl_</a>)),
    <a class="code" href="classIconPair.html#add2ab8e518f79ef40d8000f32bc004dc" title="Signal emitted when clicked while in state 0 (icon 1 is shown).">icon1Clicked</a>(<a class="code" href="classIconPair.html#afaea8a9d7016035313d7ff57386ecd0a" title="First icon.">icon1_</a>-&gt;<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WInteractWidget.html#ae11e050cce0d4a8f742afa3ef92bfe8c">clicked</a>()),
    <a class="code" href="classIconPair.html#aaa5a73811e71280dcdf2ce4e9efc540a" title="Signal emitted when clicked while in state 1 (icon 2 is shown).">icon2Clicked</a>(<a class="code" href="classIconPair.html#a38a46596764e5dc56fec4d3e0c0479e9" title="Second icon.">icon2_</a>-&gt;<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WInteractWidget.html#ae11e050cce0d4a8f742afa3ef92bfe8c">clicked</a>())
{
  <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WCompositeWidget.html#aa5a3e93a551fd41b180c6b28fa169946">setImplementation</a>(<a class="code" href="classIconPair.html#ac05f98096ddc1f784692a45714380dc7">impl_</a>);

  <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WObject.html#adaa163b9e92933f3b2ff4ec58e2734c6">implementStateless</a>(&amp;<a class="code" href="classIconPair.html#ac4fc5158f2431ff46f81943db2c6edca" title="Set state to 0 (show icon 1).">IconPair::showIcon1</a>, &amp;<a class="code" href="classIconPair.html#a6f89d1e7951bcc1e060b9bc73bc97a7e" title="Undo function for prelearning showIcon1()">IconPair::undoShowIcon1</a>);
  <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WObject.html#adaa163b9e92933f3b2ff4ec58e2734c6">implementStateless</a>(&amp;<a class="code" href="classIconPair.html#a4a06f61619db889f4f11adac37e45b42" title="Set state to 1 (show icon 2).">IconPair::showIcon2</a>, &amp;<a class="code" href="classIconPair.html#a28fe301bcdd61cb0f022cb3aac17de6d" title="Undo function for prelearning showIcon2()">IconPair::undoShowIcon2</a>);

  <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WCompositeWidget.html#a96100109e775da87bfb3c5848c3c6a82">setInline</a>(<span class="keyword">true</span>);

  <a class="code" href="classIconPair.html#a38a46596764e5dc56fec4d3e0c0479e9" title="Second icon.">icon2_</a>-&gt;<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html#a0825c3ccbd4999afc1a88fafa6aa6fc7">hide</a>();

  <span class="keywordflow">if</span> (clickIsSwitch) {
    <a class="code" href="classIconPair.html#afaea8a9d7016035313d7ff57386ecd0a" title="First icon.">icon1_</a>-&gt;<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WInteractWidget.html#ae11e050cce0d4a8f742afa3ef92bfe8c">clicked</a>().connect(<a class="code" href="classIconPair.html#afaea8a9d7016035313d7ff57386ecd0a" title="First icon.">icon1_</a>, &amp;<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html#a0825c3ccbd4999afc1a88fafa6aa6fc7">Wt::WImage::hide</a>);
    <a class="code" href="classIconPair.html#afaea8a9d7016035313d7ff57386ecd0a" title="First icon.">icon1_</a>-&gt;<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WInteractWidget.html#ae11e050cce0d4a8f742afa3ef92bfe8c">clicked</a>().connect(<a class="code" href="classIconPair.html#a38a46596764e5dc56fec4d3e0c0479e9" title="Second icon.">icon2_</a>, &amp;<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html#a52dcef5a385ddfa0a8c3e6c20000f181">Wt::WImage::show</a>);

    <a class="code" href="classIconPair.html#a38a46596764e5dc56fec4d3e0c0479e9" title="Second icon.">icon2_</a>-&gt;<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WInteractWidget.html#ae11e050cce0d4a8f742afa3ef92bfe8c">clicked</a>().connect(<a class="code" href="classIconPair.html#a38a46596764e5dc56fec4d3e0c0479e9" title="Second icon.">icon2_</a>, &amp;<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html#a0825c3ccbd4999afc1a88fafa6aa6fc7">Wt::WImage::hide</a>);
    <a class="code" href="classIconPair.html#a38a46596764e5dc56fec4d3e0c0479e9" title="Second icon.">icon2_</a>-&gt;<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WInteractWidget.html#ae11e050cce0d4a8f742afa3ef92bfe8c">clicked</a>().connect(<a class="code" href="classIconPair.html#afaea8a9d7016035313d7ff57386ecd0a" title="First icon.">icon1_</a>, &amp;<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html#a52dcef5a385ddfa0a8c3e6c20000f181">Wt::WImage::show</a>); <span class="comment">//</span>

    <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WCompositeWidget.html#ad1eb3d24f374cb311ef88e43b3036503">decorationStyle</a>().setCursor(<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/namespaceWt.html#a6dc0346a6ae888d6d4ab44f022e61eb6af860d39b9a2ba8f7d7359453bf15a37c">Wt::PointingHandCursor</a>);
  }
} <span class="comment">//</span>
</pre></div>
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="afaed887865e6069e3c4689feed6cf43a"></a><!-- doxytag: member="IconPair::icon1" ref="afaed887865e6069e3c4689feed6cf43a" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WImage.html">Wt::WImage</a>* IconPair::icon1 </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the first icon image. </p>

<p>Definition at line <a class="el" href="IconPair_8h_source.html#l00061">61</a> of file <a class="el" href="IconPair_8h_source.html">IconPair.h</a>.</p>
<div class="fragment"><pre class="fragment">{ <span class="keywordflow">return</span> <a class="code" href="classIconPair.html#afaea8a9d7016035313d7ff57386ecd0a" title="First icon.">icon1_</a>; }
</pre></div>
</div>
</div>
<a class="anchor" id="aa7fcead5a40120b8765213c217351cda"></a><!-- doxytag: member="IconPair::icon2" ref="aa7fcead5a40120b8765213c217351cda" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WImage.html">Wt::WImage</a>* IconPair::icon2 </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the second icon image. </p>

<p>Definition at line <a class="el" href="IconPair_8h_source.html#l00065">65</a> of file <a class="el" href="IconPair_8h_source.html">IconPair.h</a>.</p>
<div class="fragment"><pre class="fragment">{ <span class="keywordflow">return</span> <a class="code" href="classIconPair.html#a38a46596764e5dc56fec4d3e0c0479e9" title="Second icon.">icon2_</a>; }
</pre></div>
</div>
</div>
<a class="anchor" id="a349d74977ef2174b64bab37e2b9a27ea"></a><!-- doxytag: member="IconPair::setState" ref="a349d74977ef2174b64bab37e2b9a27ea" args="(int num)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void IconPair::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>Set which icon should be visible. </p>
<p>The first icon has number 0, and the second icon has number 1.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classIconPair.html#a8ad646ae8a69c65428c6244bb3af24e6" title="Get the current state.">state()</a> </dd></dl>

<p>Definition at line <a class="el" href="IconPair_8C_source.html#l00041">41</a> of file <a class="el" href="IconPair_8C_source.html">IconPair.C</a>.</p>
<div class="fragment"><pre class="fragment">{
  <span class="keywordflow">if</span> (num == 0) {
    <a class="code" href="classIconPair.html#afaea8a9d7016035313d7ff57386ecd0a" title="First icon.">icon1_</a>-&gt;<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html#a52dcef5a385ddfa0a8c3e6c20000f181">show</a>();
    <a class="code" href="classIconPair.html#a38a46596764e5dc56fec4d3e0c0479e9" title="Second icon.">icon2_</a>-&gt;<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html#a0825c3ccbd4999afc1a88fafa6aa6fc7">hide</a>();
  } <span class="keywordflow">else</span> {
    <a class="code" href="classIconPair.html#afaea8a9d7016035313d7ff57386ecd0a" title="First icon.">icon1_</a>-&gt;<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html#a0825c3ccbd4999afc1a88fafa6aa6fc7">hide</a>();
    <a class="code" href="classIconPair.html#a38a46596764e5dc56fec4d3e0c0479e9" title="Second icon.">icon2_</a>-&gt;<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWidget.html#a52dcef5a385ddfa0a8c3e6c20000f181">show</a>();
  }
}
</pre></div>
</div>
</div>
<a class="anchor" id="ac4fc5158f2431ff46f81943db2c6edca"></a><!-- doxytag: member="IconPair::showIcon1" ref="ac4fc5158f2431ff46f81943db2c6edca" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void IconPair::showIcon1 </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set state to 0 (show icon 1). </p>

<p>Definition at line <a class="el" href="IconPair_8C_source.html#l00057">57</a> of file <a class="el" href="IconPair_8C_source.html">IconPair.C</a>.</p>
<div class="fragment"><pre class="fragment">{
  <a class="code" href="classIconPair.html#aae00701197f8c04483503c8f11be2fe9" title="Undo state for prelearning stateless showIcon1() and showIcon2() slots.">previousState_</a> = (<a class="code" href="classIconPair.html#afaea8a9d7016035313d7ff57386ecd0a" title="First icon.">icon1_</a>-&gt;<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWebWidget.html#ad565084bebed7abe45a659f6ba7101cf">isHidden</a>() ? 1 : 0);
  <a class="code" href="classIconPair.html#a349d74977ef2174b64bab37e2b9a27ea" title="Set which icon should be visible.">setState</a>(0);
}
</pre></div>
</div>
</div>
<a class="anchor" id="a4a06f61619db889f4f11adac37e45b42"></a><!-- doxytag: member="IconPair::showIcon2" ref="a4a06f61619db889f4f11adac37e45b42" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void IconPair::showIcon2 </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set state to 1 (show icon 2). </p>

<p>Definition at line <a class="el" href="IconPair_8C_source.html#l00063">63</a> of file <a class="el" href="IconPair_8C_source.html">IconPair.C</a>.</p>
<div class="fragment"><pre class="fragment">{
  <a class="code" href="classIconPair.html#aae00701197f8c04483503c8f11be2fe9" title="Undo state for prelearning stateless showIcon1() and showIcon2() slots.">previousState_</a> = (<a class="code" href="classIconPair.html#afaea8a9d7016035313d7ff57386ecd0a" title="First icon.">icon1_</a>-&gt;<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWebWidget.html#ad565084bebed7abe45a659f6ba7101cf">isHidden</a>() ? 1 : 0);
  <a class="code" href="classIconPair.html#a349d74977ef2174b64bab37e2b9a27ea" title="Set which icon should be visible.">setState</a>(1);
}
</pre></div>
</div>
</div>
<a class="anchor" id="a8ad646ae8a69c65428c6244bb3af24e6"></a><!-- doxytag: member="IconPair::state" ref="a8ad646ae8a69c65428c6244bb3af24e6" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int IconPair::state </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the current state. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classIconPair.html#a349d74977ef2174b64bab37e2b9a27ea" title="Set which icon should be visible.">setState()</a> </dd></dl>

<p>Definition at line <a class="el" href="IconPair_8C_source.html#l00052">52</a> of file <a class="el" href="IconPair_8C_source.html">IconPair.C</a>.</p>
<div class="fragment"><pre class="fragment">{
  <span class="keywordflow">return</span> (<a class="code" href="classIconPair.html#afaea8a9d7016035313d7ff57386ecd0a" title="First icon.">icon1_</a>-&gt;<a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WWebWidget.html#ad565084bebed7abe45a659f6ba7101cf">isHidden</a>() ? 1 : 0);
}
</pre></div>
</div>
</div>
<a class="anchor" id="a6f89d1e7951bcc1e060b9bc73bc97a7e"></a><!-- doxytag: member="IconPair::undoShowIcon1" ref="a6f89d1e7951bcc1e060b9bc73bc97a7e" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void IconPair::undoShowIcon1 </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Undo function for prelearning <a class="el" href="classIconPair.html#ac4fc5158f2431ff46f81943db2c6edca" title="Set state to 0 (show icon 1).">showIcon1()</a> </p>

<p>Definition at line <a class="el" href="IconPair_8C_source.html#l00069">69</a> of file <a class="el" href="IconPair_8C_source.html">IconPair.C</a>.</p>
<div class="fragment"><pre class="fragment">{
  <a class="code" href="classIconPair.html#a349d74977ef2174b64bab37e2b9a27ea" title="Set which icon should be visible.">setState</a>(<a class="code" href="classIconPair.html#aae00701197f8c04483503c8f11be2fe9" title="Undo state for prelearning stateless showIcon1() and showIcon2() slots.">previousState_</a>);
}
</pre></div>
</div>
</div>
<a class="anchor" id="a28fe301bcdd61cb0f022cb3aac17de6d"></a><!-- doxytag: member="IconPair::undoShowIcon2" ref="a28fe301bcdd61cb0f022cb3aac17de6d" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void IconPair::undoShowIcon2 </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Undo function for prelearning <a class="el" href="classIconPair.html#a4a06f61619db889f4f11adac37e45b42" title="Set state to 1 (show icon 2).">showIcon2()</a> </p>

<p>Definition at line <a class="el" href="IconPair_8C_source.html#l00074">74</a> of file <a class="el" href="IconPair_8C_source.html">IconPair.C</a>.</p>
<div class="fragment"><pre class="fragment">{
  <a class="code" href="classIconPair.html#a349d74977ef2174b64bab37e2b9a27ea" title="Set which icon should be visible.">setState</a>(<a class="code" href="classIconPair.html#aae00701197f8c04483503c8f11be2fe9" title="Undo state for prelearning stateless showIcon1() and showIcon2() slots.">previousState_</a>);
} <span class="comment">//</span>
</pre></div>
</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="afaea8a9d7016035313d7ff57386ecd0a"></a><!-- doxytag: member="IconPair::icon1_" ref="afaea8a9d7016035313d7ff57386ecd0a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WImage.html">Wt::WImage</a>* <a class="el" href="classIconPair.html#afaea8a9d7016035313d7ff57386ecd0a">IconPair::icon1_</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>First icon. </p>

<p>Definition at line <a class="el" href="IconPair_8h_source.html#l00079">79</a> of file <a class="el" href="IconPair_8h_source.html">IconPair.h</a>.</p>

</div>
</div>
<a class="anchor" id="add2ab8e518f79ef40d8000f32bc004dc"></a><!-- doxytag: member="IconPair::icon1Clicked" ref="add2ab8e518f79ef40d8000f32bc004dc" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1EventSignal.html">Wt::EventSignal</a>&lt;<a class="elRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WMouseEvent.html">Wt::WMouseEvent</a>&gt;&amp; <a class="el" href="classIconPair.html#add2ab8e518f79ef40d8000f32bc004dc">IconPair::icon1Clicked</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Signal emitted when clicked while in state 0 (icon 1 is shown). </p>

<p>Definition at line <a class="el" href="IconPair_8h_source.html#l00088">88</a> of file <a class="el" href="IconPair_8h_source.html">IconPair.h</a>.</p>

</div>
</div>
<a class="anchor" id="a38a46596764e5dc56fec4d3e0c0479e9"></a><!-- doxytag: member="IconPair::icon2_" ref="a38a46596764e5dc56fec4d3e0c0479e9" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WImage.html">Wt::WImage</a>* <a class="el" href="classIconPair.html#a38a46596764e5dc56fec4d3e0c0479e9">IconPair::icon2_</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Second icon. </p>

<p>Definition at line <a class="el" href="IconPair_8h_source.html#l00082">82</a> of file <a class="el" href="IconPair_8h_source.html">IconPair.h</a>.</p>

</div>
</div>
<a class="anchor" id="aaa5a73811e71280dcdf2ce4e9efc540a"></a><!-- doxytag: member="IconPair::icon2Clicked" ref="aaa5a73811e71280dcdf2ce4e9efc540a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1EventSignal.html">Wt::EventSignal</a>&lt;<a class="elRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WMouseEvent.html">Wt::WMouseEvent</a>&gt;&amp; <a class="el" href="classIconPair.html#aaa5a73811e71280dcdf2ce4e9efc540a">IconPair::icon2Clicked</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Signal emitted when clicked while in state 1 (icon 2 is shown). </p>

<p>Definition at line <a class="el" href="IconPair_8h_source.html#l00093">93</a> of file <a class="el" href="IconPair_8h_source.html">IconPair.h</a>.</p>

</div>
</div>
<a class="anchor" id="ac05f98096ddc1f784692a45714380dc7"></a><!-- doxytag: member="IconPair::impl_" ref="ac05f98096ddc1f784692a45714380dc7" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html">Wt::WContainerWidget</a>* <a class="el" href="classIconPair.html#ac05f98096ddc1f784692a45714380dc7">IconPair::impl_</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="IconPair_8h_source.html#l00076">76</a> of file <a class="el" href="IconPair_8h_source.html">IconPair.h</a>.</p>

</div>
</div>
<a class="anchor" id="aae00701197f8c04483503c8f11be2fe9"></a><!-- doxytag: member="IconPair::previousState_" ref="aae00701197f8c04483503c8f11be2fe9" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classIconPair.html#aae00701197f8c04483503c8f11be2fe9">IconPair::previousState_</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Undo state for prelearning stateless <a class="el" href="classIconPair.html#ac4fc5158f2431ff46f81943db2c6edca" title="Set state to 0 (show icon 1).">showIcon1()</a> and <a class="el" href="classIconPair.html#a4a06f61619db889f4f11adac37e45b42" title="Set state to 1 (show icon 2).">showIcon2()</a> slots. </p>

<p>Definition at line <a class="el" href="IconPair_8h_source.html#l00097">97</a> of file <a class="el" href="IconPair_8h_source.html">IconPair.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/home/koen/project/wt/public-git/wt/examples/treelist/<a class="el" href="IconPair_8h_source.html">IconPair.h</a></li>
<li>/home/koen/project/wt/public-git/wt/examples/treelist/<a class="el" href="IconPair_8C_source.html">IconPair.C</a></li>
</ul>
</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>