X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6ae4d29a5e43eaa83124c34b27dd8e34473b2f61..6ba5438dda164146bf36ca729f8328332fae36b7:/samples/display/display.cpp diff --git a/samples/display/display.cpp b/samples/display/display.cpp index 75e35c4dd9..2a0b0bc082 100644 --- a/samples/display/display.cpp +++ b/samples/display/display.cpp @@ -1,11 +1,11 @@ ///////////////////////////////////////////////////////////////////////////// // Name: display.cpp -// Purpose: wxWindows sample showing the features of wxDisplay class +// Purpose: wxWidgets sample showing the features of wxDisplay class // Author: Vadim Zeitlin // Modified by: Ryan Norton & Brian Victor // Created: 23.02.03 // RCS-ID: $Id$ -// Copyright: (c) Vadim Zeitlin +// Copyright: (c) Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -88,7 +88,7 @@ private: // GUI controls wxNotebook *m_notebook; - // 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() }; @@ -127,10 +127,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(MyFrame, wxFrame) @@ -148,7 +148,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_DISPLAY_CHANGED(MyFrame::OnDisplayChanged) 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. MyApp and @@ -174,7 +174,7 @@ bool MyApp::OnInit() #endif // __WXMSW__ // create the main application window - MyFrame *frame = new MyFrame(_("Display wxWindows Sample"), + MyFrame *frame = new MyFrame(_("Display wxWidgets Sample"), wxDefaultPosition, wxDefaultSize); // and show it (the frames, unlike simple controls, are not shown when @@ -220,8 +220,10 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size, SetMenuBar(menuBar); #endif // wxUSE_MENUS +#if wxUSE_STATUSBAR // create status bar CreateStatusBar(); +#endif // wxUSE_STATUSBAR // create child controls @@ -293,10 +295,11 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size, (unsigned long)nDpy)); } - wxNotebookSizer *notebookSizer = new wxNotebookSizer(m_notebook); - panel->SetSizer(notebookSizer); - notebookSizer->Fit(this); - + wxBoxSizer *sizer = new wxBoxSizer(wxHORIZONTAL); + sizer->Add(m_notebook, 1, wxEXPAND); + panel->SetSizer(sizer); + sizer->Fit(this); + sizer->SetSizeHints(this); } wxString MyFrame::VideoModeToText(const wxVideoMode& mode) @@ -335,7 +338,9 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnFromPoint(wxCommandEvent& WXUNUSED(event)) { +#if wxUSE_STATUSBAR SetStatusText(_T("Press the mouse anywhere...")); +#endif // wxUSE_STATUSBAR CaptureMouse(); }