]> git.saurik.com Git - wxWidgets.git/blame - demos/forty/forty.h
fix wxMSW build after wxBrush changes: return wxBRUSHSTYLE_MAX instead of zero; fix...
[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:
d3c7fc99
VZ
19 FortyApp(){}
20 virtual ~FortyApp();
010216e3 21 bool OnInit();
63cafd27 22
010216e3
WS
23 static const wxColour& BackgroundColour();
24 static const wxColour& TextColour();
25 static const wxBrush& BackgroundBrush();
236d7be3 26 const wxString& GetHelpFile() const { return m_helpFile; }
63cafd27
JS
27
28private:
010216e3
WS
29 static wxColour* m_backgroundColour;
30 static wxColour* m_textColour;
31 static wxBrush* m_backgroundBrush;
236d7be3 32 wxString m_helpFile;
63cafd27
JS
33};
34
8cb0cbea
JS
35DECLARE_APP(FortyApp)
36
868741e9
JS
37class FortyCanvas;
38class FortyFrame: public wxFrame
39{
40public:
254a2129
WS
41 FortyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos, const wxSize& size, bool largecards);
42 virtual ~FortyFrame(){};
868741e9 43
010216e3 44 void OnCloseWindow(wxCloseEvent& event);
868741e9 45
010216e3
WS
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);
868741e9 57
010216e3 58 FortyCanvas* GetCanvas() { return m_canvas; }
868741e9 59
010216e3 60 DECLARE_EVENT_TABLE()
868741e9
JS
61
62private:
254a2129 63 enum MenuCommands {
5d2ac6b8 64 SCORES = 10,
254a2129
WS
65 RIGHT_BUTTON_UNDO,
66 HELPING_HAND,
010216e3
WS
67 LARGE_CARDS
68 };
868741e9 69
010216e3
WS
70 wxMenuBar* m_menuBar;
71 FortyCanvas* m_canvas;
868741e9
JS
72};
73
5cdeff75
JS
74//----------------------------------------------------------------------------
75// stAboutDialog
76//----------------------------------------------------------------------------
77
78class FortyAboutDialog: public wxDialog
79{
80public:
81 // constructors and destructors
82 FortyAboutDialog( wxWindow *parent, wxWindowID id, const wxString &title,
83 const wxPoint& pos = wxDefaultPosition,
84 const wxSize& size = wxDefaultSize,
85 long style = wxDEFAULT_DIALOG_STYLE );
254a2129 86
5cdeff75 87 bool AddControls(wxWindow* parent);
5cdeff75
JS
88};
89
90#define ID_ABOUT_HTML_WINDOW 1000
91
63cafd27 92#endif