X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..5f9e369af0c834bbde0f7f5d2047abd736967f58:/demos/life/life.h diff --git a/demos/life/life.h b/demos/life/life.h index 75cd4d23a1..fd9b1bb0b5 100644 --- a/demos/life/life.h +++ b/demos/life/life.h @@ -4,7 +4,6 @@ // Author: Guillermo Rodriguez Garcia, // Modified by: // Created: Jan/2000 -// RCS-ID: $Id$ // Copyright: (c) 2000, Guillermo Rodriguez Garcia // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -12,22 +11,6 @@ #ifndef _LIFE_APP_H_ #define _LIFE_APP_H_ -#ifdef __GNUG__ - #pragma interface "life.h" -#endif - -// for compilers that support precompilation, includes "wx/wx.h" -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ - #pragma hdrstop -#endif - -// for all others, include the necessary headers -#ifndef WX_PRECOMP - #include "wx/wx.h" -#endif - #include "wx/minifram.h" #include "game.h" @@ -44,8 +27,8 @@ class LifeCanvas : public wxWindow { public: // ctor and dtor - LifeCanvas(wxWindow* parent, Life* life, bool interactive = TRUE); - ~LifeCanvas(); + LifeCanvas(wxWindow* parent, Life* life, bool interactive = true); + virtual ~LifeCanvas(); // view management int GetCellSize() const { return m_cellsize; }; @@ -57,7 +40,7 @@ public: void DrawCell(wxInt32 i, wxInt32 j, bool alive); 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() // draw a cell (parametrized by DC) @@ -92,9 +75,9 @@ private: wxInt32 m_viewportY; // first visible cell (y coord) wxInt32 m_viewportW; // number of visible cells (w) wxInt32 m_viewportH; // number of visible cells (h) - int m_thumbX; // horiz. scrollbar thumb position - int m_thumbY; // vert. scrollbar thumb position - wxInt32 m_mi, m_mj; // last mouse position + int m_thumbX; // horiz. scrollbar thumb position + int m_thumbY; // vert. scrollbar thumb position + wxInt32 m_mi, m_mj; // last mouse position }; @@ -109,7 +92,7 @@ public: LifeNavigator(wxWindow *parent); 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() // event handlers @@ -126,14 +109,14 @@ class LifeFrame : public wxFrame public: // ctor and dtor LifeFrame(); - ~LifeFrame(); + virtual ~LifeFrame(); // member functions void UpdateInfoText(); void UpdateUI(); 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() // event handlers @@ -151,7 +134,7 @@ private: void OnStop(); void OnStep(); - Life *m_life; + Life *m_life; LifeCanvas *m_canvas; LifeNavigator *m_navigator; wxStaticText *m_text;