]> git.saurik.com Git - wxWidgets.git/blame - demos/forty/canvas.h
Fixed compilation error.
[wxWidgets.git] / demos / forty / canvas.h
CommitLineData
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
9// Licence: wxWindows licence
10//---------------------------------------------------------------------------
11// Last modified: 22nd July 1998 - ported to wxWindows 2.0
12/////////////////////////////////////////////////////////////////////////////
13#ifndef _CANVAS_H_
14#define _CANVAS_H_
15
16class Card;
17class Game;
18class ScoreFile;
19class PlayerSelectionDialog;
20
21class FortyCanvas: public wxScrolledWindow
22{
23public:
24 FortyCanvas(wxWindow* parent, int x, int y, int w, int h);
25 virtual ~FortyCanvas();
26
27 virtual void OnDraw(wxDC& dc);
e3065973 28 bool OnCloseCanvas();
63cafd27
JS
29 void OnMouseEvent(wxMouseEvent& event);
30 void SetCursorStyle(int x, int y);
31
32 void NewGame();
33 void Undo();
34 void Redo();
35
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; }
fc799548 40 void LayoutGame();
63cafd27
JS
41
42 DECLARE_EVENT_TABLE()
43
44private:
45 wxFont* m_font;
46 Game* m_game;
47 ScoreFile* m_scoreFile;
48 wxCursor* m_arrowCursor;
49 wxCursor* m_handCursor;
50 bool m_helpingHand;
51 bool m_rightBtnUndo;
52 wxString m_player;
53 PlayerSelectionDialog* m_playerDialog;
54 bool m_leftBtnDown;
55};
56
57#endif