Add bind().
[dcpomatic.git] / src / wx / dcpomatic_button.h
index 7e0e01dc2746da41dc5190023ce5a9816e54c2ab..6de8b60f40aa837590bbde420875897250eb6f2d 100644 (file)
 
 
 #include "i18n_hook.h"
-#include "lib/warnings.h"
-DCPOMATIC_DISABLE_WARNINGS
+#include <dcp/warnings.h>
+LIBDCP_DISABLE_WARNINGS
 #include <wx/button.h>
-DCPOMATIC_ENABLE_WARNINGS
+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)...));
+       }
 };