aboutsummaryrefslogtreecommitdiff
path: root/src/game_tab/left_panel/GameTabLeftPanel.hpp
blob: 6bd6b384c58ff32500b93adfaaad6ef60e0330e2 (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
#pragma once

#include "../Game.hpp"
#include "board/BoardCanvas.hpp"
#include "ochess.hpp"
#include "base_tab/gamebase/GameBase.hpp"

// Foreign events
wxDECLARE_EVENT(GAME_CHANGE, wxCommandEvent);

class GameTabLeftPanel : public TabGameLeftPanel {
  std::shared_ptr<Game> game;
  BoardCanvas *board_canvas;
  bool repeat;
  HalfMove *last_move;
  std::vector<GameState::Arrow> engine_arrows;

public:
  GameTabLeftPanel(wxFrame *parent, std::shared_ptr<Game> game);
  void Notify(bool skip_animation=false);
  void OnPlay(wxCommandEvent &event);
  void OnGotoMove(wxCommandEvent &event);
  void OnRefreshBoard(wxCommandEvent &event);
  void ApplyPreferences();
  void SetSaveToolEnable(bool state){game_toolbar->EnableTool(0,state);};
  void SetEngineArrows(std::vector<std::string> arrows);
};