aboutsummaryrefslogtreecommitdiff
path: root/src/game_tab/editor/EditorPanel.hpp
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-02-23 18:11:55 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2022-02-23 18:11:55 +0100
commitce941c146aea7925bded6b9d2a0d0559d3156ad3 (patch)
tree4c52e02600e3fd127bfb28b3e974d45541ec9e4e /src/game_tab/editor/EditorPanel.hpp
Create repository
Diffstat (limited to 'src/game_tab/editor/EditorPanel.hpp')
-rw-r--r--src/game_tab/editor/EditorPanel.hpp44
1 files changed, 44 insertions, 0 deletions
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 <wx/listctrl.h>
+#include <wx/notebook.h>
+
+// 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