⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Wt
All Projects
Wt
Overview
Activity
Roadmap
Issues
Wiki
Forums
Download (869 Bytes)
Bug #3255
» main.cpp
Vitaly Volochay
, 06/03/2014 06:59 PM
#include
<Wt/WServer>
#include
<Wt/WApplication>
#include
<Wt/WEnvironment>
#include
<Wt/WCssTheme>
#include
<Wt/WBootstrapTheme>
#include
"treetestwidget.h"
Wt
::
WApplication
*
createApplication
(
const
Wt
::
WEnvironment
&
env
)
{
Wt
::
WApplication
*
app
=
new
Wt
::
WApplication
(
env
);
const
std
::
string
*
theme
=
env
.
getParameter
(
"theme"
);
if
(
theme
)
{
app
->
setTheme
(
new
Wt
::
WCssTheme
(
*
theme
));
}
else
{
app
->
setTheme
(
new
Wt
::
WBootstrapTheme
(
app
));
}
app
->
root
()
->
addWidget
(
new
TreeTestWidget
);
return
app
;
}
int
main
(
int
argc
,
char
**
argv
)
{
try
{
Wt
::
WServer
server
(
argv
[
0
]);
server
.
setServerConfiguration
(
argc
,
argv
,
WTHTTP_CONFIGURATION
);
server
.
addEntryPoint
(
Wt
::
Application
,
createApplication
);
if
(
server
.
start
())
{
Wt
::
WServer
::
waitForShutdown
();
server
.
stop
();
}
}
catch
(
Wt
::
WServer
::
Exception
&
e
)
{
return
1
;
}
return
0
;
}
« Previous
1
…
3
4
5
6
Next »
(5-5/6)
Loading...