aboutsummaryrefslogtreecommitdiff
path: root/src/game_tab/GameTab.hpp
blob: 15f05140e03673d1b05f89f0e157bcbe0ab5acbd (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 "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;
  Game *game;

  void RefreshLabel();
  void OnRefreshTabTitle(wxCommandEvent &event);
  void OnGameChange(wxCommandEvent &event);

public:
  GameTab(wxFrame *parent, Game *game);
  ~GameTab();
  void ApplyPreferences();
  void *GetGame() { return (game); }
  void *GetBase() { return (NULL); };
};