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
|
|
|
|
// 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:
|
2006-09-05 16:47:48 -04:00
|
|
|
FortyApp(){}
|
|
|
|
virtual ~FortyApp();
|
2018-09-21 13:46:49 -04:00
|
|
|
bool OnInit() wxOVERRIDE;
|
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
|
|
|
};
|
|
|
|
|
2015-04-23 07:49:01 -04:00
|
|
|
wxDECLARE_APP(FortyApp);
|
2004-08-07 16:25:47 -04:00
|
|
|
|
2002-03-21 08:10:17 -05:00
|
|
|
class FortyCanvas;
|
|
|
|
class FortyFrame: public wxFrame
|
|
|
|
{
|
|
|
|
public:
|
2004-10-05 11:38:40 -04:00
|
|
|
FortyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos, const wxSize& size, bool largecards);
|
2018-11-25 14:22:55 -05: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
|
|
|
|
2015-04-23 07:49:01 -04:00
|
|
|
wxDECLARE_EVENT_TABLE();
|
2002-03-21 08:10:17 -05:00
|
|
|
|
|
|
|
private:
|
2004-10-05 11:38:40 -04:00
|
|
|
enum MenuCommands {
|
2005-01-31 13:18:18 -05:00
|
|
|
SCORES = 10,
|
2004-10-05 11:38:40 -04:00
|
|
|
RIGHT_BUTTON_UNDO,
|
|
|
|
HELPING_HAND,
|
2004-06-02 05:14:59 -04:00
|
|
|
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 );
|
2004-10-05 11:38:40 -04:00
|
|
|
|
2002-06-12 09:19:08 -04:00
|
|
|
bool AddControls(wxWindow* parent);
|
|
|
|
};
|
|
|
|
|
|
|
|
#define ID_ABOUT_HTML_WINDOW 1000
|
|
|
|
|
1998-07-24 15:43:32 -04:00
|
|
|
#endif
|