ochess/src/base_tab/BaseTab.hpp

28 lines
783 B
C++
Raw Normal View History

2022-02-24 10:18:02 +01:00
#include "BasePanelBF.h"
2022-02-24 11:50:16 +01:00
#include "gamebase/GameBase.hpp"
#include "gamebase/PGNGameBase.hpp"
2022-02-24 15:22:56 +01:00
#include "ochess.hpp"
2022-02-24 10:18:02 +01:00
// Foreign events
wxDECLARE_EVENT(NEW_GAME_EVENT, wxCommandEvent);
2022-02-25 09:21:26 +01:00
wxDECLARE_EVENT(REFRESH_TAB_TITLE, wxCommandEvent);
2022-02-24 10:18:02 +01:00
class BaseTab : public BasePanelBF, public TabInfos {
2022-02-24 11:50:16 +01:00
GameBase *base;
std::vector<std::uint32_t> deleted;
std::vector<Game *> edited;
2022-02-25 11:42:46 +01:00
std::string base_file;
2022-02-24 15:22:56 +01:00
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-24 11:50:16 +01:00
void ApplyPreferences();
2022-02-25 11:42:46 +01:00
void LoadFile();
void OnDelete(wxCommandEvent &event);
void OnSave(wxCommandEvent &event);
2022-02-25 14:57:09 +01:00
void OnExport(wxCommandEvent &event);
2022-02-24 15:22:56 +01:00
void OnOpenGame(wxListEvent &event);
2022-02-26 12:30:07 +01:00
void OnImport(wxCommandEvent &event);
void *GetGame() { return (NULL); }
void *GetBase() { return (base); };
2022-02-24 10:18:02 +01:00
};