summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-11-01 20:57:55 +0100
committerCarl Hetherington <cth@carlh.net>2022-11-01 20:57:55 +0100
commit760f48d1dbf639430704377b6b657fb4b88f1390 (patch)
tree4d37557f9c302af4adc8ce44c45bd3a691c8f0e1 /src
parent452e4844326048da0f1fdc8dbf623b43cb400798 (diff)
Add get() and bind() to CheckBox.
Diffstat (limited to 'src')
-rw-r--r--src/wx/check_box.cc8
-rw-r--r--src/wx/check_box.h6
2 files changed, 14 insertions, 0 deletions
diff --git a/src/wx/check_box.cc b/src/wx/check_box.cc
index 710ba6334..baec651c1 100644
--- a/src/wx/check_box.cc
+++ b/src/wx/check_box.cc
@@ -45,3 +45,11 @@ CheckBox::get_text () const
{
return GetLabel ();
}
+
+
+bool
+CheckBox::get() const
+{
+ return GetValue();
+}
+
diff --git a/src/wx/check_box.h b/src/wx/check_box.h
index 6e54ef411..e65936d90 100644
--- a/src/wx/check_box.h
+++ b/src/wx/check_box.h
@@ -37,6 +37,12 @@ public:
void set_text (wxString text) override;
wxString get_text () const override;
+ bool get() const;
+
+ template <typename Functor>
+ void bind(Functor f) {
+ Bind(wxEVT_CHECKBOX, f);
+ }
};