⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Wt
All Projects
Wt
Overview
Activity
Roadmap
Issues
Wiki
Forums
Download (1.12 KB)
Bug #4246
ยป example.cpp
Sebastian Schmitt
, 06/25/2015 12:06 PM
#include
<Wt/WApplication>
#include
<Wt/WPushButton>
#include
<Magick++/lib/Magick++.h>
#include
<Wt/WDialog>
#include
<Wt/WPopupMenu>
Magick
::
Blob
bmp
;
using
namespace
Wt
;
class
CTestDialog
:
public
WDialog
{
public:
CTestDialog
()
{
setMinimumSize
(
800
,
600
);
setMaximumSize
(
800
,
600
);
WPushButton
*
pb
=
new
WPushButton
(
"push me"
);
WPopupMenu
*
pViewMenu
=
new
WPopupMenu
();
WMenuItem
*
pItemMonitors
=
new
WMenuItem
(
"Item 1"
);
WMenuItem
*
pItemAttributes
=
new
WMenuItem
(
"Item 2"
);
pViewMenu
->
addItem
(
pItemMonitors
);
pViewMenu
->
addItem
(
pItemAttributes
);
pb
->
setMenu
(
pViewMenu
);
this
->
contents
()
->
addWidget
(
pb
);
setTransient
(
true
);
}
~
CTestDialog
(){}
private
:
};
class
MyApplication
:
public
WApplication
{
public:
MyApplication
(
const
WEnvironment
&
env
)
:
WApplication
(
env
)
{
c_testDialog
.
show
();
}
private
:
CTestDialog
c_testDialog
;
};
WApplication
*
createApplication
(
const
WEnvironment
&
env
)
{
return
new
MyApplication
(
env
);
}
int
main
(
int
argc
,
char
**
argv
)
{
return
WRun
(
argc
,
argv
,
&
createApplication
);
}
(1-1/1)
Loading...