From: Carl Hetherington Date: Thu, 1 Dec 2022 19:16:28 +0000 (+0100) Subject: Add bind(). X-Git-Tag: v2.16.36~39^2~4 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=62c03e3d3493df8a31361b3281c443cac35decb0;ds=sidebyside Add bind(). --- 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)...)); + } };