1998-07-24 15:43:32 -04: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 05:14:59 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-07-24 15:43:32 -04:00
|
|
|
//---------------------------------------------------------------------------
|
2004-05-25 07:20:37 -04:00
|
|
|
// Last modified: 22nd July 1998 - ported to wxWidgets 2.0
|
1998-07-24 15:43:32 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef _FORTY_H_
|
|
|
|
#define _FORTY_H_
|
|
|
|
|
|
|
|
class FortyApp: public wxApp
|
|
|
|
{
|
|
|
|
public:
|
2002-04-07 17:12:45 -04:00
|
|
|
FortyApp();
|
|
|
|
~FortyApp();
|
2004-06-02 05:14:59 -04:00
|
|
|
bool OnInit();
|
1998-07-24 15:43:32 -04:00
|
|
|
|
2004-06-02 05:14:59 -04:00
|
|
|
static const wxColour& BackgroundColour();
|
|
|
|
static const wxColour& TextColour();
|
|
|
|
static const wxBrush& BackgroundBrush();
|
2004-08-07 17:59:45 -04:00
|
|
|
const wxString& GetHelpFile() const { return m_helpFile; }
|
1998-07-24 15:43:32 -04:00
|
|
|
|
|
|
|
private:
|
2004-06-02 05:14:59 -04:00
|
|
|
static wxColour* m_backgroundColour;
|
|
|
|
static wxColour* m_textColour;
|
|
|
|
static wxBrush* m_backgroundBrush;
|
2004-08-07 17:59:45 -04:00
|
|
|
wxString m_helpFile;
|
1998-07-24 15:43:32 -04:00
|
|
|
};
|
|
|
|
|
2004-08-07 16:25:47 -04:00
|
|
|
DECLARE_APP(FortyApp)
|
|
|
|
|
2002-03-21 08:10:17 -05:00
|
|
|
class FortyCanvas;
|
|
|
|
class FortyFrame: public wxFrame
|
|
|
|
{
|
|
|
|
public:
|
2004-03-23 16:23:17 -05:00
|
|
|
FortyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos, const wxSize& size, bool largecards);
|
2004-06-02 05:14:59 -04:00
|
|
|
virtual ~FortyFrame();
|
2002-03-21 08:10:17 -05:00
|
|
|
|
2004-06-02 05:14:59 -04:00
|
|
|
void OnCloseWindow(wxCloseEvent& event);
|
2002-03-21 08:10:17 -05:00
|
|
|
|
2004-06-02 05:14:59 -04: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 08:10:17 -05:00
|
|
|
|
2004-06-02 05:14:59 -04:00
|
|
|
FortyCanvas* GetCanvas() { return m_canvas; }
|
2002-03-21 08:10:17 -05:00
|
|
|
|
2004-06-02 05:14:59 -04:00
|
|
|
DECLARE_EVENT_TABLE()
|
2002-03-21 08:10:17 -05:00
|
|
|
|
|
|
|
private:
|
2004-06-02 05:14:59 -04:00
|
|
|
enum MenuCommands {
|
|
|
|
NEW_GAME = 10,
|
|
|
|
SCORES,
|
|
|
|
UNDO,
|
|
|
|
REDO,
|
|
|
|
RIGHT_BUTTON_UNDO,
|
|
|
|
HELPING_HAND,
|
|
|
|
LARGE_CARDS
|
|
|
|
};
|
2002-03-21 08:10:17 -05:00
|
|
|
|
2004-06-02 05:14:59 -04:00
|
|
|
wxMenuBar* m_menuBar;
|
|
|
|
FortyCanvas* m_canvas;
|
2002-03-21 08:10:17 -05:00
|
|
|
};
|
|
|
|
|
2002-06-12 09:19:08 -04: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 );
|
|
|
|
|
|
|
|
bool AddControls(wxWindow* parent);
|
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
|
|
|
|
|
|
|
#define ID_ABOUT_HTML_WINDOW 1000
|
|
|
|
|
1998-07-24 15:43:32 -04:00
|
|
|
#endif
|