ochess/src/MainWindow.hpp

35 lines
949 B
C++
Raw Normal View History

2022-02-26 12:30:07 +01:00
#pragma once
2022-02-24 10:18:02 +01:00
#include "base_tab/BaseTab.hpp"
#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>
#include <wx/textdlg.h>
2022-02-23 18:11:55 +01:00
wxDECLARE_EVENT(REFRESH_TAB_TITLE, wxCommandEvent);
wxDECLARE_EVENT(NEW_GAME_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-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
};