aboutsummaryrefslogtreecommitdiff
path: root/src/base_tab/BaseManageTab.hpp
blob: 405538017a41d78b5b0d40b7ea28af84ed95890f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#pragma once

#include "ochess.hpp"
#include "GameListManager.hpp"
#include "gamebase/GameBase.hpp"
#include "BaseImportTab.hpp"
#include "BaseGameTab.hpp"

/**
 * @brief A BaseTab sub-tab to manage games
 * 
 */
class BaseManageTab : public TabBase_TabManage {

    /// Never free the following pointers in that class
    std::shared_ptr<GameListManager> glm;
    std::shared_ptr<GameBase> base;

    /// Pointers for data access
    BaseImportTab *import_tab;
    BaseGameTab *games_tab;

    bool has_pending_events;

public:
    BaseManageTab(wxFrame *parent, std::shared_ptr<GameBase> db, 
    std::shared_ptr<GameListManager> glm, BaseImportTab *import_tab, BaseGameTab *games_tab);
    void RefreshInformations();
    void Reset(std::shared_ptr<GameBase> db);
    bool HasPendingEvents(){return(has_pending_events);};
};