projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a2bf32c
)
Add bind() to Choice.
author
Carl Hetherington
<cth@carlh.net>
Fri, 13 Jan 2023 19:39:51 +0000
(20:39 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Fri, 13 Jan 2023 23:42:39 +0000
(
00:42
+0100)
src/wx/dcpomatic_choice.h
patch
|
blob
|
history
diff --git
a/src/wx/dcpomatic_choice.h
b/src/wx/dcpomatic_choice.h
index 3a5987eadcf5d95ffb9fe7010cc87e92491c1af7..7c9042de98e9066a43e3e4fdedeff0242712bfd3 100644
(file)
--- 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;
};