File: classJavascriptExample.html

package info (click to toggle)
witty 3.1.2-3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 45,512 kB
  • ctags: 35,832
  • sloc: cpp: 69,469; ansic: 66,945; xml: 4,383; sh: 594; perl: 108; makefile: 106
file content (281 lines) | stat: -rw-r--r-- 25,042 bytes parent folder | download
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
<!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: JavascriptExample 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&nbsp;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 class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>JavascriptExample Class Reference<br>
<small>
[<a class="el" href="group__javascript.html">Javascript - Wt interaction example</a>]</small>
</h1><!-- doxytag: class="JavascriptExample" --><!-- doxytag: inherits="Wt::WApplication" -->An example showing how to interact custom JavaScript with <a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/namespaceWt.html">Wt</a> stuff.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="JavascriptExample_8h-source.html">JavascriptExample.h</a>&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for JavascriptExample:</div>
<div class="dynsection">
<p><center><img src="classJavascriptExample__inherit__graph.png" border="0" usemap="#JavascriptExample__inherit__map" alt="Inheritance graph"></center>
<map name="JavascriptExample__inherit__map">
<area shape="rect" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WApplication.html" title="Wt::WApplication" alt="" coords="11,80,131,107"><area shape="rect" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WObject.html" title="Wt::WObject" alt="" coords="23,5,119,32"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>

<p>
<a href="classJavascriptExample-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">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classJavascriptExample.html#77b459948d455df5cdb17df2d7e290a6">JavascriptExample</a> (const <a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WEnvironment.html">WEnvironment</a> &amp;env)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create the example application.  <a href="#77b459948d455df5cdb17df2d7e290a6"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classJavascriptExample.html#3a275b368e298b3d89c6d2729e1acd69">confirmed</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The user has confirmed the payment.  <a href="#3a275b368e298b3d89c6d2729e1acd69"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classJavascriptExample.html#a75d161f232147d89a1c343f1e13b40d">setAmount</a> (std::string amount)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the amount to be payed.  <a href="#a75d161f232147d89a1c343f1e13b40d"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classPopup.html">Popup</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classJavascriptExample.html#1e155e7b50393ba00fd2256a33ee5ef7">promptAmount_</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classPopup.html" title="A JavaScript based popup window, encapsulating the Javascript functions alert(),...">Popup</a> for changing the amount.  <a href="#1e155e7b50393ba00fd2256a33ee5ef7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classPopup.html">Popup</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classJavascriptExample.html#b169ca86f643cf5602c63d8fc88bbfc0">confirmPay_</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classPopup.html" title="A JavaScript based popup window, encapsulating the Javascript functions alert(),...">Popup</a> for paying.  <a href="#b169ca86f643cf5602c63d8fc88bbfc0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WText.html">WText</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classJavascriptExample.html#6e4ca792d015d42f20578f1b05e3e282">currentAmount_</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">WText for showing the current amount.  <a href="#6e4ca792d015d42f20578f1b05e3e282"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
An example showing how to interact custom JavaScript with <a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/namespaceWt.html">Wt</a> stuff. 
<p>Definition at line <a class="el" href="JavascriptExample_8h-source.html#l00024">24</a> of file <a class="el" href="JavascriptExample_8h-source.html">JavascriptExample.h</a>.</p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="77b459948d455df5cdb17df2d7e290a6"></a><!-- doxytag: member="JavascriptExample::JavascriptExample" ref="77b459948d455df5cdb17df2d7e290a6" args="(const WEnvironment &amp;env)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">JavascriptExample::JavascriptExample           </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WEnvironment.html">WEnvironment</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>env</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Create the example application. 
<p>

<p>Definition at line <a class="el" href="JavascriptExample_8C-source.html#l00019">19</a> of file <a class="el" href="JavascriptExample_8C-source.html">JavascriptExample.C</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00020"></a>00020   : <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WApplication.html#e29a843f4d50159b17abfa9503c389db">WApplication</a>(env)
<a name="l00021"></a>00021 {
<a name="l00022"></a>00022   <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WApplication.html#71a3f7da5abb9a76df94fab69ba61670">setTitle</a>(<span class="stringliteral">"Javascript example"</span>);
<a name="l00023"></a>00023 
<a name="l00024"></a>00024   <span class="comment">// Create a popup for prompting the amount of money, and connect the</span>
<a name="l00025"></a>00025   <span class="comment">// okPressed button to the slot for setting the amount of money.</span>
<a name="l00026"></a>00026   <span class="comment">//</span>
<a name="l00027"></a>00027   <span class="comment">// Note that the input provided by the user in the prompt box is passed as</span>
<a name="l00028"></a>00028   <span class="comment">// an argument to the slot.</span>
<a name="l00029"></a>00029   <a class="code" href="classJavascriptExample.html#1e155e7b50393ba00fd2256a33ee5ef7" title="Popup for changing the amount.">promptAmount_</a> = <a class="code" href="classPopup.html#df73b1320baaea8d1a090d4bb3e7f3ac" title="Create a prompt dialog with the given default value.">Popup::createPrompt</a>(<span class="stringliteral">"How much do you want to pay?"</span>, <span class="stringliteral">""</span>,
<a name="l00030"></a>00030                                       <span class="keyword">this</span>);
<a name="l00031"></a>00031   <a class="code" href="classJavascriptExample.html#1e155e7b50393ba00fd2256a33ee5ef7" title="Popup for changing the amount.">promptAmount_</a>-&gt;<a class="code" href="classPopup.html#3705ac1c6feedfbf737ae729ec097bab" title="Signal emitted when ok pressed.">okPressed</a>().<a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1JSignal.html#d39bf916e97103eb678bf2246373d22f">connect</a>(SLOT(<span class="keyword">this</span>, <a class="code" href="classJavascriptExample.html#a75d161f232147d89a1c343f1e13b40d" title="Set the amount to be payed.">JavascriptExample::setAmount</a>));
<a name="l00032"></a>00032 
<a name="l00033"></a>00033   <span class="comment">// Create a popup for confirming the payment.</span>
<a name="l00034"></a>00034   <span class="comment">//</span>
<a name="l00035"></a>00035   <span class="comment">// Since a confirm popup does not allow input, we ignore the</span>
<a name="l00036"></a>00036   <span class="comment">// argument carrying the input (which will be empty anyway).</span>
<a name="l00037"></a>00037   <a class="code" href="classJavascriptExample.html#b169ca86f643cf5602c63d8fc88bbfc0" title="Popup for paying.">confirmPay_</a> = <a class="code" href="classPopup.html#2ab31c6aca9d435eb734a8be24eea7b9" title="Create a confirm dialog.">Popup::createConfirm</a>(<span class="stringliteral">""</span>, <span class="keyword">this</span>);
<a name="l00038"></a>00038   <a class="code" href="classJavascriptExample.html#b169ca86f643cf5602c63d8fc88bbfc0" title="Popup for paying.">confirmPay_</a>-&gt;<a class="code" href="classPopup.html#3705ac1c6feedfbf737ae729ec097bab" title="Signal emitted when ok pressed.">okPressed</a>().<a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1JSignal.html#d39bf916e97103eb678bf2246373d22f">connect</a>(SLOT(<span class="keyword">this</span>, <a class="code" href="classJavascriptExample.html#3a275b368e298b3d89c6d2729e1acd69" title="The user has confirmed the payment.">JavascriptExample::confirmed</a>));
<a name="l00039"></a>00039 
<a name="l00040"></a>00040   <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WText.html">WText</a>(<span class="stringliteral">"&lt;h2&gt;Wt Javascript example&lt;/h2&gt;"</span>
<a name="l00041"></a>00041             <span class="stringliteral">"&lt;p&gt;Wt makes abstraction of Javascript, and therefore allows you"</span>
<a name="l00042"></a>00042             <span class="stringliteral">" to develop web applications without any knowledge of Javascript,"</span>
<a name="l00043"></a>00043             <span class="stringliteral">" and which are not dependent on Javascript."</span>
<a name="l00044"></a>00044             <span class="stringliteral">" However, Wt does allow you to add custom Javascript code:&lt;/p&gt;"</span>
<a name="l00045"></a>00045             <span class="stringliteral">" &lt;ul&gt;"</span>
<a name="l00046"></a>00046             <span class="stringliteral">"   &lt;li&gt;To call custom JavaScript code from an event handler, "</span>
<a name="l00047"></a>00047             <span class="stringliteral">"connect the Wt::EventSignal to a Wt::JSlot.&lt;/li&gt;"</span>
<a name="l00048"></a>00048             <span class="stringliteral">"   &lt;li&gt;To call C++ code from custom JavaScript, use "</span>
<a name="l00049"></a>00049             <span class="stringliteral">"Wt.emit() to emit a Wt::JSignal.&lt;/li&gt;"</span>
<a name="l00050"></a>00050             <span class="stringliteral">"   &lt;li&gt;To call custom JavaScript code from C++, use "</span>
<a name="l00051"></a>00051             <span class="stringliteral">"WApplication::doJavascript() or Wt::JSlot::exec().&lt;/li&gt;"</span>
<a name="l00052"></a>00052             <span class="stringliteral">" &lt;/ul&gt;"</span>
<a name="l00053"></a>00053             <span class="stringliteral">"&lt;p&gt;This simple application shows how to interact between C++ and"</span>
<a name="l00054"></a>00054             <span class="stringliteral">" JavaScript using the JSlot and JSignal classes.&lt;/p&gt;"</span>, <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WApplication.html#17e118a04d962459484a12989a80bc05">root</a>());
<a name="l00055"></a>00055 
<a name="l00056"></a>00056   <a class="code" href="classJavascriptExample.html#6e4ca792d015d42f20578f1b05e3e282" title="WText for showing the current amount.">currentAmount_</a>
<a name="l00057"></a>00057     = <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WText.html">WText</a>(<span class="stringliteral">"Current amount: $"</span> + <a class="code" href="classJavascriptExample.html#1e155e7b50393ba00fd2256a33ee5ef7" title="Popup for changing the amount.">promptAmount_</a>-&gt;<a class="code" href="classPopup.html#3069c5552a1ce6faeec9c580ae7f62ad" title="Get the default value for a prompt dialog.">defaultValue</a>(), <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WApplication.html#17e118a04d962459484a12989a80bc05">root</a>());
<a name="l00058"></a>00058 
<a name="l00059"></a>00059   <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WPushButton.html">WPushButton</a> *amountButton = <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WPushButton.html">WPushButton</a>(<span class="stringliteral">"Change ..."</span>, <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WApplication.html#17e118a04d962459484a12989a80bc05">root</a>());
<a name="l00060"></a>00060   amountButton-&gt;setMargin(10, Left | Right);
<a name="l00061"></a>00061 
<a name="l00062"></a>00062   <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WBreak.html">WBreak</a>(<a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WApplication.html#17e118a04d962459484a12989a80bc05">root</a>());
<a name="l00063"></a>00063 
<a name="l00064"></a>00064   <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WPushButton.html">WPushButton</a> *confirmButton = <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WPushButton.html">WPushButton</a>(<span class="stringliteral">"Pay now."</span>, <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WApplication.html#17e118a04d962459484a12989a80bc05">root</a>());
<a name="l00065"></a>00065   confirmButton-&gt;<a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWebWidget.html#07719d06da0dd17af2381c663e8fb0b7">setMargin</a>(10, Top | Bottom);
<a name="l00066"></a>00066 
<a name="l00067"></a>00067   <span class="comment">// Connect the event handlers to a JSlot: this will execute the JavaScript</span>
<a name="l00068"></a>00068   <span class="comment">// immediately, without a server round trip.</span>
<a name="l00069"></a>00069   amountButton-&gt;clicked().connect(<a class="code" href="classJavascriptExample.html#1e155e7b50393ba00fd2256a33ee5ef7" title="Popup for changing the amount.">promptAmount_</a>-&gt;<a class="code" href="classPopup.html#4fba40d8284a8022842f523dfa6318fa" title="Show the dialog.">show</a>);
<a name="l00070"></a>00070   confirmButton-&gt;<a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WInteractWidget.html#e11e050cce0d4a8f742afa3ef92bfe8c">clicked</a>().connect(<a class="code" href="classJavascriptExample.html#b169ca86f643cf5602c63d8fc88bbfc0" title="Popup for paying.">confirmPay_</a>-&gt;<a class="code" href="classPopup.html#4fba40d8284a8022842f523dfa6318fa" title="Show the dialog.">show</a>);
<a name="l00071"></a>00071 
<a name="l00072"></a>00072   <span class="comment">// Set the initial amount</span>
<a name="l00073"></a>00073   <a class="code" href="classJavascriptExample.html#a75d161f232147d89a1c343f1e13b40d" title="Set the amount to be payed.">setAmount</a>(<span class="stringliteral">"1000"</span>);
<a name="l00074"></a>00074 }
</pre></div>
<p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="3a275b368e298b3d89c6d2729e1acd69"></a><!-- doxytag: member="JavascriptExample::confirmed" ref="3a275b368e298b3d89c6d2729e1acd69" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void JavascriptExample::confirmed           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
The user has confirmed the payment. 
<p>

<p>Definition at line <a class="el" href="JavascriptExample_8C-source.html#l00088">88</a> of file <a class="el" href="JavascriptExample_8C-source.html">JavascriptExample.C</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00089"></a>00089 {
<a name="l00090"></a>00090   <span class="keyword">new</span> <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WText.html">WText</a>(<span class="stringliteral">"&lt;br/&gt;Just payed $"</span> + <a class="code" href="classJavascriptExample.html#1e155e7b50393ba00fd2256a33ee5ef7" title="Popup for changing the amount.">promptAmount_</a>-&gt;<a class="code" href="classPopup.html#3069c5552a1ce6faeec9c580ae7f62ad" title="Get the default value for a prompt dialog.">defaultValue</a>() + <span class="stringliteral">"."</span>, <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WApplication.html#17e118a04d962459484a12989a80bc05">root</a>());
<a name="l00091"></a>00091 }
</pre></div>
<p>

</div>
</div><p>
<a class="anchor" name="a75d161f232147d89a1c343f1e13b40d"></a><!-- doxytag: member="JavascriptExample::setAmount" ref="a75d161f232147d89a1c343f1e13b40d" args="(std::string amount)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void JavascriptExample::setAmount           </td>
          <td>(</td>
          <td class="paramtype">std::string&nbsp;</td>
          <td class="paramname"> <em>amount</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the amount to be payed. 
<p>

<p>Definition at line <a class="el" href="JavascriptExample_8C-source.html#l00076">76</a> of file <a class="el" href="JavascriptExample_8C-source.html">JavascriptExample.C</a>.</p>
<div class="fragment"><pre class="fragment"><a name="l00077"></a>00077 {
<a name="l00078"></a>00078   <span class="comment">// Change the confirmation message to include the amount.</span>
<a name="l00079"></a>00079   <a class="code" href="classJavascriptExample.html#b169ca86f643cf5602c63d8fc88bbfc0" title="Popup for paying.">confirmPay_</a>-&gt;<a class="code" href="classPopup.html#29f79258a69ee042dbf970b7883b2b97" title="Change the message.">setMessage</a>(<span class="stringliteral">"Are you sure you want to pay $"</span> + amount + <span class="stringliteral">" ?"</span>);
<a name="l00080"></a>00080 
<a name="l00081"></a>00081   <span class="comment">// Change the default value for the prompt.</span>
<a name="l00082"></a>00082   <a class="code" href="classJavascriptExample.html#1e155e7b50393ba00fd2256a33ee5ef7" title="Popup for changing the amount.">promptAmount_</a>-&gt;<a class="code" href="classPopup.html#97c14de0bcf9ca764b29eceb7627f14c" title="Change the default value for a prompt dialog.">setDefaultValue</a>(amount);
<a name="l00083"></a>00083 
<a name="l00084"></a>00084   <span class="comment">// Change the text that shows the current amount.</span>
<a name="l00085"></a>00085   <a class="code" href="classJavascriptExample.html#6e4ca792d015d42f20578f1b05e3e282" title="WText for showing the current amount.">currentAmount_</a>-&gt;<a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WText.html#2f788aa524d51b3962642c9f565e66e6">setText</a>(<span class="stringliteral">"Current amount: $"</span> + <a class="code" href="classJavascriptExample.html#1e155e7b50393ba00fd2256a33ee5ef7" title="Popup for changing the amount.">promptAmount_</a>-&gt;<a class="code" href="classPopup.html#3069c5552a1ce6faeec9c580ae7f62ad" title="Get the default value for a prompt dialog.">defaultValue</a>());
<a name="l00086"></a>00086 }
</pre></div>
<p>

</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="1e155e7b50393ba00fd2256a33ee5ef7"></a><!-- doxytag: member="JavascriptExample::promptAmount_" ref="1e155e7b50393ba00fd2256a33ee5ef7" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classPopup.html">Popup</a>* <a class="el" href="classJavascriptExample.html#1e155e7b50393ba00fd2256a33ee5ef7">JavascriptExample::promptAmount_</a><code> [private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<a class="el" href="classPopup.html" title="A JavaScript based popup window, encapsulating the Javascript functions alert(),...">Popup</a> for changing the amount. 
<p>

<p>Definition at line <a class="el" href="JavascriptExample_8h-source.html#l00042">42</a> of file <a class="el" href="JavascriptExample_8h-source.html">JavascriptExample.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="b169ca86f643cf5602c63d8fc88bbfc0"></a><!-- doxytag: member="JavascriptExample::confirmPay_" ref="b169ca86f643cf5602c63d8fc88bbfc0" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classPopup.html">Popup</a>* <a class="el" href="classJavascriptExample.html#b169ca86f643cf5602c63d8fc88bbfc0">JavascriptExample::confirmPay_</a><code> [private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<a class="el" href="classPopup.html" title="A JavaScript based popup window, encapsulating the Javascript functions alert(),...">Popup</a> for paying. 
<p>

<p>Definition at line <a class="el" href="JavascriptExample_8h-source.html#l00046">46</a> of file <a class="el" href="JavascriptExample_8h-source.html">JavascriptExample.h</a>.</p>

</div>
</div><p>
<a class="anchor" name="6e4ca792d015d42f20578f1b05e3e282"></a><!-- doxytag: member="JavascriptExample::currentAmount_" ref="6e4ca792d015d42f20578f1b05e3e282" 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_1WText.html">WText</a>* <a class="el" href="classJavascriptExample.html#6e4ca792d015d42f20578f1b05e3e282">JavascriptExample::currentAmount_</a><code> [private]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
WText for showing the current amount. 
<p>

<p>Definition at line <a class="el" href="JavascriptExample_8h-source.html#l00050">50</a> of file <a class="el" href="JavascriptExample_8h-source.html">JavascriptExample.h</a>.</p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li>/home/koen/project/wt/public-git/wt/examples/javascript/<a class="el" href="JavascriptExample_8h-source.html">JavascriptExample.h</a><li>/home/koen/project/wt/public-git/wt/examples/javascript/<a class="el" href="JavascriptExample_8C-source.html">JavascriptExample.C</a></ul>
</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&nbsp;<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>