ochess/src/game_tab/left_panel/GameTabLeftPanel.hpp

37 lines
1 KiB
C++
Raw Normal View History

2022-02-23 18:11:55 +01:00
#pragma once
#include "../Game.hpp"
2022-02-28 13:44:27 +01:00
#include "board/BoardCanvas.hpp"
2022-02-23 18:11:55 +01:00
#include "ochess.hpp"
2022-12-30 15:09:24 +01:00
#include "base_tab/gamebase/GameBase.hpp"
2023-01-11 10:46:14 +01:00
#include "game_tab/right_panel/LiveEngineDialog.hpp"
2022-02-23 18:11:55 +01:00
// Foreign events
wxDECLARE_EVENT(GAME_CHANGE, wxCommandEvent);
2023-05-13 10:43:21 +02:00
/**
* @brief Panel that contains the BoardCanvas and the bottom control buttons
*
*/
2022-02-28 14:02:02 +01:00
class GameTabLeftPanel : public TabGameLeftPanel {
2022-02-28 20:16:57 +01:00
std::shared_ptr<Game> game;
2022-02-23 18:11:55 +01:00
BoardCanvas *board_canvas;
2022-12-29 10:08:22 +01:00
bool repeat;
2023-01-01 20:21:23 +01:00
HalfMove *last_move;
std::vector<GameState::Arrow> engine_arrows;
std::string promote_on;
std::string promotion_move;
2023-01-11 10:46:14 +01:00
float eval_cp;
bool is_engine_on;
2022-02-23 18:11:55 +01:00
public:
2022-02-28 20:16:57 +01:00
GameTabLeftPanel(wxFrame *parent, std::shared_ptr<Game> game);
2023-01-01 18:18:27 +01:00
void Notify(bool skip_animation=false);
2022-02-23 18:11:55 +01:00
void OnPlay(wxCommandEvent &event);
void OnGotoMove(wxCommandEvent &event);
void OnRefreshBoard(wxCommandEvent &event);
void ApplyPreferences();
void SetSaveToolEnable(bool state){game_toolbar->EnableTool(0,state);};
2023-01-11 10:46:14 +01:00
void SetEngineEvaluation(EngineEvaluation eval);
void SetLiveEngineState(bool isOn);
2022-02-23 18:11:55 +01:00
};