|
|
|
#include <Wt/WApplication>
|
|
#include <Wt/WCheckBox>
|
|
#include <Wt/WGridLayout>
|
|
#include <Wt/WVBoxLayout>
|
|
#include <Wt/WGroupBox>
|
|
#include <Wt/WContainerWidget>
|
|
|
|
class HelloApp : public Wt::WApplication
|
|
{
|
|
public:
|
|
HelloApp(const Wt::WEnvironment& env):
|
|
Wt::WApplication(env)
|
|
{
|
|
Wt::WVBoxLayout* pVBLayout = new Wt::WVBoxLayout();
|
|
root()->setLayout( pVBLayout );
|
|
|
|
Wt::WContainerWidget* pContainer = new Wt::WContainerWidget();
|
|
Wt::WGridLayout* pGridLayout = new Wt::WGridLayout();
|
|
Wt::WGroupBox* pGroupBox = new Wt::WGroupBox();
|
|
|
|
Wt::WCheckBox *m_pCheck1 = new Wt::WCheckBox();
|
|
Wt::WCheckBox *m_pCheck2 = new Wt::WCheckBox();
|
|
Wt::WCheckBox *m_pCheck3 = new Wt::WCheckBox();
|
|
Wt::WCheckBox *m_pCheck4 = new Wt::WCheckBox();
|
|
Wt::WCheckBox *m_pCheck5 = new Wt::WCheckBox();
|
|
|
|
pGroupBox->setLayout( pGridLayout );
|
|
pGroupBox->setTitle( Wt::WString( "Panel" ) );
|
|
m_pCheck1->setText( Wt::WString( "Checkbox1" ) );
|
|
m_pCheck2->setText( Wt::WString( "Checkbox2" ) );
|
|
m_pCheck3->setText( Wt::WString( "Checkbox3" ) );
|
|
pGridLayout->addWidget( m_pCheck1, 0, 0, 0, 0,
|
|
Wt::AlignLeft | Wt::AlignTop );
|
|
pGridLayout->addWidget( m_pCheck2, 1, 0, 0, 0,
|
|
Wt::AlignLeft | Wt::AlignTop );
|
|
pGridLayout->addWidget( m_pCheck3, 2, 0, 0, 0,
|
|
Wt::AlignLeft | Wt::AlignTop );
|
|
m_pCheck4->setText( Wt::WString( "Checkbox4" ) );
|
|
m_pCheck5->setText( Wt::WString( "Checkbox5" ) );
|
|
pGridLayout->addWidget( m_pCheck4, 0, 1, 0, 0,
|
|
Wt::AlignLeft | Wt::AlignTop );
|
|
pGridLayout->addWidget( m_pCheck5, 1, 1, 0, 0,
|
|
Wt::AlignLeft | Wt::AlignTop );
|
|
|
|
pVBLayout->addWidget( pGroupBox, 1 );
|
|
}
|
|
};
|
|
|
|
Wt::WApplication *createApplication(const Wt::WEnvironment& env)
|
|
{
|
|
return new HelloApp(env);
|
|
}
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
return Wt::WRun(argc, argv, &createApplication);
|
|
}
|
|
|