1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
#include "box_sizer_demo.h" #include "xtp_id.h"
BoxSizerDemoFrame::BoxSizerDemoFrame( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style ) { this->SetSizeHints( wxSize( 500,300 ), wxDefaultSize );
wxBoxSizer* bSizer1; bSizer1 = new wxBoxSizer( wxVERTICAL );
bSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
wxBoxSizer* bSizer2; bSizer2 = new wxBoxSizer( wxHORIZONTAL );
m_button1 = new wxButton( this, static_cast<int>(XTPId::Btn1), _("Button1"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer2->Add( m_button1, 0, wxALL, 5 );
m_button2 = new wxButton( this, static_cast<int>(XTPId::Btn1), _("Button2"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer2->Add( m_button2, 0, wxALL, 5 );
m_button3 = new wxButton( this, static_cast<int>(XTPId::Btn1), _("Button3"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer2->Add( m_button3, 0, wxALL, 5 );
m_button4 = new wxButton( this, static_cast<int>(XTPId::Btn1), _("Button4"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer2->Add( m_button4, 0, wxALL, 5 );
bSizer1->Add( bSizer2, 0, wxALIGN_CENTER, 5 );
wxBoxSizer* bSizer3; bSizer3 = new wxBoxSizer( wxHORIZONTAL );
m_button5 = new wxButton( this, static_cast<int>(XTPId::Btn1), _("Button5"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer3->Add( m_button5, 0, wxALL, 5 );
m_button6 = new wxButton( this, static_cast<int>(XTPId::Btn1), _("Button6"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer3->Add( m_button6, 0, wxALL, 5 );
m_button7 = new wxButton( this, static_cast<int>(XTPId::Btn7), _("Button7"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer3->Add( m_button7, 0, wxALL, 5 );
m_button8 = new wxButton( this, static_cast<int>(XTPId::Btn8), _("Button8"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer3->Add( m_button8, 0, wxALL, 5 );
bSizer1->Add( bSizer3, 0, wxALIGN_CENTER|wxALL, 5 );
bSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
this->SetSizer( bSizer1 ); this->Layout();
this->Centre( wxBOTH );
m_button1->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BoxSizerDemoFrame::OnBtnClicked ), NULL, this ); m_button2->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BoxSizerDemoFrame::OnBtnClicked ), NULL, this ); m_button3->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BoxSizerDemoFrame::OnBtnClicked ), NULL, this ); m_button4->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BoxSizerDemoFrame::OnBtnClicked ), NULL, this ); m_button5->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BoxSizerDemoFrame::OnBtnClicked ), NULL, this ); m_button6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BoxSizerDemoFrame::OnBtnClicked ), NULL, this ); m_button7->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BoxSizerDemoFrame::OnBtnClicked ), NULL, this ); m_button8->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BoxSizerDemoFrame::OnBtnClicked ), NULL, this ); }
BoxSizerDemoFrame::~BoxSizerDemoFrame() { }
|