]>
Commit | Line | Data |
---|---|---|
63cafd27 JS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: canvas.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 _CANVAS_H_ | |
14 | #define _CANVAS_H_ | |
15 | ||
16 | class Card; | |
17 | class Game; | |
18 | class ScoreFile; | |
19 | class PlayerSelectionDialog; | |
20 | ||
21 | class FortyCanvas: public wxScrolledWindow | |
22 | { | |
23 | public: | |
010216e3 WS |
24 | FortyCanvas(wxWindow* parent, const wxPoint& pos, const wxSize& size); |
25 | virtual ~FortyCanvas(); | |
63cafd27 | 26 | |
010216e3 WS |
27 | virtual void OnDraw(wxDC& dc); |
28 | bool OnCloseCanvas(); | |
29 | void OnMouseEvent(wxMouseEvent& event); | |
30 | void SetCursorStyle(int x, int y); | |
63cafd27 | 31 | |
010216e3 WS |
32 | void NewGame(); |
33 | void Undo(); | |
34 | void Redo(); | |
63cafd27 | 35 | |
010216e3 WS |
36 | ScoreFile* GetScoreFile() const { return m_scoreFile; } |
37 | void UpdateScores(); | |
38 | void EnableHelpingHand(bool enable) { m_helpingHand = enable; } | |
39 | void EnableRightButtonUndo(bool enable) { m_rightBtnUndo = enable; } | |
40 | void LayoutGame(); | |
41 | void ShowPlayerDialog(); | |
63cafd27 | 42 | |
010216e3 | 43 | DECLARE_EVENT_TABLE() |
63cafd27 JS |
44 | |
45 | private: | |
010216e3 WS |
46 | wxFont* m_font; |
47 | Game* m_game; | |
48 | ScoreFile* m_scoreFile; | |
49 | wxCursor* m_arrowCursor; | |
50 | wxCursor* m_handCursor; | |
51 | bool m_helpingHand; | |
52 | bool m_rightBtnUndo; | |
53 | wxString m_player; | |
54 | PlayerSelectionDialog* m_playerDialog; | |
55 | bool m_leftBtnDown; | |
63cafd27 JS |
56 | }; |
57 | ||
58 | #endif |