]>
git.saurik.com Git - wxWidgets.git/blob - demos/forty/forty.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Forty Thieves patience game
4 // Author: Chris Breeze
8 // Copyright: (c) 1993-1998 Chris Breeze
9 // Licence: wxWindows licence
10 //---------------------------------------------------------------------------
11 // Last modified: 22nd July 1998 - ported to wxWindows 2.0
12 /////////////////////////////////////////////////////////////////////////////
16 class FortyApp
: public wxApp
23 static const wxColour
& BackgroundColour();
24 static const wxColour
& TextColour();
25 static const wxBrush
& BackgroundBrush();
28 static wxColour
* m_backgroundColour
;
29 static wxColour
* m_textColour
;
30 static wxBrush
* m_backgroundBrush
;
34 class FortyFrame
: public wxFrame
37 FortyFrame(wxFrame
* frame
, char* title
, int x
, int y
, int w
, int h
,bool largecards
);
38 virtual ~FortyFrame();
40 void OnCloseWindow(wxCloseEvent
& event
);
43 void NewGame(wxCommandEvent
& event
);
44 void Exit(wxCommandEvent
& event
);
45 void About(wxCommandEvent
& event
);
46 void Undo(wxCommandEvent
& event
);
47 void Redo(wxCommandEvent
& event
);
48 void Scores(wxCommandEvent
& event
);
49 void ToggleRightButtonUndo(wxCommandEvent
& event
);
50 void ToggleHelpingHand(wxCommandEvent
& event
);
51 void ToggleCardSize(wxCommandEvent
& event
);
53 FortyCanvas
* GetCanvas() { return m_canvas
; }
58 enum MenuCommands
{ NEW_GAME
= 10, SCORES
, EXIT
,
60 RIGHT_BUTTON_UNDO
, HELPING_HAND
, LARGE_CARDS
,
64 FortyCanvas
* m_canvas
;
67 //----------------------------------------------------------------------------
69 //----------------------------------------------------------------------------
71 class FortyAboutDialog
: public wxDialog
74 // constructors and destructors
75 FortyAboutDialog( wxWindow
*parent
, wxWindowID id
, const wxString
&title
,
76 const wxPoint
& pos
= wxDefaultPosition
,
77 const wxSize
& size
= wxDefaultSize
,
78 long style
= wxDEFAULT_DIALOG_STYLE
);
80 bool AddControls(wxWindow
* parent
);
86 #define ID_ABOUT_HTML_WINDOW 1000