33 #include <wx/valgen.h>
34 #include <wx/filedlg.h>
35 #include <boost/format.hpp>
68 wxDialog(parent, -1, _T(""),
72 createContents(
this,
true,
true);
75 SetValidator(wxTextValidator(wxFILTER_ASCII, &editor_));
125 return wxWindow::TransferDataToWindow();
133 TransferDataFromWindow();
156 wxFileDialog dialog(
this, _T(
"Choose a file"),
158 if (dialog.ShowModal() == wxID_OK) {
160 wxWindow::TransferDataToWindow();
178 wxBoxSizer *item0 =
new wxBoxSizer( wxVERTICAL );
180 item0->Add( 20, 20, 0, wxALIGN_CENTER|wxALL, 5 );
182 wxBoxSizer *item1 =
new wxBoxSizer( wxHORIZONTAL );
184 wxStaticText *item2 =
new wxStaticText( parent,
ID_TEXT, wxT(
"Source code editor:"), wxDefaultPosition, wxDefaultSize, 0 );
185 item1->Add( item2, 0, wxALIGN_CENTER|wxALL, 5 );
187 wxTextCtrl *item3 =
new wxTextCtrl( parent,
ID_EDITOR, wxT(
""), wxDefaultPosition, wxSize(150,-1), 0 );
188 item1->Add( item3, 0, wxALIGN_CENTER|wxALL, 5 );
190 wxButton *item4 =
new wxButton( parent,
ID_BUTTON_BROWSE, wxT(
"Browse"), wxDefaultPosition, wxDefaultSize, 0 );
191 item1->Add( item4, 0, wxALIGN_CENTER|wxALL, 5 );
193 item0->Add( item1, 0, wxALIGN_CENTER|wxALL, 5 );
195 item0->Add( 20, 20, 0, wxALIGN_CENTER|wxALL, 5 );
197 wxBoxSizer *item5 =
new wxBoxSizer( wxHORIZONTAL );
199 wxButton *item6 =
new wxButton( parent,
ID_BUTTON_SAVE, wxT(
"&Save"), wxDefaultPosition, wxDefaultSize, 0 );
200 item5->Add( item6, 0, wxALIGN_CENTER|wxALL, 5 );
202 wxButton *item7 =
new wxButton( parent, wxID_CANCEL, wxT(
"&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
203 item5->Add( item7, 0, wxALIGN_CENTER|wxALL, 5 );
205 item0->Add( item5, 0, wxALIGN_CENTER|wxALL, 5 );
209 parent->SetSizer( item0 );
211 item0->SetSizeHints( parent );