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