2022-12-27 19:41:33 +01:00
|
|
|
#pragma once
|
|
|
|
|
2022-12-23 18:23:05 +01:00
|
|
|
#include "ochess.hpp"
|
2022-12-26 12:51:48 +01:00
|
|
|
#include "GameListManager.hpp"
|
|
|
|
#include "gamebase/GameBase.hpp"
|
2022-12-27 19:41:33 +01:00
|
|
|
#include "BaseImportTab.hpp"
|
|
|
|
#include "BaseGameTab.hpp"
|
2022-12-23 18:23:05 +01:00
|
|
|
|
2023-05-13 10:43:21 +02:00
|
|
|
/**
|
|
|
|
* @brief A BaseTab sub-tab to manage games
|
|
|
|
*
|
|
|
|
*/
|
2022-12-23 18:23:05 +01:00
|
|
|
class BaseManageTab : public TabBase_TabManage {
|
|
|
|
|
2022-12-27 20:32:13 +01:00
|
|
|
/// Never free the following pointers in that class
|
2022-12-26 12:51:48 +01:00
|
|
|
std::shared_ptr<GameListManager> glm;
|
|
|
|
std::shared_ptr<GameBase> base;
|
2022-12-27 20:32:13 +01:00
|
|
|
|
|
|
|
/// Pointers for data access
|
2022-12-27 19:41:33 +01:00
|
|
|
BaseImportTab *import_tab;
|
|
|
|
BaseGameTab *games_tab;
|
2022-12-23 18:23:05 +01:00
|
|
|
|
2023-01-09 10:30:17 +01:00
|
|
|
bool has_pending_events;
|
|
|
|
|
2022-12-23 18:23:05 +01:00
|
|
|
public:
|
2022-12-27 19:41:33 +01:00
|
|
|
BaseManageTab(wxFrame *parent, std::shared_ptr<GameBase> db,
|
|
|
|
std::shared_ptr<GameListManager> glm, BaseImportTab *import_tab, BaseGameTab *games_tab);
|
2022-12-26 12:51:48 +01:00
|
|
|
void RefreshInformations();
|
|
|
|
void Reset(std::shared_ptr<GameBase> db);
|
2023-01-09 10:30:17 +01:00
|
|
|
bool HasPendingEvents(){return(has_pending_events);};
|
2022-12-23 18:23:05 +01:00
|
|
|
};
|