mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-04-07 02:26:29 +02:00
Prepare API for adding games to database
This commit is contained in:
parent
98488e899a
commit
3b6e7d39cf
3 changed files with 8 additions and 3 deletions
|
@ -11,7 +11,7 @@ wxDECLARE_EVENT(REFRESH_TAB_TITLE, wxCommandEvent);
|
||||||
class BaseTab : public BasePanelBF, public TabInfos {
|
class BaseTab : public BasePanelBF, public TabInfos {
|
||||||
GameBase *base;
|
GameBase *base;
|
||||||
std::vector<std::uint32_t> deleted;
|
std::vector<std::uint32_t> deleted;
|
||||||
std::vector<Game*> edited;
|
std::vector<Game *> edited;
|
||||||
std::string base_file;
|
std::string base_file;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -22,4 +22,6 @@ public:
|
||||||
void OnSave(wxCommandEvent &event);
|
void OnSave(wxCommandEvent &event);
|
||||||
void OnExport(wxCommandEvent &event);
|
void OnExport(wxCommandEvent &event);
|
||||||
void OnOpenGame(wxListEvent &event);
|
void OnOpenGame(wxListEvent &event);
|
||||||
|
void *GetGame() { return (NULL); }
|
||||||
|
void *GetBase() { return (base); };
|
||||||
};
|
};
|
|
@ -13,7 +13,6 @@
|
||||||
wxDECLARE_EVENT(REFRESH_TAB_TITLE, wxCommandEvent);
|
wxDECLARE_EVENT(REFRESH_TAB_TITLE, wxCommandEvent);
|
||||||
wxDECLARE_EVENT(GAME_CHANGE, wxCommandEvent);
|
wxDECLARE_EVENT(GAME_CHANGE, wxCommandEvent);
|
||||||
|
|
||||||
|
|
||||||
class GameTab : public wxPanel, public TabInfos {
|
class GameTab : public wxPanel, public TabInfos {
|
||||||
EditorPanel *editor_panel;
|
EditorPanel *editor_panel;
|
||||||
BoardPanel *board_panel;
|
BoardPanel *board_panel;
|
||||||
|
@ -21,8 +20,10 @@ class GameTab : public wxPanel, public TabInfos {
|
||||||
void RefreshLabel();
|
void RefreshLabel();
|
||||||
void OnRefreshTabTitle(wxCommandEvent &event);
|
void OnRefreshTabTitle(wxCommandEvent &event);
|
||||||
void OnGameChange(wxCommandEvent &event);
|
void OnGameChange(wxCommandEvent &event);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GameTab(wxFrame *parent, Game *game);
|
GameTab(wxFrame *parent, Game *game);
|
||||||
void ApplyPreferences();
|
void ApplyPreferences();
|
||||||
|
void *GetGame() { return (game); }
|
||||||
|
void *GetBase() { return (NULL); };
|
||||||
};
|
};
|
||||||
|
|
|
@ -54,4 +54,6 @@ public:
|
||||||
Type type;
|
Type type;
|
||||||
TabInfos(Type type_) : type(type_) {}
|
TabInfos(Type type_) : type(type_) {}
|
||||||
virtual void ApplyPreferences() = 0;
|
virtual void ApplyPreferences() = 0;
|
||||||
|
virtual void *GetGame() = 0;
|
||||||
|
virtual void *GetBase() = 0;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue