Skip to content

Commit

Permalink
Add Bind() support
Browse files Browse the repository at this point in the history
  • Loading branch information
Blake-Madden committed Apr 8, 2024
1 parent 3fd395d commit 41ddb80
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/base/canvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
#include "reportprintout.h"
#include <wx/xrc/xmlres.h>

wxDEFINE_EVENT(EVT_WISTERIA_CANVAS_DCLICK, wxCommandEvent);
wxDEFINE_EVENT(wxEVT_WISTERIA_CANVAS_DCLICK, wxCommandEvent);

wxIMPLEMENT_DYNAMIC_CLASS(Wisteria::Canvas, wxScrolledWindow);

using namespace Wisteria::GraphItems;
Expand Down Expand Up @@ -1689,7 +1690,7 @@ namespace Wisteria
}
else if (event.LeftDClick())
{
wxCommandEvent devent(EVT_WISTERIA_CANVAS_DCLICK, GetId());
wxCommandEvent devent(wxEVT_WISTERIA_CANVAS_DCLICK, GetId());
devent.SetEventObject(this);
GetEventHandler()->ProcessEvent(devent);
}
Expand Down
6 changes: 5 additions & 1 deletion src/base/canvas.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@
#include "../ui/dialogs/radioboxdlg.h"

/// @private
wxDECLARE_EVENT(EVT_WISTERIA_CANVAS_DCLICK, wxCommandEvent);
wxDECLARE_EVENT(wxEVT_WISTERIA_CANVAS_DCLICK, wxCommandEvent);

/// @private
#define EVT_WISTERIA_CANVAS_DCLICK(winid, fn) \
wx__DECLARE_EVT1(wxEVT_WISTERIA_CANVAS_DCLICK, winid, wxCommandEventHandler(fn))

namespace Wisteria
{
Expand Down

0 comments on commit 41ddb80

Please sign in to comment.