Fix some spelling mistakes (mostly in comments).
[dcpomatic.git] / src / wx / time_picker.h
index 80888301031f18f2599bf5fddc8654cf319aae1d..50177afd3e49a78c4f719828a37682d35b2eabca 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2016 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2016-2020 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
+
+#include <dcp/warnings.h>
+LIBDCP_DISABLE_WARNINGS
 #include <wx/wx.h>
+LIBDCP_ENABLE_WARNINGS
 #include <boost/signals2.hpp>
 
-class wxTextCtrl;
-class wxSpinButton;
+class wxSpinCtrl;
+
 
 class TimePicker : public wxPanel
 {
 public:
-       TimePicker (wxWindow* parent, wxDateTime time);
+       TimePicker (wxWindow* parent);
 
-       int hours () const;
-       int minutes () const;
+       virtual int hours () const = 0;
+       virtual int minutes () const = 0;
 
        boost::signals2::signal<void ()> Changed;
+};
+
+
+class TimePickerSpin : public TimePicker
+{
+public:
+       TimePickerSpin (wxWindow* parent, wxDateTime time);
+
+       int hours () const override;
+       int minutes () const override;
+
+private:
+       void changed ();
+
+       wxSpinCtrl* _hours;
+       wxSpinCtrl* _minutes;
+};
+
+
+class TimePickerText : public TimePicker
+{
+public:
+       TimePickerText (wxWindow* parent, wxDateTime time);
+
+       int hours () const override;
+       int minutes () const override;
 
 private:
-       void update_spin ();
-       void update_text ();
+       void changed ();
 
        wxTextCtrl* _hours;
-       wxSpinButton* _hours_spin;
        wxTextCtrl* _minutes;
-       wxSpinButton* _minutes_spin;
-
-       bool _block_update;
 };