| 155 | } |
| 156 | |
| 157 | TextEditorWindowGen::TextEditorWindowGen( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) |
| 158 | { |
| 159 | this->SetSizeHints( wxDefaultSize, wxDefaultSize ); |
| 160 | |
| 161 | wxFlexGridSizer* fgSizer8; |
| 162 | fgSizer8 = new wxFlexGridSizer( 0, 1, 0, 0 ); |
| 163 | fgSizer8->AddGrowableCol( 0 ); |
| 164 | fgSizer8->AddGrowableRow( 0 ); |
| 165 | fgSizer8->SetFlexibleDirection( wxBOTH ); |
| 166 | fgSizer8->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_ALL ); |
| 167 | |
| 168 | textControl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_PROCESS_TAB ); |
| 169 | textControl->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_TELETYPE, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); |
| 170 | |
| 171 | fgSizer8->Add( textControl, 0, wxALL|wxEXPAND, 5 ); |
| 172 | |
| 173 | m_sdbSizer2 = new wxStdDialogButtonSizer(); |
| 174 | m_sdbSizer2Save = new wxButton( this, wxID_SAVE ); |
| 175 | m_sdbSizer2->AddButton( m_sdbSizer2Save ); |
| 176 | m_sdbSizer2Cancel = new wxButton( this, wxID_CANCEL ); |
| 177 | m_sdbSizer2->AddButton( m_sdbSizer2Cancel ); |
| 178 | m_sdbSizer2->Realize(); |
| 179 | |
| 180 | fgSizer8->Add( m_sdbSizer2, 1, wxALL|wxEXPAND, 5 ); |
| 181 | |
| 182 | |
| 183 | this->SetSizer( fgSizer8 ); |
| 184 | this->Layout(); |
| 185 | fgSizer8->Fit( this ); |
| 186 | |
| 187 | this->Centre( wxBOTH ); |
| 188 | |
| 189 | // Connect Events |
| 190 | this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( TextEditorWindowGen::OnClose ) ); |
| 191 | m_sdbSizer2Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TextEditorWindowGen::OnCancel ), NULL, this ); |
| 192 | m_sdbSizer2Save->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( TextEditorWindowGen::OnSave ), NULL, this ); |
| 193 | } |
| 194 | |
| 195 | TextEditorWindowGen::~TextEditorWindowGen() |
| 196 | { |