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
|
<!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 examples: /home/koen/project/wt/public-git/wt/examples/treelist/IconPair.h Source File</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="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>/home/koen/project/wt/public-git/wt/examples/treelist/IconPair.h</h1><a href="IconPair_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// This may look like C code, but it's really -*- C++ -*-</span>
<a name="l00002"></a>00002 <span class="comment">/*</span>
<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.</span>
<a name="l00004"></a>00004 <span class="comment"> *</span>
<a name="l00005"></a>00005 <span class="comment"> * See the LICENSE file for terms of use.</span>
<a name="l00006"></a>00006 <span class="comment"> */</span>
<a name="l00007"></a>00007 <span class="preprocessor">#ifndef ICONPAIR_H_</span>
<a name="l00008"></a>00008 <span class="preprocessor"></span><span class="preprocessor">#define ICONPAIR_H_</span>
<a name="l00009"></a>00009 <span class="preprocessor"></span>
<a name="l00010"></a>00010 <span class="preprocessor">#include <Wt/WCompositeWidget></span>
<a name="l00011"></a>00011
<a name="l00012"></a>00012 <span class="keyword">namespace </span>Wt {
<a name="l00013"></a>00013 <span class="keyword">class </span>WImage;
<a name="l00014"></a>00014 }
<a name="l00015"></a>00015
<a name="l00020"></a>00020
<a name="l00034"></a><a class="code" href="classIconPair.html">00034</a> <span class="keyword">class </span><a class="code" href="classIconPair.html" title="An icon pair (identical to WIconPair).">IconPair</a> : <span class="keyword">public</span> Wt::<a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WCompositeWidget.html#43fc53dd07a7568cb153822c439c4c65">WCompositeWidget</a>
<a name="l00035"></a>00035 {
<a name="l00036"></a>00036 <span class="keyword">public</span>:
<a name="l00042"></a>00042 <a class="code" href="classIconPair.html#e046514e1811766cbb4568ff5067de57" title="Construct a two-state icon widget.">IconPair</a>(<span class="keyword">const</span> std::string icon1URI, <span class="keyword">const</span> std::string icon2URI,
<a name="l00043"></a>00043 <span class="keywordtype">bool</span> clickIsSwitch = <span class="keyword">true</span>, <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WContainerWidget.html">Wt::WContainerWidget</a> *<a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWidget.html#3461e31818c4d2f516641bdaf508312a">parent</a> = 0);
<a name="l00044"></a>00044
<a name="l00051"></a>00051 <span class="keywordtype">void</span> <a class="code" href="classIconPair.html#349d74977ef2174b64bab37e2b9a27ea" title="Set which icon should be visible.">setState</a>(<span class="keywordtype">int</span> num);
<a name="l00052"></a>00052
<a name="l00057"></a>00057 <span class="keywordtype">int</span> <a class="code" href="classIconPair.html#8ad646ae8a69c65428c6244bb3af24e6" title="Get the current state.">state</a>() <span class="keyword">const</span>;
<a name="l00058"></a>00058
<a name="l00061"></a><a class="code" href="classIconPair.html#faed887865e6069e3c4689feed6cf43a">00061</a> <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WImage.html">Wt::WImage</a> *<a class="code" href="classIconPair.html#faed887865e6069e3c4689feed6cf43a" title="Get the first icon image.">icon1</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classIconPair.html#faea8a9d7016035313d7ff57386ecd0a" title="First icon.">icon1_</a>; }
<a name="l00062"></a>00062
<a name="l00065"></a><a class="code" href="classIconPair.html#a7fcead5a40120b8765213c217351cda">00065</a> <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WImage.html">Wt::WImage</a> *<a class="code" href="classIconPair.html#a7fcead5a40120b8765213c217351cda" title="Get the second icon image.">icon2</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classIconPair.html#38a46596764e5dc56fec4d3e0c0479e9" title="Second icon.">icon2_</a>; }
<a name="l00066"></a>00066
<a name="l00067"></a>00067 <span class="keyword">public</span> slots:
<a name="l00070"></a>00070 <span class="keywordtype">void</span> <a class="code" href="classIconPair.html#c4fc5158f2431ff46f81943db2c6edca" title="Set state to 0 (show icon 1).">showIcon1</a>();
<a name="l00071"></a>00071
<a name="l00074"></a>00074 <span class="keywordtype">void</span> <a class="code" href="classIconPair.html#4a06f61619db889f4f11adac37e45b42" title="Set state to 1 (show icon 2).">showIcon2</a>();
<a name="l00075"></a>00075
<a name="l00076"></a>00076 <span class="keyword">private</span>:
<a name="l00077"></a><a class="code" href="classIconPair.html#c05f98096ddc1f784692a45714380dc7">00077</a> <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WContainerWidget.html">Wt::WContainerWidget</a> *<a class="code" href="classIconPair.html#c05f98096ddc1f784692a45714380dc7">impl_</a>;
<a name="l00078"></a>00078
<a name="l00080"></a><a class="code" href="classIconPair.html#faea8a9d7016035313d7ff57386ecd0a">00080</a> <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WImage.html">Wt::WImage</a> *<a class="code" href="classIconPair.html#faea8a9d7016035313d7ff57386ecd0a" title="First icon.">icon1_</a>;
<a name="l00081"></a>00081
<a name="l00083"></a><a class="code" href="classIconPair.html#38a46596764e5dc56fec4d3e0c0479e9">00083</a> <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WImage.html">Wt::WImage</a> *<a class="code" href="classIconPair.html#38a46596764e5dc56fec4d3e0c0479e9" title="Second icon.">icon2_</a>;
<a name="l00084"></a>00084
<a name="l00085"></a>00085 <span class="keyword">public</span>:
<a name="l00089"></a><a class="code" href="classIconPair.html#dd2ab8e518f79ef40d8000f32bc004dc">00089</a> <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1EventSignal.html">Wt::EventSignal<Wt::WMouseEvent></a>& <a class="code" href="classIconPair.html#dd2ab8e518f79ef40d8000f32bc004dc" title="Signal emitted when clicked while in state 0 (icon 1 is shown).">icon1Clicked</a>;
<a name="l00090"></a>00090
<a name="l00094"></a><a class="code" href="classIconPair.html#aa5a73811e71280dcdf2ce4e9efc540a">00094</a> <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1EventSignal.html">Wt::EventSignal<Wt::WMouseEvent></a>& <a class="code" href="classIconPair.html#aa5a73811e71280dcdf2ce4e9efc540a" title="Signal emitted when clicked while in state 1 (icon 2 is shown).">icon2Clicked</a>;
<a name="l00095"></a>00095
<a name="l00096"></a>00096 <span class="keyword">private</span>:
<a name="l00098"></a><a class="code" href="classIconPair.html#ae00701197f8c04483503c8f11be2fe9">00098</a> <span class="keywordtype">int</span> <a class="code" href="classIconPair.html#ae00701197f8c04483503c8f11be2fe9" title="Undo state for prelearning stateless showIcon1() and showIcon2() slots.">previousState_</a>;
<a name="l00099"></a>00099
<a name="l00101"></a>00101 <span class="keywordtype">void</span> <a class="code" href="classIconPair.html#6f89d1e7951bcc1e060b9bc73bc97a7e" title="Undo function for prelearning showIcon1().">undoShowIcon1</a>();
<a name="l00102"></a>00102
<a name="l00104"></a>00104 <span class="keywordtype">void</span> <a class="code" href="classIconPair.html#28fe301bcdd61cb0f022cb3aac17de6d" title="Undo function for prelearning showIcon2().">undoShowIcon2</a>();
<a name="l00105"></a>00105 };
<a name="l00106"></a>00106
<a name="l00109"></a>00109 <span class="preprocessor">#endif // ICONPAIR_H_</span>
</pre></div></div>
<hr size="1"><address style="align: right;"><small>
Generated on Fri Mar 26 17:12:12 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>
|