⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Wt
All Projects
Wt
Overview
Activity
Roadmap
Issues
Wiki
Forums
Download (681 Bytes)
Bug #1651
ยป test.cpp
Max Quatember
, 01/29/2013 02:42 PM
namespace
{
class
TestPopupHide
:
public
Wt
::
WApplication
{
public:
TestPopupHide
(
const
Wt
::
WEnvironment
&
env
)
:
Wt
::
WApplication
(
env
)
{
root
()
->
setAttributeValue
(
"oncontextmenu"
,
"event.cancelBubble = true; event.returnValue = false; return false;"
);
auto
c
=
new
Wt
::
WContainerWidget
(
root
()
);
c
->
resize
(
1000
,
1000
);
c
->
mouseMoved
().
connect
(
[
&
](
const
Wt
::
WMouseEvent
&
e
){
}
);
auto
child
=
new
Wt
::
WText
(
"right click"
,
c
);
child
->
mouseWentUp
().
connect
(
[
&
](
const
Wt
::
WMouseEvent
&
e
)
{
auto
popup
=
new
Wt
::
WPopupMenu
;
popup
->
addItem
(
"is not shown..."
);
popup
->
popup
(
e
);
});
}
};
}
(1-1/1)
Loading...