]> git.saurik.com Git - wxWidgets.git/blob - demos/life/dialogs.h
Removed tabs and cleaned up indentations.
[wxWidgets.git] / demos / life / dialogs.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: dialogs.h
3 // Purpose: Life! dialogs
4 // Author: Guillermo Rodriguez Garcia, <guille@iies.es>
5 // Modified by:
6 // Created: Jan/2000
7 // RCS-ID: $Id$
8 // Copyright: (c) 2000, Guillermo Rodriguez Garcia
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _LIFE_DIALOGS_H_
13 #define _LIFE_DIALOGS_H_
14
15 #ifdef __GNUG__
16 #pragma interface "dialogs.h"
17 #endif
18
19 // for compilers that support precompilation, includes "wx/wx.h"
20 #include "wx/wxprec.h"
21
22 #ifdef __BORLANDC__
23 #pragma hdrstop
24 #endif
25
26 // for all others, include the necessary headers
27 #ifndef WX_PRECOMP
28 #include "wx/wx.h"
29 #endif
30
31 #include "wx/spinctrl.h"
32
33 #include "life.h"
34 #include "game.h"
35
36
37 // sample configurations
38 extern LifeShape g_shapes[];
39
40
41 // --------------------------------------------------------------------------
42 // LifeNewGameDialog
43 // --------------------------------------------------------------------------
44
45 class LifeNewGameDialog : public wxDialog
46 {
47 public:
48 // ctor
49 LifeNewGameDialog(wxWindow *parent, int *w, int *h);
50
51 // event handlers
52 void OnOK(wxCommandEvent& event);
53
54 private:
55 // any class wishing to process wxWindows events must use this macro
56 DECLARE_EVENT_TABLE();
57
58 int *m_w;
59 int *m_h;
60 wxSpinCtrl *m_spinctrlw;
61 wxSpinCtrl *m_spinctrlh;
62 };
63
64 // --------------------------------------------------------------------------
65 // LifeSamplesDialog
66 // --------------------------------------------------------------------------
67
68 class LifeSamplesDialog : public wxDialog
69 {
70 public:
71 // ctor and dtor
72 LifeSamplesDialog(wxWindow *parent);
73 ~LifeSamplesDialog();
74
75 // members
76 int GetValue();
77
78 // event handlers
79 void OnListBox(wxCommandEvent &event);
80
81 private:
82 // any class wishing to process wxWindows events must use this macro
83 DECLARE_EVENT_TABLE();
84
85 int m_value;
86 wxListBox *m_list;
87 wxTextCtrl *m_text;
88 LifeCanvas *m_canvas;
89 Life *m_life;
90 };
91
92 #endif // _LIFE_DIALOGS_H_