From 62c03e3d3493df8a31361b3281c443cac35decb0 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 1 Dec 2022 20:16:28 +0100 Subject: [PATCH] Add bind(). --- src/wx/dcpomatic_button.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wx/dcpomatic_button.h b/src/wx/dcpomatic_button.h index 902c85666..6de8b60f4 100644 --- a/src/wx/dcpomatic_button.h +++ b/src/wx/dcpomatic_button.h @@ -28,6 +28,7 @@ LIBDCP_DISABLE_WARNINGS #include LIBDCP_ENABLE_WARNINGS +#include class Button : public wxButton, public I18NHook @@ -37,6 +38,11 @@ public: void set_text (wxString text) override; wxString get_text () const override; + + template + void bind(Args... args) { + Bind(wxEVT_BUTTON, boost::bind(std::forward(args)...)); + } }; -- 2.30.2