2022-02-26 12:30:07 +01:00
|
|
|
#pragma once
|
|
|
|
|
2022-02-24 10:18:02 +01:00
|
|
|
#include "base_tab/BaseTab.hpp"
|
2022-02-24 16:45:28 +01:00
|
|
|
#include "game_tab/GameTab.hpp"
|
2022-02-23 18:11:55 +01:00
|
|
|
#include "ochess.hpp"
|
|
|
|
#include <wx/aui/auibook.h>
|
|
|
|
#include <wx/filedlg.h>
|
2022-02-23 19:41:50 +01:00
|
|
|
#include <wx/preferences.h>
|
2022-02-24 16:45:28 +01:00
|
|
|
#include <wx/textdlg.h>
|
2022-02-23 18:11:55 +01:00
|
|
|
|
|
|
|
wxDECLARE_EVENT(REFRESH_TAB_TITLE, wxCommandEvent);
|
2022-02-24 16:45:28 +01:00
|
|
|
wxDECLARE_EVENT(NEW_GAME_EVENT, wxCommandEvent);
|
2022-02-26 20:34:42 +01:00
|
|
|
wxDECLARE_EVENT(CLOSE_TAB_EVENT, wxCommandEvent);
|
2022-02-23 18:11:55 +01:00
|
|
|
|
|
|
|
class MainWindow : public wxFrame {
|
|
|
|
wxAuiNotebook *notebook;
|
|
|
|
wxMenu *menuGame;
|
|
|
|
wxMenuBar *menuBar;
|
2022-02-23 19:41:50 +01:00
|
|
|
wxPreferencesEditor *prefsEditor;
|
2022-02-23 18:11:55 +01:00
|
|
|
|
|
|
|
void OnExit(wxCommandEvent &event);
|
2022-02-23 19:41:50 +01:00
|
|
|
void OnClose(wxCloseEvent &e);
|
2022-02-24 21:10:29 +01:00
|
|
|
void OnMenuNewGame(wxCommandEvent &event);
|
2022-02-23 18:11:55 +01:00
|
|
|
void OnNewGame(wxCommandEvent &event);
|
|
|
|
void OnOpen(wxCommandEvent &event);
|
|
|
|
void OnPageChange(wxAuiNotebookEvent &event);
|
|
|
|
void OnRefreshTabTitle(wxCommandEvent &event);
|
|
|
|
void NewGame(Game *game);
|
|
|
|
void OnSettings(wxCommandEvent &event);
|
2022-02-26 19:21:52 +01:00
|
|
|
void OnNewEngine(wxCommandEvent &event);
|
2022-02-26 20:34:42 +01:00
|
|
|
void OnCloseTabEvent(wxCommandEvent &event);
|
2022-02-23 18:11:55 +01:00
|
|
|
|
|
|
|
public:
|
|
|
|
MainWindow();
|
|
|
|
void ApplyPreferences();
|
2022-02-26 12:30:07 +01:00
|
|
|
std::vector<TabInfos*> ListTabInfos();
|
2022-02-23 18:11:55 +01:00
|
|
|
};
|