1998-07-24 19:43:32 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: forty.h
|
|
|
|
// Purpose: Forty Thieves patience game
|
|
|
|
// Author: Chris Breeze
|
|
|
|
// Modified by:
|
|
|
|
// Created: 21/07/97
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) 1993-1998 Chris Breeze
|
2004-06-02 09:14:59 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-07-24 19:43:32 +00:00
|
|
|
//---------------------------------------------------------------------------
|
2004-05-25 11:20:37 +00:00
|
|
|
// Last modified: 22nd July 1998 - ported to wxWidgets 2.0
|
1998-07-24 19:43:32 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef _FORTY_H_
|
|
|
|
#define _FORTY_H_
|
|
|
|
|
|
|
|
class FortyApp: public wxApp
|
|
|
|
{
|
|
|
|
public:
|
2004-10-05 15:38:40 +00:00
|
|
|
FortyApp(){};
|
2002-04-07 21:12:45 +00:00
|
|
|
~FortyApp();
|
2004-06-02 09:14:59 +00:00
|
|
|
bool OnInit();
|
1998-07-24 19:43:32 +00:00
|
|
|
|
2004-06-02 09:14:59 +00:00
|
|
|
static const wxColour& BackgroundColour();
|
|
|
|
static const wxColour& TextColour();
|
|
|
|
static const wxBrush& BackgroundBrush();
|
2004-08-07 21:59:45 +00:00
|
|
|
const wxString& GetHelpFile() const { return m_helpFile; }
|
1998-07-24 19:43:32 +00:00
|
|
|
|
|
|
|
private:
|
2004-06-02 09:14:59 +00:00
|
|
|
static wxColour* m_backgroundColour;
|
|
|
|
static wxColour* m_textColour;
|
|
|
|
static wxBrush* m_backgroundBrush;
|
2004-08-07 21:59:45 +00:00
|
|
|
wxString m_helpFile;
|
1998-07-24 19:43:32 +00:00
|
|
|
};
|
|
|
|
|
2004-08-07 20:25:47 +00:00
|
|
|
DECLARE_APP(FortyApp)
|
|
|
|
|
2002-03-21 13:10:17 +00:00
|
|
|
class FortyCanvas;
|
|
|
|
class FortyFrame: public wxFrame
|
|
|
|
{
|
|
|
|
public:
|
2004-10-05 15:38:40 +00:00
|
|
|
FortyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos, const wxSize& size, bool largecards);
|
|
|
|
virtual ~FortyFrame(){};
|
2002-03-21 13:10:17 +00:00
|
|
|
|
2004-06-02 09:14:59 +00:00
|
|
|
void OnCloseWindow(wxCloseEvent& event);
|
2002-03-21 13:10:17 +00:00
|
|
|
|
2004-06-02 09:14:59 +00:00
|
|
|
// Menu callbacks
|
|
|
|
void NewGame(wxCommandEvent& event);
|
|
|
|
void Exit(wxCommandEvent& event);
|
|
|
|
void About(wxCommandEvent& event);
|
|
|
|
void Help(wxCommandEvent& event);
|
|
|
|
void Undo(wxCommandEvent& event);
|
|
|
|
void Redo(wxCommandEvent& event);
|
|
|
|
void Scores(wxCommandEvent& event);
|
|
|
|
void ToggleRightButtonUndo(wxCommandEvent& event);
|
|
|
|
void ToggleHelpingHand(wxCommandEvent& event);
|
|
|
|
void ToggleCardSize(wxCommandEvent& event);
|
2002-03-21 13:10:17 +00:00
|
|
|
|
2004-06-02 09:14:59 +00:00
|
|
|
FortyCanvas* GetCanvas() { return m_canvas; }
|
2002-03-21 13:10:17 +00:00
|
|
|
|
2004-06-02 09:14:59 +00:00
|
|
|
DECLARE_EVENT_TABLE()
|
2002-03-21 13:10:17 +00:00
|
|
|
|
|
|
|
private:
|
2004-10-05 15:38:40 +00:00
|
|
|
enum MenuCommands {
|
2005-01-31 18:18:18 +00:00
|
|
|
SCORES = 10,
|
2004-10-05 15:38:40 +00:00
|
|
|
RIGHT_BUTTON_UNDO,
|
|
|
|
HELPING_HAND,
|
2004-06-02 09:14:59 +00:00
|
|
|
LARGE_CARDS
|
|
|
|
};
|
2002-03-21 13:10:17 +00:00
|
|
|
|
2004-06-02 09:14:59 +00:00
|
|
|
wxMenuBar* m_menuBar;
|
|
|
|
FortyCanvas* m_canvas;
|
2002-03-21 13:10:17 +00:00
|
|
|
};
|
|
|
|
|
2002-06-12 13:19:08 +00:00
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
// stAboutDialog
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class FortyAboutDialog: public wxDialog
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
// constructors and destructors
|
|
|
|
FortyAboutDialog( wxWindow *parent, wxWindowID id, const wxString &title,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxDEFAULT_DIALOG_STYLE );
|
2004-10-05 15:38:40 +00:00
|
|
|
|
2002-06-12 13:19:08 +00:00
|
|
|
bool AddControls(wxWindow* parent);
|
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
|
|
|
|
|
|
|
#define ID_ABOUT_HTML_WINDOW 1000
|
|
|
|
|
1998-07-24 19:43:32 +00:00
|
|
|
#endif
|