summaryrefslogtreecommitdiff
path: root/src/wx/wx_util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/wx/wx_util.cc')
-rw-r--r--src/wx/wx_util.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc
index 048f87908..aac35e97a 100644
--- a/src/wx/wx_util.cc
+++ b/src/wx/wx_util.cc
@@ -190,6 +190,15 @@ checked_set (wxSpinCtrl* widget, int value)
}
void
+checked_set (wxSpinCtrlDouble* widget, double value)
+{
+ /* XXX: completely arbitrary epsilon */
+ if (fabs (widget->GetValue() - value) < 1e-16) {
+ widget->SetValue (value);
+ }
+}
+
+void
checked_set (wxChoice* widget, int value)
{
if (widget->GetSelection() != value) {
@@ -297,6 +306,12 @@ wx_get (wxChoice* w)
return w->GetSelection ();
}
+double
+wx_get (wxSpinCtrlDouble* w)
+{
+ return w->GetValue ();
+}
+
void
run_gui_loop ()
{