⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Wt
All Projects
Wt
Overview
Activity
Roadmap
Issues
Wiki
Forums
Download (942 Bytes)
Bug #1076
» hello.C
Pieter Libin, 12/26/2011 03:22 PM
#include
<Wt/WApplication>
#include
<Wt/WContainerWidget>
#include
<Wt/WSlider>
#include
<Wt/WVBoxLayout>
using
namespace
Wt
;
class
HelloApplication
:
public
WApplication
{
public:
HelloApplication
(
const
WEnvironment
&
env
);
};
HelloApplication
::
HelloApplication
(
const
WEnvironment
&
env
)
:
WApplication
(
env
)
{
this
->
setLayoutDirection
(
Wt
::
RightToLeft
);
WSlider
*
sliderHorizontal
=
new
WSlider
(
Horizontal
);
sliderHorizontal
->
setRange
(
0
,
100
);
sliderHorizontal
->
setValue
(
10
);
sliderHorizontal
->
setTickInterval
(
5
);
sliderHorizontal
->
setTickPosition
(
WSlider
::
TicksBothSides
);
sliderHorizontal
->
resize
(
300
,
50
);
WVBoxLayout
*
vBoxLayout
=
new
WVBoxLayout
(
root
());
vBoxLayout
->
addWidget
(
sliderHorizontal
);
root
()
->
setLayout
(
vBoxLayout
);
}
WApplication
*
createApplication
(
const
WEnvironment
&
env
)
{
return
new
HelloApplication
(
env
);
}
int
main
(
int
argc
,
char
**
argv
)
{
return
WRun
(
argc
,
argv
,
&
createApplication
);
}
« Previous
1
2
Next »
(1-1/2)
Loading...