]> git.saurik.com Git - wxWidgets.git/blame - demos/forty/forty.h
wxUSE_STATLINE fixes.
[wxWidgets.git] / demos / forty / forty.h
CommitLineData
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
7// RCS-ID: $Id$
8// Copyright: (c) 1993-1998 Chris Breeze
010216e3 9// Licence: wxWindows licence
63cafd27 10//---------------------------------------------------------------------------
be5a51fb 11// Last modified: 22nd July 1998 - ported to wxWidgets 2.0
63cafd27
JS
12/////////////////////////////////////////////////////////////////////////////
13#ifndef _FORTY_H_
14#define _FORTY_H_
15
16class FortyApp: public wxApp
17{
18public:
15bee36f
JS
19 FortyApp();
20 ~FortyApp();
010216e3 21 bool OnInit();
63cafd27 22
010216e3
WS
23 static const wxColour& BackgroundColour();
24 static const wxColour& TextColour();
25 static const wxBrush& BackgroundBrush();
63cafd27
JS
26
27private:
010216e3
WS
28 static wxColour* m_backgroundColour;
29 static wxColour* m_textColour;
30 static wxBrush* m_backgroundBrush;
63cafd27
JS
31};
32
868741e9
JS
33class FortyCanvas;
34class FortyFrame: public wxFrame
35{
36public:
e0b5519a 37 FortyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos, const wxSize& size, bool largecards);
010216e3 38 virtual ~FortyFrame();
868741e9 39
010216e3 40 void OnCloseWindow(wxCloseEvent& event);
868741e9 41
010216e3
WS
42 // Menu callbacks
43 void NewGame(wxCommandEvent& event);
44 void Exit(wxCommandEvent& event);
45 void About(wxCommandEvent& event);
46 void Help(wxCommandEvent& event);
47 void Undo(wxCommandEvent& event);
48 void Redo(wxCommandEvent& event);
49 void Scores(wxCommandEvent& event);
50 void ToggleRightButtonUndo(wxCommandEvent& event);
51 void ToggleHelpingHand(wxCommandEvent& event);
52 void ToggleCardSize(wxCommandEvent& event);
868741e9 53
010216e3 54 FortyCanvas* GetCanvas() { return m_canvas; }
868741e9 55
010216e3 56 DECLARE_EVENT_TABLE()
868741e9
JS
57
58private:
010216e3
WS
59 enum MenuCommands {
60 NEW_GAME = 10,
61 SCORES,
62 UNDO,
63 REDO,
64 RIGHT_BUTTON_UNDO,
65 HELPING_HAND,
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
77class FortyAboutDialog: public wxDialog
78{
79public:
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 );
85
86 bool AddControls(wxWindow* parent);
87
88private:
89 DECLARE_EVENT_TABLE()
90};
91
92#define ID_ABOUT_HTML_WINDOW 1000
93
63cafd27 94#endif