aboutsummaryrefslogtreecommitdiff
path: root/src/MainWindow.hpp
blob: 0faa556ae1ee5a2732e34b38b892494da00ebe4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "base_tab/BaseTab.hpp"
#include "game_tab/GameTab.hpp"
#include "ochess.hpp"
#include <wx/aui/auibook.h>
#include <wx/filedlg.h>
#include <wx/preferences.h>
#include <wx/textdlg.h>

wxDECLARE_EVENT(REFRESH_TAB_TITLE, wxCommandEvent);
wxDECLARE_EVENT(NEW_GAME_EVENT, wxCommandEvent);

class MainWindow : public wxFrame {
  wxAuiNotebook *notebook;
  wxMenu *menuGame;
  wxMenuBar *menuBar;
  wxPreferencesEditor *prefsEditor;

  void OnExit(wxCommandEvent &event);
  void OnClose(wxCloseEvent &e);
  void OnMenuNewGame(wxCommandEvent &event);
  void OnNewGame(wxCommandEvent &event);
  void OnOpen(wxCommandEvent &event);
  void OnPageChange(wxAuiNotebookEvent &event);
  void OnRefreshTabTitle(wxCommandEvent &event);
  void NewGame(Game *game);
  void OnSettings(wxCommandEvent &event);

public:
  MainWindow();
  void ApplyPreferences();
};