// Copyright:
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
- #pragma implementation "wxedit.h"
-#endif
-
// For compilers that support precompilation
#include "wx/wxprec.h"
// Create edit control. Since it is the only
// control in the frame, it will be resized
// to file it out.
- m_text = new wxTextCtrl( this, wxID_ANY, _T(""), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
+ m_text = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
// Read .ini file for file history etc.
wxConfig *conf = (wxConfig*) wxConfig::Get();
m_filename = wxEmptyString;
#if wxUSE_STATUSBAR
- SetStatusText( _T("") );
+ SetStatusText( wxEmptyString );
#endif // wxUSE_STATUSBAR
}
void MyFrame::OnOpen( wxCommandEvent& WXUNUSED(event) )
{
+#if wxUSE_FILEDLG
if (!Discard()) return;
- wxFileDialog dialog( this, _T("Open text"), _T(""), _T(""),
+ wxFileDialog dialog( this, _T("Open text"), wxEmptyString, wxEmptyString,
_T("Text file (*.txt)|*.txt|Any file (*)|*"),
- wxOPEN|wxFILE_MUST_EXIST );
+ wxFD_OPEN|wxFD_FILE_MUST_EXIST );
if (dialog.ShowModal() == wxID_OK)
{
m_text->Clear();
-
#ifdef __WXX11__
// requires wxUSE_UNIV_TEXTCTRL to be set to 0
#if 0
SetStatusText( m_filename );
#endif // wxUSE_STATUSBAR
}
+#endif // wxUSE_FILEDLG
}
void MyFrame::OnSave( wxCommandEvent& WXUNUSED(event) )
void MyFrame::OnSaveAs( wxCommandEvent& WXUNUSED(event) )
{
- wxFileDialog dialog( this, _T("Open text"), _T(""), _T(""),
+#if wxUSE_FILEDLG
+ wxFileDialog dialog( this, _T("Open text"), wxEmptyString, wxEmptyString,
_T("Text file (*.txt)|*.txt|Any file (*)|*"),
- wxSAVE|wxOVERWRITE_PROMPT );
+ wxFD_SAVE|wxFD_OVERWRITE_PROMPT );
if (dialog.ShowModal() == wxID_OK)
{
m_filename = dialog.GetPath();
SetStatusText( m_filename );
#endif // wxUSE_STATUSBAR
}
+#endif // wxUSE_FILEDLG
}
void MyFrame::OnAbout( wxCommandEvent& WXUNUSED(event) )
{
return 0;
}
-