#pragma once #include "gamebase/GameBase.hpp" #include "ochess.hpp" #include "BaseGameTab.hpp" #include "BaseImportTab.hpp" #include "BaseManageTab.hpp" wxDECLARE_EVENT(NEW_GAME_EVENT, wxCommandEvent); class BaseTab : public TabBase, public TabInfos { /// @brief The opened database std::shared_ptr base; /// @brief The last opened game std::shared_ptr game; /// All sub tabs BaseGameTab *games_tab; BaseImportTab *import_tab; BaseManageTab *manage_tab; std::string base_file; std::shared_ptr glm; void OnOpenGame(wxCommandEvent &event); void OnSave(wxCommandEvent &event); void OpenDatabase(std::string dbpath); public: BaseTab(wxFrame *parent, std::string base_file); void Refresh(); std::shared_ptr GetGame() { return (std::shared_ptr(game)); } std::shared_ptr GetBase() { return (std::shared_ptr(base)); }; };