Project

General

Profile

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)