Project

General

Profile

Bug #3718 ยป test.cpp

Max Quatember, 01/08/2015 09:26 AM

 
#include <Wt/WMessageBox>
#include <Wt/WTemplate>

namespace
{
class TestTemplate
: public Wt::WApplication
{
public:
TestTemplate( const Wt::WEnvironment& env )
: Wt::WApplication( env )
{
auto t = new Wt::WTemplate;
String templateText = R"(<div><iframe src="http://www.bitfactory.at" width="500" height="500">xxx</iframe></div>)";
t->setTemplateText( templateText, Wt::XHTMLUnsafeText );
root()->addWidget( t );
auto w = new Wt::WContainerWidget;
w->mouseWentDown().connect( [](...){ Wt::WMessageBox::show( "xx", "xx", Wt::Ok ); } );
w->mouseWentUp().connect( [](...){ } );
w->resize( 500, 500 );
w->decorationStyle().setBackgroundColor( Wt::lightGray );
root()->addWidget( w );
}
};
}
    (1-1/1)