Add Choice::get_data().
[dcpomatic.git] / src / wx / dcpomatic_choice.h
index 3a5987eadcf5d95ffb9fe7010cc87e92491c1af7..7c1fadcc0eb04a3f3fe293d5dd194b3fd8e00774 100644 (file)
@@ -23,6 +23,7 @@
 LIBDCP_DISABLE_WARNINGS
 #include <wx/wx.h>
 LIBDCP_ENABLE_WARNINGS
+#include <boost/bind.hpp>
 #include <boost/optional.hpp>
 
 
@@ -36,6 +37,12 @@ public:
        void add(std::string const& entry);
        void set(int index);
        boost::optional<int> get() const;
+       boost::optional<wxString> get_data() const;
+
+       template <typename... Args>
+       void bind(Args... args) {
+               Bind(wxEVT_CHOICE, boost::bind(std::forward<Args>(args)...));
+       }
 
 private:
        bool _needs_clearing = true;