- // Make a menu bar
- wxMenu* gameMenu = new wxMenu;
- gameMenu->Append(NEW_GAME, "&New", "Start a new game");
- gameMenu->Append(SCORES, "&Scores...", "Displays scores");
- gameMenu->Append(EXIT, "E&xit", "Exits Forty Thieves");
-
- wxMenu* editMenu = new wxMenu;
- editMenu->Append(UNDO, "&Undo", "Undo the last move");
- editMenu->Append(REDO, "&Redo", "Redo a move that has been undone");
-
- wxMenu* optionsMenu = new wxMenu;
- optionsMenu->Append(RIGHT_BUTTON_UNDO,
- "&Right button undo",
- "Enables/disables right mouse button undo and redo",
- TRUE
- );
- optionsMenu->Append(HELPING_HAND,
- "&Helping hand",
- "Enables/disables hand cursor when a card can be moved",
- TRUE
- );
- optionsMenu->Append(LARGE_CARDS,
- "&Large cards",
- "Enables/disables large cards for high resolution displays",
- TRUE
- );
- optionsMenu->Check(HELPING_HAND, TRUE);
- optionsMenu->Check(RIGHT_BUTTON_UNDO, TRUE);
- optionsMenu->Check(LARGE_CARDS, largecards ? TRUE : FALSE);
-
- wxMenu* helpMenu = new wxMenu;
- helpMenu->Append(ABOUT, "&About", "Displays program version information");
-
- m_menuBar = new wxMenuBar;
- m_menuBar->Append(gameMenu, "&Game");
- m_menuBar->Append(editMenu, "&Edit");
- m_menuBar->Append(optionsMenu, "&Options");
- m_menuBar->Append(helpMenu, "&Help");
-
- SetMenuBar(m_menuBar);
-
- if (largecards)
- Card::SetScale(1.3);
-
- m_canvas = new FortyCanvas(this, 0, 0, 400, 400);
- wxLayoutConstraints* constr = new wxLayoutConstraints;
- constr->left.SameAs(this, wxLeft);
- constr->top.SameAs(this, wxTop);
- constr->right.SameAs(this, wxRight);
- constr->height.SameAs(this, wxHeight);
- m_canvas->SetConstraints(constr);
-
- CreateStatusBar();
-}
-
-FortyFrame::~FortyFrame()
-{
+ // Make a menu bar
+ wxMenu* gameMenu = new wxMenu;
+ gameMenu->Append(wxID_NEW, wxGetStockLabel(wxID_NEW), _T("Start a new game"));
+ gameMenu->Append(SCORES, _T("&Scores..."), _T("Displays scores"));
+ gameMenu->Append(wxID_EXIT, wxGetStockLabel(wxID_EXIT), _T("Exits Forty Thieves"));
+
+ wxMenu* editMenu = new wxMenu;
+ editMenu->Append(wxID_UNDO, wxGetStockLabel(wxID_UNDO), _T("Undo the last move"));
+ editMenu->Append(wxID_REDO, wxGetStockLabel(wxID_REDO), _T("Redo a move that has been undone"));
+
+ wxMenu* optionsMenu = new wxMenu;
+ optionsMenu->Append(RIGHT_BUTTON_UNDO,
+ _T("&Right button undo"),
+ _T("Enables/disables right mouse button undo and redo"),
+ true
+ );
+ optionsMenu->Append(HELPING_HAND,
+ _T("&Helping hand"),
+ _T("Enables/disables hand cursor when a card can be moved"),
+ true
+ );
+ optionsMenu->Append(LARGE_CARDS,
+ _T("&Large cards"),
+ _T("Enables/disables large cards for high resolution displays"),
+ true
+ );
+ optionsMenu->Check(HELPING_HAND, true);
+ optionsMenu->Check(RIGHT_BUTTON_UNDO, true);
+ optionsMenu->Check(LARGE_CARDS, largecards ? true : false);
+
+ wxMenu* helpMenu = new wxMenu;
+ helpMenu->Append(wxID_HELP_CONTENTS, _T("&Help Contents"), _T("Displays information about playing the game"));
+ helpMenu->Append(wxID_ABOUT, _T("&About..."), _T("About Forty Thieves"));
+
+ m_menuBar = new wxMenuBar;
+ m_menuBar->Append(gameMenu, _T("&Game"));
+ m_menuBar->Append(editMenu, _T("&Edit"));
+ m_menuBar->Append(optionsMenu, _T("&Options"));
+ m_menuBar->Append(helpMenu, _T("&Help"));
+
+ SetMenuBar(m_menuBar);
+
+ if (largecards)
+ Card::SetScale(1.3);
+
+ m_canvas = new FortyCanvas(this, wxDefaultPosition, size);
+
+ wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
+ topsizer->Add( m_canvas, 1, wxEXPAND | wxALL, 0);
+ SetSizer( topsizer );
+
+#if wxUSE_STATUSBAR
+ CreateStatusBar();
+#endif // wxUSE_STATUSBAR
+
+ topsizer->SetSizeHints( this );