#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"
#endif
#include "../../../include/wx/gizmos/ledctrl.h"
#include "wx/sizer.h"
#include "wx/panel.h"
+#include "wx/numdlg.h"
// ----------------------------------------------------------------------------
// private classes
private:
MyPanel *m_panel;
- // 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_MENU(LED_About, MyFrame::OnAbout)
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
// and show it (the frames, unlike simple controls, are not shown when
// created initially)
- frame->Show(TRUE);
+ frame->Show(true);
// success: wxApp::OnRun() will be called which will enter the main message
- // loop and the application will run. If we returned FALSE here, the
+ // loop and the application will run. If we returned false here, the
// application would exit immediately.
- return TRUE;
+ return true;
}
// ----------------------------------------------------------------------------
// frame constructor
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size, long style)
- : wxFrame(NULL, -1, title, pos, size, style)
+ : wxFrame(NULL, wxID_ANY, title, pos, size, style)
{
#if wxUSE_MENUS
// create a menu bar
editMenu->AppendSeparator();
editMenu->AppendCheckItem(LED_Edit_DrawFaded, _T("Draw &Faded\tCtrl-F"));
- editMenu->Check(LED_Edit_DrawFaded, TRUE);
+ editMenu->Check(LED_Edit_DrawFaded, true);
// now append the freshly created menu to the menu bar...
wxMenuBar *menuBar = new wxMenuBar();
void MyFrame::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 MyFrame::OnIncrement(wxCommandEvent& event)
+void MyFrame::OnIncrement(wxCommandEvent& WXUNUSED(event))
{
m_panel->OnIncrement();
}
-void MyFrame::OnDecrement(wxCommandEvent& event)
+void MyFrame::OnDecrement(wxCommandEvent& WXUNUSED(event))
{
m_panel->OnDecrement();
}
-void MyFrame::OnSetValue(wxCommandEvent& event)
+void MyFrame::OnSetValue(wxCommandEvent& WXUNUSED(event))
{
m_panel->OnSetValue();
}
-void MyFrame::OnAlignLeft(wxCommandEvent& event)
+void MyFrame::OnAlignLeft(wxCommandEvent& WXUNUSED(event))
{
m_panel->OnAlignLeft();
}
-void MyFrame::OnAlignCenter(wxCommandEvent& event)
+void MyFrame::OnAlignCenter(wxCommandEvent& WXUNUSED(event))
{
m_panel->OnAlignCenter();
}
-void MyFrame::OnAlignRight(wxCommandEvent& event)
+void MyFrame::OnAlignRight(wxCommandEvent& WXUNUSED(event))
{
m_panel->OnAlignRight();
}
-void MyFrame::OnDrawFaded(wxCommandEvent& event)
+void MyFrame::OnDrawFaded(wxCommandEvent& WXUNUSED(event))
{
m_panel->OnDrawFaded();
}