ochess/src/base_tab/BaseTab.hpp

26 lines
706 B
C++
Raw Normal View History

2022-02-24 10:18:02 +01:00
2022-02-24 11:50:16 +01:00
#include "gamebase/GameBase.hpp"
2022-02-24 15:22:56 +01:00
#include "ochess.hpp"
2022-12-23 16:49:33 +01:00
#include "BaseGameTab.hpp"
#include "BaseImportTab.hpp"
2022-12-23 18:23:05 +01:00
#include "BaseManageTab.hpp"
2022-02-24 10:18:02 +01:00
2022-12-24 12:46:59 +01:00
wxDECLARE_EVENT(NEW_GAME_EVENT, wxCommandEvent);
2022-12-23 16:49:33 +01:00
class BaseTab : public TabBase, public TabInfos {
2022-02-28 20:30:57 +01:00
std::shared_ptr<GameBase> base;
2022-12-24 12:46:59 +01:00
std::shared_ptr<Game> game;
2022-12-23 16:49:33 +01:00
BaseGameTab *games_tab;
BaseImportTab *import_tab;
2022-12-24 12:46:59 +01:00
BaseManageTab *manage_tab;
void OnNewGame(wxCommandEvent &event);
2022-02-24 10:18:02 +01:00
public:
2022-02-25 09:21:26 +01:00
BaseTab(wxFrame *parent, std::string base_file);
2022-02-28 20:30:57 +01:00
2022-02-24 11:50:16 +01:00
void ApplyPreferences();
2022-12-23 16:49:33 +01:00
void RefreshLabel();
2022-12-24 12:46:59 +01:00
std::shared_ptr<Game> GetGame() { return (std::shared_ptr<Game>(game)); }
2022-02-28 20:30:57 +01:00
std::shared_ptr<GameBase> GetBase() { return (std::shared_ptr<GameBase>(base)); };
2022-02-24 10:18:02 +01:00
};