aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-02-25 15:29:04 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2022-02-25 15:29:04 +0100
commit3b6e7d39cf2d03f2e43c249ece6da32f1f8030a7 (patch)
tree4ae10cf81fc75264f59b5e991b1beeae66b3fea4 /src
parent98488e899a750703562d868d734251cfe032e294 (diff)
Prepare API for adding games to database
Diffstat (limited to 'src')
-rw-r--r--src/base_tab/BaseTab.hpp4
-rw-r--r--src/game_tab/GameTab.hpp5
-rw-r--r--src/ochess.hpp2
3 files changed, 8 insertions, 3 deletions
diff --git a/src/base_tab/BaseTab.hpp b/src/base_tab/BaseTab.hpp
index f58e182..a283975 100644
--- a/src/base_tab/BaseTab.hpp
+++ b/src/base_tab/BaseTab.hpp
@@ -11,7 +11,7 @@ wxDECLARE_EVENT(REFRESH_TAB_TITLE, wxCommandEvent);
class BaseTab : public BasePanelBF, public TabInfos {
GameBase *base;
std::vector<std::uint32_t> deleted;
- std::vector<Game*> edited;
+ std::vector<Game *> edited;
std::string base_file;
public:
@@ -22,4 +22,6 @@ public:
void OnSave(wxCommandEvent &event);
void OnExport(wxCommandEvent &event);
void OnOpenGame(wxListEvent &event);
+ void *GetGame() { return (NULL); }
+ void *GetBase() { return (base); };
}; \ No newline at end of file
diff --git a/src/game_tab/GameTab.hpp b/src/game_tab/GameTab.hpp
index 7686f12..d013266 100644
--- a/src/game_tab/GameTab.hpp
+++ b/src/game_tab/GameTab.hpp
@@ -13,7 +13,6 @@
wxDECLARE_EVENT(REFRESH_TAB_TITLE, wxCommandEvent);
wxDECLARE_EVENT(GAME_CHANGE, wxCommandEvent);
-
class GameTab : public wxPanel, public TabInfos {
EditorPanel *editor_panel;
BoardPanel *board_panel;
@@ -21,8 +20,10 @@ class GameTab : public wxPanel, public TabInfos {
void RefreshLabel();
void OnRefreshTabTitle(wxCommandEvent &event);
void OnGameChange(wxCommandEvent &event);
+
public:
GameTab(wxFrame *parent, Game *game);
void ApplyPreferences();
-
+ void *GetGame() { return (game); }
+ void *GetBase() { return (NULL); };
};
diff --git a/src/ochess.hpp b/src/ochess.hpp
index 33e9f22..2a71c13 100644
--- a/src/ochess.hpp
+++ b/src/ochess.hpp
@@ -54,4 +54,6 @@ public:
Type type;
TabInfos(Type type_) : type(type_) {}
virtual void ApplyPreferences() = 0;
+ virtual void *GetGame() = 0;
+ virtual void *GetBase() = 0;
};