diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2022-12-24 10:26:05 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2022-12-24 10:26:05 +0100 |
| commit | 273610cb0f848fd99f9b9769f0d60b6e2df590ed (patch) | |
| tree | e11d9887c9263a935f6ae83b1cf73e5e78236eda /src/ochess.hpp | |
| parent | 3b7cc1c847f4bc8ec900b01a2bcee0cb90d4bd39 (diff) | |
Update tab manager
Diffstat (limited to 'src/ochess.hpp')
| -rw-r--r-- | src/ochess.hpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ochess.hpp b/src/ochess.hpp index 9f09a88..805de31 100644 --- a/src/ochess.hpp +++ b/src/ochess.hpp @@ -53,10 +53,18 @@ class GameBase; * */ class TabInfos { + static long tab_count; public: typedef enum Type { GAME, BASE, ENGINE, NONE } Type; Type type; - TabInfos(Type type_) : type(type_) {} + /// @brief Each tab has an associated unique id + long id; + /// @brief Specify to which tab id this tab is linked (e.g: database to linked to game tab) + long linked_id; + /// @brief Set to true if this tab is attach to another one (c.f linked_id) + bool is_linked; + TabInfos(Type type_) : type(type_), id(tab_count), is_linked(false) { tab_count++; } + void Link(TabInfos *tab); virtual void ApplyPreferences() = 0; virtual std::shared_ptr<Game> GetGame() = 0; virtual std::shared_ptr<GameBase> GetBase() = 0; |
