From ce941c146aea7925bded6b9d2a0d0559d3156ad3 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Wed, 23 Feb 2022 18:11:55 +0100 Subject: Create repository --- src/game_tab/editor/EditorPanel.hpp | 44 +++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/game_tab/editor/EditorPanel.hpp (limited to 'src/game_tab/editor/EditorPanel.hpp') diff --git a/src/game_tab/editor/EditorPanel.hpp b/src/game_tab/editor/EditorPanel.hpp new file mode 100644 index 0000000..0a7c0d0 --- /dev/null +++ b/src/game_tab/editor/EditorPanel.hpp @@ -0,0 +1,44 @@ +#include "../Game.hpp" +#include "EditorCanvas.hpp" +#include "ochess.hpp" +#include +#include + +// Local events +wxDECLARE_EVENT(GOTO_MOVE_EVENT, wxCommandEvent); +wxDECLARE_EVENT(DELETE_MOVE_EVENT, wxCommandEvent); +wxDECLARE_EVENT(PROMOTE_MOVE_EVENT, wxCommandEvent); +wxDECLARE_EVENT(SET_AS_MAINLINE_EVENT, wxCommandEvent); +wxDECLARE_EVENT(REFRESH_TAB_TITLE, wxCommandEvent); + +// Foreign events +wxDECLARE_EVENT(GAME_CHANGE, wxCommandEvent); + +enum { COMMENT_INPUT_BOX = wxID_HIGHEST + 100, UPDATE_BTN, DELETE_BTN }; + +class EditorPanel : public wxPanel { + Game *game; + EditorCanvas *editor_canvas; + wxTextCtrl *comment_input; + wxListCtrl *tags_list; + wxTextCtrl *tagTextCtrl, *valueTextCtrl; + wxButton *delete_button; + long selected_item; + +public: + EditorPanel(wxFrame *parent, Game *game); + void NotifyBoard(); + void Notify(); + void OnCommentChange(wxCommandEvent &event); + void OnGotoMove(wxCommandEvent &event); + void OnMoveDelete(wxCommandEvent &event); + void OnMovePromote(wxCommandEvent &event); + void OnMoveSetAsMainline(wxCommandEvent &event); + void RefreshTagsList(); + void OnTagSelected(wxListEvent &event); + void OnTagDeselected(wxListEvent &event); + void OnApply(wxCommandEvent &event); + void OnDelete(wxCommandEvent &event); + void OnPreviousMove(wxCommandEvent &event); + void OnNextMove(wxCommandEvent &event); +}; \ No newline at end of file -- cgit v1.2.3