⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Wt
All Projects
Wt
Overview
Activity
Roadmap
Issues
Wiki
Forums
Download (706 Bytes)
Bug #1582
ยป fileres.cpp
Boris Nagaev
, 11/28/2012 09:40 PM
#include
<Wt/WApplication>
#include
<Wt/WContainerWidget>
#include
<Wt/WFileResource>
#include
<Wt/WAnchor>
using
namespace
Wt
;
class
MyApp
:
public
WApplication
{
public:
MyApp
(
const
WEnvironment
&
env
)
:
WApplication
(
env
)
{
WFileResource
*
f
=
new
WFileResource
(
"application/octet-stream"
,
"empty-file.txt"
,
root
());
f
->
suggestFileName
(
"1.txt"
);
WAnchor
*
a
=
new
WAnchor
(
root
());
a
->
setResource
(
f
);
a
->
setText
(
"anchor"
);
}
};
WApplication
*
createApplication
(
const
WEnvironment
&
env
)
{
return
new
MyApp
(
env
);
}
int
main
(
int
argc
,
char
**
argv
)
{
return
WRun
(
argc
,
argv
,
&
createApplication
);
}
(1-1/1)
Loading...