#pragma once #include "ChessArbiter.hpp" #include "Game.hpp" #include "HalfMove.hpp" #include "left_panel/GameTabLeftPanel.hpp" #include "right_panel/GameTabRightPanel.hpp" #include "ochess.hpp" #include #include #include #include #include "right_panel/LiveEngineDialog.hpp" wxDECLARE_EVENT(REFRESH_TAB_TITLE, wxCommandEvent); wxDECLARE_EVENT(GAME_CHANGE, wxCommandEvent); wxDECLARE_EVENT(SHOW_ENGINE_EVALUATION, wxCommandEvent); /** * @brief Main tab for opened games. Contains GameTabLeftPanel and GameTabRightPanel. * */ class GameTab : public wxPanel, public TabInfos { GameTabRightPanel *editor_panel; GameTabLeftPanel *board_panel; std::shared_ptr game; std::string related_file; void RefreshLabel(); void RefreshTabTitle(); void OnGameChange(wxCommandEvent &event); public: GameTab(wxFrame *parent, std::shared_ptr game); void ApplyPreferences(); std::shared_ptr GetGame() { return (std::shared_ptr(game)); } std::shared_ptr GetBase() { return nullptr; }; void OnToolClick(wxCommandEvent &event); void OnLink(){board_panel->SetSaveToolEnable(false);}; };