/////////////////////////////////////////////////////////////////////////////
// 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 <vadim@wxwindows.org>
+// Copyright: (c) Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// 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()
};
};
// ----------------------------------------------------------------------------
-// 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)
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
#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
SetMenuBar(menuBar);
#endif // wxUSE_MENUS
+#if wxUSE_STATUSBAR
// create status bar
CreateStatusBar();
+#endif // wxUSE_STATUSBAR
// create child controls
(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)
void MyFrame::OnFromPoint(wxCommandEvent& WXUNUSED(event))
{
+#if wxUSE_STATUSBAR
SetStatusText(_T("Press the mouse anywhere..."));
+#endif // wxUSE_STATUSBAR
CaptureMouse();
}