mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-04-18 03:42:02 +00:00
44 lines
1.3 KiB
C++
44 lines
1.3 KiB
C++
![]() |
#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);
|
||
|
};
|