]> git.saurik.com Git - wxWidgets.git/blame - demos/forty/forty.h
-1->wxID_ANY, TRUE->true, FALSE->false, wxDefaultPosition replacements
[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
9// Licence: wxWindows licence
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();
63cafd27
JS
21 bool OnInit();
22
79490c3d
VZ
23 static const wxColour& BackgroundColour();
24 static const wxColour& TextColour();
25 static const wxBrush& BackgroundBrush();
63cafd27
JS
26
27private:
28 static wxColour* m_backgroundColour;
29 static wxColour* m_textColour;
30 static wxBrush* m_backgroundBrush;
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);
868741e9
JS
38 virtual ~FortyFrame();
39
40 void OnCloseWindow(wxCloseEvent& event);
41
42 // Menu callbacks
43 void NewGame(wxCommandEvent& event);
44 void Exit(wxCommandEvent& event);
45 void About(wxCommandEvent& event);
0aff9d91 46 void Help(wxCommandEvent& event);
868741e9
JS
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);
53
54 FortyCanvas* GetCanvas() { return m_canvas; }
55
56 DECLARE_EVENT_TABLE()
57
58private:
0aff9d91 59 enum MenuCommands { NEW_GAME = 10, SCORES,
868741e9 60 UNDO, REDO,
0aff9d91
JS
61 RIGHT_BUTTON_UNDO, HELPING_HAND, LARGE_CARDS
62 };
868741e9
JS
63
64 wxMenuBar* m_menuBar;
65 FortyCanvas* m_canvas;
66};
67
5cdeff75
JS
68//----------------------------------------------------------------------------
69// stAboutDialog
70//----------------------------------------------------------------------------
71
72class FortyAboutDialog: public wxDialog
73{
74public:
75 // constructors and destructors
76 FortyAboutDialog( wxWindow *parent, wxWindowID id, const wxString &title,
77 const wxPoint& pos = wxDefaultPosition,
78 const wxSize& size = wxDefaultSize,
79 long style = wxDEFAULT_DIALOG_STYLE );
80
81 bool AddControls(wxWindow* parent);
82
83private:
84 DECLARE_EVENT_TABLE()
85};
86
87#define ID_ABOUT_HTML_WINDOW 1000
88
63cafd27 89#endif