Wt examples: javascript/JavascriptExample.h Source File

Wt examples 4.10.4

Loading...
Searching...
No Matches
JavascriptExample.h
Go to the documentation of this file.
1// This may look like C code, but it's really -*- C++ -*-
2/*
3 * Copyright (C) 2008 Emweb bv, Herent, Belgium.
4 *
5 * See the LICENSE file for terms of use.
6 */
7#ifndef JAVASCRIPTEXAMPLE_H_
8#define JAVASCRIPTEXAMPLE_H_
9
10#include <Wt/WApplication.h>
11
12using namespace Wt;
13
18
19class Popup;
20
24 class JavascriptExample : public WApplication
25{
26public:
29 JavascriptExample(const WEnvironment& env);
30
31private:
34 void confirmed();
35
38 void setAmount(std::string amount);
39
42 std::unique_ptr<Popup> promptAmount_;
43
46 std::unique_ptr<Popup> confirmPay_;
47
50 WText *currentAmount_;
51};
52
55#endif // JAVASCRIPTEXAMPLE_H_
JavascriptExample
An example showing how to interact custom JavaScript with Wt stuff.
Definition JavascriptExample.h:25
JavascriptExample::promptAmount_
std::unique_ptr< Popup > promptAmount_
Popup for changing the amount.
Definition JavascriptExample.h:42
JavascriptExample::confirmed
void confirmed()
The user has confirmed the payment.
Definition JavascriptExample.C:89
JavascriptExample::currentAmount_
WText * currentAmount_
WText for showing the current amount.
Definition JavascriptExample.h:50
JavascriptExample::JavascriptExample
JavascriptExample(const WEnvironment &env)
Create the example application.
Definition JavascriptExample.C:17
JavascriptExample::setAmount
void setAmount(std::string amount)
Set the amount to be payed.
Definition JavascriptExample.C:77
JavascriptExample::confirmPay_
std::unique_ptr< Popup > confirmPay_
Popup for paying.
Definition JavascriptExample.h:46
Popup
A JavaScript based popup window, encapsulating the Javascript functions alert(), confirm(),...
Definition Popup.h:33
Wt
Definition AddresseeEdit.h:16