summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-12-01 20:16:28 +0100
committerCarl Hetherington <cth@carlh.net>2022-12-01 20:25:08 +0100
commit62c03e3d3493df8a31361b3281c443cac35decb0 (patch)
treeff534ee2d0be81ec055ffacb4698e51148aecc2d
parent9319f03bb4efd1182a710864f69a1d64c4ec9920 (diff)
Add bind().
-rw-r--r--src/wx/dcpomatic_button.h6
1 files changed, 6 insertions, 0 deletions
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 <wx/button.h>
LIBDCP_ENABLE_WARNINGS
+#include <boost/bind/bind.hpp>
class Button : public wxButton, public I18NHook
@@ -37,6 +38,11 @@ public:
void set_text (wxString text) override;
wxString get_text () const override;
+
+ template <typename... Args>
+ void bind(Args... args) {
+ Bind(wxEVT_BUTTON, boost::bind(std::forward<Args>(args)...));
+ }
};