From: Carl Hetherington Date: Fri, 13 Jan 2023 19:39:51 +0000 (+0100) Subject: Add bind() to Choice. X-Git-Tag: v2.16.41~60 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=cf587f405a1a4e95ff3904956df7fd7ef3d70218 Add bind() to Choice. --- diff --git a/src/wx/dcpomatic_choice.h b/src/wx/dcpomatic_choice.h index 3a5987ead..7c9042de9 100644 --- a/src/wx/dcpomatic_choice.h +++ b/src/wx/dcpomatic_choice.h @@ -23,6 +23,7 @@ LIBDCP_DISABLE_WARNINGS #include LIBDCP_ENABLE_WARNINGS +#include #include @@ -37,6 +38,11 @@ public: void set(int index); boost::optional get() const; + template + void bind(Args... args) { + Bind(wxEVT_CHOICE, boost::bind(std::forward(args)...)); + } + private: bool _needs_clearing = true; };