aboutsummaryrefslogtreecommitdiff
path: root/src/game_tab/right_panel/editor/EditorCanvas.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game_tab/right_panel/editor/EditorCanvas.hpp')
-rw-r--r--src/game_tab/right_panel/editor/EditorCanvas.hpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/game_tab/right_panel/editor/EditorCanvas.hpp b/src/game_tab/right_panel/editor/EditorCanvas.hpp
index 05d6258..740a6a1 100644
--- a/src/game_tab/right_panel/editor/EditorCanvas.hpp
+++ b/src/game_tab/right_panel/editor/EditorCanvas.hpp
@@ -4,22 +4,18 @@
#include "CGEditor.hpp"
#include "ochess.hpp"
#include "../../left_panel/board/Theme.hpp"
+#include "game_tab/Game.hpp"
// Foreign events
-wxDECLARE_EVENT(GOTO_MOVE_EVENT, wxCommandEvent);
-wxDECLARE_EVENT(PREVIOUS_MOVE_EVENT, wxCommandEvent);
-wxDECLARE_EVENT(NEXT_MOVE_EVENT, wxCommandEvent);
-wxDECLARE_EVENT(DELETE_MOVE_EVENT, wxCommandEvent);
-wxDECLARE_EVENT(PROMOTE_MOVE_EVENT, wxCommandEvent);
-wxDECLARE_EVENT(SET_AS_MAINLINE_EVENT, wxCommandEvent);
+wxDECLARE_EVENT(GAME_CHANGE, wxCommandEvent);
class EditorCanvas : public wxPanel, public cgeditor::CGEditor {
wxPaintDC *dc;
- bool NeedRedraw;
wxPoint Middle(cgeditor::Element e);
wxBitmap hide_icon;
Theme t;
wxFont default_font;
+ std::shared_ptr<Game> game;
wxColour color_scrollbar_bg;
wxColour color_scrollbar;
@@ -29,13 +25,12 @@ class EditorCanvas : public wxPanel, public cgeditor::CGEditor {
wxColour color_menu_item_bg;
public:
- EditorCanvas(wxFrame *parent);
+ EditorCanvas(wxFrame *parent, std::shared_ptr<Game> game);
void OnPaint(wxPaintEvent &event);
void MouseEvent(wxMouseEvent &event);
void DrawElement(const cgeditor::Element &e);
void HandleEvent(const cgeditor::Event &e);
void SetMoves(HalfMove *moves, HalfMove *current);
- void OnKeyEvent(wxKeyEvent &event);
DECLARE_EVENT_TABLE()
};