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

#include "../Game.hpp"
#include "board/BoardCanvas.hpp"
#include "ochess.hpp"

// Foreign events
wxDECLARE_EVENT(GAME_CHANGE, wxCommandEvent);


class GameTabLeftPanel : public TabGameLeftPanel {
  std::shared_ptr<Game> game;
  BoardCanvas *board_canvas;
  void NotifyEditor();
  std::string last_absolute_move;
  bool repeat;
  
public:
  GameTabLeftPanel(wxFrame *parent, std::shared_ptr<Game> game);
  void Notify(bool animate=false,bool backward=false);
  void OnPlay(wxCommandEvent &event);
  void OnGotoMove(wxCommandEvent &event);
  void PreviousMove(bool isKeyDown);
  void NextMove(bool isKeyDown);
  void OnZoomIn(wxCommandEvent &event);
  void OnZoomOut(wxCommandEvent &event);
  void OnSwap(wxCommandEvent &event);
  void OnRefreshBoard(wxCommandEvent &event);
  void ApplyPreferences();
};