]> git.saurik.com Git - wxWidgets.git/blame - demos/forty/canvas.h
wxMSW: return correct value from wxMessageDialog::GetReturnCode().
[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
63cafd27 7// Copyright: (c) 1993-1998 Chris Breeze
010216e3 8// Licence: wxWindows licence
63cafd27 9//---------------------------------------------------------------------------
be5a51fb 10// Last modified: 22nd July 1998 - ported to wxWidgets 2.0
63cafd27
JS
11/////////////////////////////////////////////////////////////////////////////
12#ifndef _CANVAS_H_
13#define _CANVAS_H_
14
15class Card;
16class Game;
17class ScoreFile;
18class PlayerSelectionDialog;
19
20class FortyCanvas: public wxScrolledWindow
21{
22public:
010216e3
WS
23 FortyCanvas(wxWindow* parent, const wxPoint& pos, const wxSize& size);
24 virtual ~FortyCanvas();
63cafd27 25
010216e3
WS
26 virtual void OnDraw(wxDC& dc);
27 bool OnCloseCanvas();
28 void OnMouseEvent(wxMouseEvent& event);
29 void SetCursorStyle(int x, int y);
63cafd27 30
010216e3
WS
31 void NewGame();
32 void Undo();
33 void Redo();
63cafd27 34
010216e3
WS
35 ScoreFile* GetScoreFile() const { return m_scoreFile; }
36 void UpdateScores();
37 void EnableHelpingHand(bool enable) { m_helpingHand = enable; }
38 void EnableRightButtonUndo(bool enable) { m_rightBtnUndo = enable; }
39 void LayoutGame();
40 void ShowPlayerDialog();
63cafd27 41
010216e3 42 DECLARE_EVENT_TABLE()
63cafd27
JS
43
44private:
010216e3
WS
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;
63cafd27
JS
55};
56
57#endif