blob: f951ae7dc71aa9ee9d04a9f3354b4ff84c8cb0de (
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
32
33
|
#pragma once
#include "ChessArbiter.hpp"
#include "Game.hpp"
#include "HalfMove.hpp"
#include "left_panel/GameTabLeftPanel.hpp"
#include "right_panel/GameTabRightPanel.hpp"
#include "ochess.hpp"
#include <utility>
#include <wx/collpane.h>
#include <wx/splitter.h>
#include <wx/textctrl.h>
wxDECLARE_EVENT(REFRESH_TAB_TITLE, wxCommandEvent);
wxDECLARE_EVENT(GAME_CHANGE, wxCommandEvent);
class GameTab : public wxPanel, public TabInfos {
GameTabRightPanel *editor_panel;
GameTabLeftPanel *board_panel;
std::shared_ptr<Game> game;
std::string related_file;
void RefreshLabel();
void OnRefreshTabTitle(wxCommandEvent &event);
void OnGameChange(wxCommandEvent &event);
public:
GameTab(wxFrame *parent, std::shared_ptr<Game> game);
void ApplyPreferences();
std::shared_ptr<Game> GetGame() { return (std::shared_ptr<Game>(game)); }
std::shared_ptr<GameBase> GetBase() { return (std::shared_ptr<GameBase>(NULL)); };
void OnToolClick(wxCommandEvent &event);
void OnLink(){board_panel->DisableSaveTool();};
};
|