X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cf7d6329530d0a9f181ac24dcc722d276885f05e..939b57893e3315c9057223eef442d595141c7611:/samples/vscroll/vstest.cpp diff --git a/samples/vscroll/vstest.cpp b/samples/vscroll/vstest.cpp index 04255ef947..515b8183bc 100644 --- a/samples/vscroll/vstest.cpp +++ b/samples/vscroll/vstest.cpp @@ -1,11 +1,11 @@ ///////////////////////////////////////////////////////////////////////////// // Name: vscroll.cpp -// Purpose: VScroll wxWindows sample +// Purpose: VScroll wxWidgets sample // Author: Vadim Zeitlin // Modified by: // Created: 04/01/98 // RCS-ID: $Id$ -// Copyright: (c) 2003 Vadim Zeitlin +// Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -25,8 +25,9 @@ #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 "wx/wx.h" #include "wx/app.h" #include "wx/frame.h" #endif @@ -73,7 +74,7 @@ public: if ( m_frameStatusBar ) { wxSize sz = GetClientSize(); - SetStatusText(wxString::Format("%dx%d", sz.x, sz.y), 1); + SetStatusText(wxString::Format(_T("%dx%d"), sz.x, sz.y), 1); } #endif // wxUSE_STATUSBAR @@ -81,14 +82,14 @@ public: } private: - // any class wishing to process wxWindows events must use this macro + // any class wishing to process wxWidgets events must use this macro DECLARE_EVENT_TABLE() }; class VScrollWindow : public wxVScrolledWindow { public: - VScrollWindow(wxFrame *frame) : wxVScrolledWindow(frame, -1) + VScrollWindow(wxFrame *frame) : wxVScrolledWindow(frame, wxID_ANY) { m_frame = frame; @@ -101,7 +102,7 @@ public: { m_frame->SetStatusText(wxString::Format ( - "Page size = %d, pos = %d, max = %d", + _T("Page size = %d, pos = %d, max = %d"), GetScrollThumb(wxVERTICAL), GetScrollPos(wxVERTICAL), GetScrollRange(wxVERTICAL) @@ -180,10 +181,10 @@ enum }; // ---------------------------------------------------------------------------- -// event tables and other macros for wxWindows +// event tables and other macros for wxWidgets // ---------------------------------------------------------------------------- -// the event tables connect the wxWindows events with the functions (event +// the event tables connect the wxWidgets events with the functions (event // handlers) which process them. It can be also done at run-time, but for the // simple menu events like this the static method is much simpler. BEGIN_EVENT_TABLE(VScrollFrame, wxFrame) @@ -192,7 +193,7 @@ BEGIN_EVENT_TABLE(VScrollFrame, wxFrame) EVT_SIZE(VScrollFrame::OnSize) END_EVENT_TABLE() -// Create a new application object: this macro will allow wxWindows to create +// Create a new application object: this macro will allow wxWidgets to create // the application object during program execution (it's better than using a // static object for many reasons) and also declares the accessor function // wxGetApp() which will return the reference of the right type (i.e. VScrollApp and @@ -215,10 +216,10 @@ bool VScrollApp::OnInit() // and show it (the frames, unlike simple controls, are not shown when // created initially) - frame->Show(TRUE); + frame->Show(true); // ok - return TRUE; + return true; } // ---------------------------------------------------------------------------- @@ -228,8 +229,8 @@ bool VScrollApp::OnInit() // frame constructor VScrollFrame::VScrollFrame() : wxFrame(NULL, - -1, - _T("VScroll wxWindows Sample"), + wxID_ANY, + _T("VScroll wxWidgets Sample"), wxDefaultPosition, wxSize(400, 350)) { @@ -258,7 +259,7 @@ VScrollFrame::VScrollFrame() #if wxUSE_STATUSBAR // create a status bar just for fun (by default with 1 pane only) CreateStatusBar(2); - SetStatusText(_T("Welcome to wxWindows!")); + SetStatusText(_T("Welcome to wxWidgets!")); #endif // wxUSE_STATUSBAR // create our one and only child -- it will take our entire client area @@ -271,8 +272,8 @@ VScrollFrame::VScrollFrame() void VScrollFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) { - // TRUE is to force the frame to close - Close(TRUE); + // true is to force the frame to close + Close(true); } void VScrollFrame::OnAbout(wxCommandEvent& WXUNUSED(event))