// --------------------------------------------------------------------------
// IDs for the controls and the menu commands. Exluding those already defined
-// by wxWindows, such as wxID_NEW.
+// by wxWidgets, such as wxID_NEW.
enum
{
// timer
};
// --------------------------------------------------------------------------
-// event tables and other macros for wxWindows
+// event tables and other macros for wxWidgets
// --------------------------------------------------------------------------
// Event tables
// some shortcuts
#define ADD_TOOL(id, bmp, tooltip, help) \
- toolBar->AddTool(id, bmp, wxNullBitmap, false, -1, -1, (wxObject *)0, tooltip, help)
+ toolBar->AddTool(id, bmp, wxNullBitmap, false, wxDefaultCoord, wxDefaultCoord, (wxObject *)NULL, tooltip, help)
// --------------------------------------------------------------------------
toolBar->Realize();
toolBar->EnableTool(ID_STOP, false); // must be after Realize() !
+#if wxUSE_STATUSBAR
// status bar
CreateStatusBar(2);
SetStatusText(_("Welcome to Life!"));
+#endif // wxUSE_STATUSBAR
// game and timer
m_life = new Life();
wxSlider *slider = new wxSlider(panel2, ID_SLIDER,
5, 1, 10,
wxDefaultPosition,
- wxSize(200, -1),
+ wxSize(200, wxDefaultCoord),
wxSL_HORIZONTAL | wxSL_AUTOTICKS);
UpdateInfoText();
wxBoxSizer *sizer2 = new wxBoxSizer(wxVERTICAL);
wxBoxSizer *sizer3 = new wxBoxSizer(wxVERTICAL);
+#if wxUSE_STATLINE
sizer1->Add( new wxStaticLine(panel1, wxID_ANY), 0, wxGROW );
+#endif // wxUSE_STATLINE
sizer1->Add( m_canvas, 1, wxGROW | wxALL, 2 );
+#if wxUSE_STATLINE
sizer1->Add( new wxStaticLine(panel1, wxID_ANY), 0, wxGROW );
+#endif // wxUSE_STATLINE
panel1->SetSizer( sizer1 );
sizer1->Fit( panel1 );
wxInt32 i = XToCell( event.GetX() );
wxInt32 j = YToCell( event.GetY() );
+#if wxUSE_STATUSBAR
// set statusbar text
wxString msg;
msg.Printf(_("Cell: (%d, %d)"), i, j);
((LifeFrame *) wxGetApp().GetTopWindow())->SetStatusText(msg, 1);
+#endif // wxUSE_STATUSBAR
// NOTE that wxMouseEvent::LeftDown() and wxMouseEvent::LeftIsDown()
// have different semantics. The first one is used to signal that the
void LifeCanvas::OnScroll(wxScrollWinEvent& event)
{
- WXTYPE type = event.GetEventType();
+ WXTYPE type = (WXTYPE)event.GetEventType();
int pos = event.GetPosition();
int orient = event.GetOrientation();