⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Wt
All Projects
Wt
Overview
Activity
Roadmap
Issues
Wiki
Forums
Download (811 Bytes)
Bug #951
ยป 951.cpp
Boris Nagaev
, 08/21/2011 08:24 PM
#include
<Wt/WApplication>
#include
<Wt/WTextEdit>
#include
<Wt/WText>
#include
<Wt/WTemplate>
#include
<Wt/WPushButton>
#include
<Wt/WContainerWidget>
class
HelloApp
:
public
Wt
::
WApplication
{
public:
HelloApp
(
const
Wt
::
WEnvironment
&
env
)
:
Wt
::
WApplication
(
env
)
{
Wt
::
WTemplate
*
r
=
new
Wt
::
WTemplate
(
"${WTextEdit} ${WText}"
,
root
());
r
->
bindWidget
(
"WTextEdit"
,
new
Wt
::
WTextEdit
());
Wt
::
WPushButton
*
button
=
new
Wt
::
WPushButton
(
"Click Me"
,
root
());
button
->
clicked
().
connect
(
boost
::
bind
(
&
Wt
::
WTemplate
::
bindWidget
,
r
,
"WText"
,
new
Wt
::
WText
()));
}
};
Wt
::
WApplication
*
createApplication
(
const
Wt
::
WEnvironment
&
env
)
{
return
new
HelloApp
(
env
);
}
int
main
(
int
argc
,
char
**
argv
)
{
return
Wt
::
WRun
(
argc
,
argv
,
&
createApplication
);
}
(1-1/1)
Loading...