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 <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>
|
2023-01-02 12:43:46 +01:00
|
|
|
#include "config.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-26 21:43:09 +01:00
|
|
|
wxDECLARE_EVENT(REFRESH_ENGINE_LIST, wxCommandEvent);
|
2022-12-24 22:30:20 +01:00
|
|
|
wxDECLARE_EVENT(CLOSE_LINKED_TAB, wxCommandEvent);
|
2022-02-23 18:11:55 +01:00
|
|
|
|
2022-02-28 15:27:51 +01:00
|
|
|
class MainWindow : public MainFrame {
|
2022-02-23 19:41:50 +01:00
|
|
|
wxPreferencesEditor *prefsEditor;
|
2022-02-26 21:43:09 +01:00
|
|
|
wxMenu *manageMenu;
|
2022-02-23 18:11:55 +01:00
|
|
|
|
2022-02-23 19:41:50 +01:00
|
|
|
void OnClose(wxCloseEvent &e);
|
2022-02-26 21:43:09 +01:00
|
|
|
void NewGame(bool useFen);
|
2022-02-23 18:11:55 +01:00
|
|
|
void OnPageChange(wxAuiNotebookEvent &event);
|
|
|
|
void OnRefreshTabTitle(wxCommandEvent &event);
|
2022-02-26 21:43:09 +01:00
|
|
|
void OpenSettings();
|
|
|
|
void NewEngine();
|
2022-02-26 20:34:42 +01:00
|
|
|
void OnCloseTabEvent(wxCommandEvent &event);
|
2022-02-26 21:43:09 +01:00
|
|
|
void OnRefreshEngineList(wxCommandEvent &event);
|
|
|
|
void OnMenuItemClick(wxCommandEvent &event);
|
2022-12-25 19:30:23 +01:00
|
|
|
void OnAuiNotebookPageClosed(wxAuiNotebookEvent& event);
|
2022-12-31 20:25:12 +01:00
|
|
|
void OnAuiNotebookPageCheck(wxAuiNotebookEvent& event);
|
2022-12-24 22:30:20 +01:00
|
|
|
void OnCloseTabLinkedTo(wxCommandEvent &event);
|
2022-12-24 14:01:39 +01:00
|
|
|
void AddPage(wxWindow* window, TabInfos* infos);
|
2023-02-01 21:15:11 +01:00
|
|
|
void ShowAbout();
|
2022-02-23 18:11:55 +01:00
|
|
|
public:
|
|
|
|
MainWindow();
|
2022-12-27 18:33:21 +01:00
|
|
|
TabInfos* NewGame(std::shared_ptr<Game> game);
|
2022-02-23 18:11:55 +01:00
|
|
|
void ApplyPreferences();
|
|
|
|
};
|