summaryrefslogtreecommitdiff
path: root/src/wx/dcpomatic_choice.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-01-13 20:39:51 +0100
committerCarl Hetherington <cth@carlh.net>2023-01-14 00:42:39 +0100
commitcf587f405a1a4e95ff3904956df7fd7ef3d70218 (patch)
tree1b9b694e14e0265343a7e41fc879805b4c2f9b25 /src/wx/dcpomatic_choice.h
parenta2bf32c1419a56e6aaee7e742961b9f471a9dd79 (diff)
Add bind() to Choice.
Diffstat (limited to 'src/wx/dcpomatic_choice.h')
-rw-r--r--src/wx/dcpomatic_choice.h6
1 files changed, 6 insertions, 0 deletions
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 <wx/wx.h>
LIBDCP_ENABLE_WARNINGS
+#include <boost/bind.hpp>
#include <boost/optional.hpp>
@@ -37,6 +38,11 @@ public:
void set(int index);
boost::optional<int> get() const;
+ template <typename... Args>
+ void bind(Args... args) {
+ Bind(wxEVT_CHOICE, boost::bind(std::forward<Args>(args)...));
+ }
+
private:
bool _needs_clearing = true;
};