X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/88a8b04e9c387b5e5295d42f2ed23afcf37e3c2e..bfa7bf7d6b75e4fa31db205cf0b339c28ea6d090:/contrib/samples/stc/stctest.cpp?ds=sidebyside diff --git a/contrib/samples/stc/stctest.cpp b/contrib/samples/stc/stctest.cpp index 8c27905685..636934d79c 100644 --- a/contrib/samples/stc/stctest.cpp +++ b/contrib/samples/stc/stctest.cpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// File: app.cpp +// File: stctest.cpp // Purpose: STC test application // Maintainer: Otto Wyss // Created: 2003-09-01 @@ -20,18 +20,19 @@ #endif // for all others, include the necessary headers (this file is usually all you -// need because it includes almost all 'standard' wxWindows headers) +// need because it includes almost all 'standard' wxWidgets headers) #ifndef WX_PRECOMP #include #endif -//! wxWindows headers +//! wxWidgets headers #include // configuration support #include // file dialog support #include // filename support #include // notebook support #include // system settings #include // strings support +#include // images support //! application headers #include "defsext.h" // Additional definitions @@ -53,17 +54,17 @@ //============================================================================ #define APP_NAME _T("STC-Test") -#define APP_DESCR _("See http://wxguide.sourceforge.net/indexedit.html") +#define APP_DESCR _("See http://wxguide.sourceforge.net/") #define APP_MAINT _T("Otto Wyss") -#define APP_VENDOR _T("wxWindows") +#define APP_VENDOR _T("wxWidgets") #define APP_COPYRIGTH _T("(C) 2003 Otto Wyss") -#define APP_LICENCE _T("wxWindows") +#define APP_LICENCE _T("wxWidgets") #define APP_VERSION _T("0.1.alpha") #define APP_BUILD __DATE__ -#define APP_WEBSITE _T("http://www.wxWindows.org") +#define APP_WEBSITE _T("http://www.wxWidgets.org") #define APP_MAIL _T("mailto://???") #define NONAME _("") @@ -98,7 +99,7 @@ private: }; -// created dynamically by wxWindows +// created dynamically by wxWidgets DECLARE_APP (App); //---------------------------------------------------------------------------- @@ -190,7 +191,7 @@ IMPLEMENT_APP (App) bool App::OnInit () { wxInitAllImageHandlers(); - + // set application and vendor name SetAppName (APP_NAME); SetVendorName (APP_VENDOR); @@ -288,7 +289,7 @@ BEGIN_EVENT_TABLE (AppFrame, wxFrame) END_EVENT_TABLE () AppFrame::AppFrame (const wxString &title) - : wxFrame ((wxFrame *)NULL, -1, title, wxDefaultPosition, wxSize(600,400), + : wxFrame ((wxFrame *)NULL, -1, title, wxDefaultPosition, wxSize(750,550), wxDEFAULT_FRAME_STYLE | wxNO_FULL_REPAINT_ON_RESIZE) { // intitialize important variables @@ -310,6 +311,7 @@ AppFrame::AppFrame (const wxString &title) m_edit = new Edit (this, -1); m_edit->SetFocus(); + FileOpen (_T("stctest.cpp")); } AppFrame::~AppFrame () { @@ -377,6 +379,9 @@ void AppFrame::OnFileClose (wxCommandEvent &WXUNUSED(event)) { } } } + m_edit->SetFilename (wxEmptyString); + m_edit->ClearAll(); + m_edit->SetSavePoint(); } // properties event handlers @@ -583,7 +588,7 @@ AppAbout::AppAbout (wxWindow *parent, long style) : wxDialog (parent, -1, wxEmptyString, wxDefaultPosition, wxDefaultSize, - wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) { + style | wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) { // set timer if any m_timer = NULL; @@ -638,7 +643,7 @@ AppAbout::AppAbout (wxWindow *parent, SetSizerAndFit (totalpane); - CenterOnScreen(); + CenterOnScreen(); ShowModal(); } @@ -651,7 +656,7 @@ AppAbout::~AppAbout () { //---------------------------------------------------------------------------- // event handlers -void AppAbout::OnTimerEvent (wxTimerEvent &event) { +void AppAbout::OnTimerEvent (wxTimerEvent &WXUNUSED(event)) { if (m_timer) delete m_timer; m_timer = NULL; EndModal (wxID_OK);