ochess/src/MainWindow.hpp
2023-02-01 21:15:11 +01:00

39 lines
No EOL
1.2 KiB
C++

#pragma once
#include "base_tab/BaseTab.hpp"
#include "game_tab/GameTab.hpp"
#include <wx/aui/auibook.h>
#include <wx/filedlg.h>
#include <wx/preferences.h>
#include <wx/textdlg.h>
#include "config.h"
wxDECLARE_EVENT(REFRESH_TAB_TITLE, wxCommandEvent);
wxDECLARE_EVENT(NEW_GAME_EVENT, wxCommandEvent);
wxDECLARE_EVENT(CLOSE_TAB_EVENT, wxCommandEvent);
wxDECLARE_EVENT(REFRESH_ENGINE_LIST, wxCommandEvent);
wxDECLARE_EVENT(CLOSE_LINKED_TAB, wxCommandEvent);
class MainWindow : public MainFrame {
wxPreferencesEditor *prefsEditor;
wxMenu *manageMenu;
void OnClose(wxCloseEvent &e);
void NewGame(bool useFen);
void OnPageChange(wxAuiNotebookEvent &event);
void OnRefreshTabTitle(wxCommandEvent &event);
void OpenSettings();
void NewEngine();
void OnCloseTabEvent(wxCommandEvent &event);
void OnRefreshEngineList(wxCommandEvent &event);
void OnMenuItemClick(wxCommandEvent &event);
void OnAuiNotebookPageClosed(wxAuiNotebookEvent& event);
void OnAuiNotebookPageCheck(wxAuiNotebookEvent& event);
void OnCloseTabLinkedTo(wxCommandEvent &event);
void AddPage(wxWindow* window, TabInfos* infos);
void ShowAbout();
public:
MainWindow();
TabInfos* NewGame(std::shared_ptr<Game> game);
void ApplyPreferences();
};