⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Wt
All Projects
Wt
Overview
Activity
Roadmap
Issues
Wiki
Forums
Download (910 Bytes)
Bug #6285
» main.cpp
Velvet Jones
, 03/14/2018 01:22 PM
#include
<Wt/WApplication>
#include
<Wt/WTreeView>
#include
<Wt/WContainerWidget>
#include
<Wt/WMessageResourceBundle>
class
ResourceBundle
:
public
Wt
::
WMessageResourceBundle
{
public:
virtual
bool
resolveKey
(
const
std
::
string
&
key
,
std
::
string
&
result
)
{
if
(
!
Wt
::
WMessageResourceBundle
::
resolveKey
(
key
,
result
))
result
=
key
;
return
true
;
}
};
class
Test
:
public
Wt
::
WApplication
{
public:
Test
(
const
Wt
::
WEnvironment
&
env
);
};
Test
::
Test
(
const
Wt
::
WEnvironment
&
env
)
:
Wt
::
WApplication
(
env
)
{
ResourceBundle
*
rb
=
new
ResourceBundle
();
this
->
setLocalizedStrings
(
rb
);
rb
->
use
(
Wt
::
WApplication
::
appRoot
()
+
"wt"
);
this
->
root
()
->
addWidget
(
new
Wt
::
WTreeView
());
}
Wt
::
WApplication
*
createApplication
(
const
Wt
::
WEnvironment
&
env
)
{
return
new
Test
(
env
);
}
int
main
(
int
argc
,
char
*
argv
[])
{
return
Wt
::
WRun
(
argc
,
argv
,
&
createApplication
);
}
« Previous
1
2
3
4
5
Next »
(4-4/5)
Loading...