ochess/src/engine_tab/EngineTab.hpp

32 lines
959 B
C++
Raw Normal View History

2022-02-26 17:05:47 +01:00
#include "UCI.hpp"
2022-02-26 18:46:06 +01:00
#include "ochess.hpp"
2022-02-26 17:05:47 +01:00
2022-02-26 20:34:42 +01:00
// Foreign event
wxDECLARE_EVENT(CLOSE_TAB_EVENT, wxCommandEvent);
2022-02-26 21:43:09 +01:00
wxDECLARE_EVENT(REFRESH_ENGINE_LIST, wxCommandEvent);
2023-01-13 10:42:57 +01:00
wxDECLARE_EVENT(REFRESH_TAB_TITLE, wxCommandEvent);
2022-02-26 20:34:42 +01:00
2023-05-13 10:43:21 +02:00
/**
* @brief Tab used to configure UCI chess engines
2023-06-04 13:51:23 +02:00
* @ingroup tabs
2023-05-13 10:43:21 +02:00
*/
2022-02-28 13:02:27 +01:00
class EngineTab : public TabEngine, public TabInfos {
2022-02-26 18:46:06 +01:00
std::string confGroup, enginePath;
2023-05-10 10:49:31 +02:00
uciadapter::UCI *engine;
2023-01-31 10:26:40 +01:00
std::uint32_t engine_id;
2022-02-26 18:46:06 +01:00
void InitConfiguration();
2022-02-26 21:43:09 +01:00
void LoadConfiguration();
void RefreshItemList();
2023-06-04 15:03:22 +02:00
void OnSave(wxCommandEvent &event);
void OnDelete(wxCommandEvent &event);
2022-02-26 17:05:47 +01:00
public:
2022-02-26 19:21:52 +01:00
EngineTab(wxWindow *parent, uciadapter::UCI *engine,
2023-01-31 10:26:40 +01:00
std::string engine_path);
EngineTab(wxWindow *parent, std::uint32_t id);
~EngineTab();
2022-02-26 17:05:47 +01:00
void ApplyPreferences() {}
2022-12-31 20:45:03 +01:00
std::shared_ptr<Game> GetGame() { return nullptr; }
std::shared_ptr<GameBase> GetBase() { return nullptr; }
2023-02-01 12:00:24 +01:00
std::uint32_t GetEngineId() { return engine_id; };
2022-02-26 17:05:47 +01:00
};