]> git.saurik.com Git - wxWidgets.git/blob - demos/forty/forty.h
wx/math.h integration
[wxWidgets.git] / demos / forty / forty.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: forty.h
3 // Purpose: Forty Thieves patience game
4 // Author: Chris Breeze
5 // Modified by:
6 // Created: 21/07/97
7 // RCS-ID: $Id$
8 // Copyright: (c) 1993-1998 Chris Breeze
9 // Licence: wxWindows licence
10 //---------------------------------------------------------------------------
11 // Last modified: 22nd July 1998 - ported to wxWidgets 2.0
12 /////////////////////////////////////////////////////////////////////////////
13 #ifndef _FORTY_H_
14 #define _FORTY_H_
15
16 class FortyApp: public wxApp
17 {
18 public:
19 FortyApp(){};
20 ~FortyApp();
21 bool OnInit();
22
23 static const wxColour& BackgroundColour();
24 static const wxColour& TextColour();
25 static const wxBrush& BackgroundBrush();
26 const wxString& GetHelpFile() const { return m_helpFile; }
27
28 private:
29 static wxColour* m_backgroundColour;
30 static wxColour* m_textColour;
31 static wxBrush* m_backgroundBrush;
32 wxString m_helpFile;
33 };
34
35 DECLARE_APP(FortyApp)
36
37 class FortyCanvas;
38 class FortyFrame: public wxFrame
39 {
40 public:
41 FortyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos, const wxSize& size, bool largecards);
42 virtual ~FortyFrame(){};
43
44 void OnCloseWindow(wxCloseEvent& event);
45
46 // Menu callbacks
47 void NewGame(wxCommandEvent& event);
48 void Exit(wxCommandEvent& event);
49 void About(wxCommandEvent& event);
50 void Help(wxCommandEvent& event);
51 void Undo(wxCommandEvent& event);
52 void Redo(wxCommandEvent& event);
53 void Scores(wxCommandEvent& event);
54 void ToggleRightButtonUndo(wxCommandEvent& event);
55 void ToggleHelpingHand(wxCommandEvent& event);
56 void ToggleCardSize(wxCommandEvent& event);
57
58 FortyCanvas* GetCanvas() { return m_canvas; }
59
60 DECLARE_EVENT_TABLE()
61
62 private:
63 enum MenuCommands {
64 NEW_GAME = 10,
65 SCORES,
66 UNDO,
67 REDO,
68 RIGHT_BUTTON_UNDO,
69 HELPING_HAND,
70 LARGE_CARDS
71 };
72
73 wxMenuBar* m_menuBar;
74 FortyCanvas* m_canvas;
75 };
76
77 //----------------------------------------------------------------------------
78 // stAboutDialog
79 //----------------------------------------------------------------------------
80
81 class FortyAboutDialog: public wxDialog
82 {
83 public:
84 // constructors and destructors
85 FortyAboutDialog( wxWindow *parent, wxWindowID id, const wxString &title,
86 const wxPoint& pos = wxDefaultPosition,
87 const wxSize& size = wxDefaultSize,
88 long style = wxDEFAULT_DIALOG_STYLE );
89
90 bool AddControls(wxWindow* parent);
91
92 private:
93 DECLARE_EVENT_TABLE()
94 };
95
96 #define ID_ABOUT_HTML_WINDOW 1000
97
98 #endif