3 #include <Wt/WPushButton.h> 6 #include "MessageBox.h" 8 Wtx::MessageBox::MessageBox(
const std::string & message )
9 :
Wt::WDialog(
"Question")
11 contents()-> addNew<Wt::WText>(message);
12 contents()-> addNew<Wt::WBreak>();
13 contents()-> addNew<Wt::WPushButton>(
"Yes")->
14 clicked().connect( [=]()
20 contents()-> addNew<Wt::WPushButton>(
"No")->
21 clicked().connect( [=]()
27 rejectWhenEscapePressed();
32 Wt::Signal<> & Wtx::MessageBox::yes()
37 Wt::Signal<> & Wtx::MessageBox::no()