GTK3 KDM window fixes backported from v2.15.x.
[dcpomatic.git] / src / wx / time_picker.h
index 53e31a06a8d21e15c26cfe90f3d29b8b1a161de3..9e83c00430709cc158dc1b23d6f530548c01ff39 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.
 
 
 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;
+       int minutes () const;
 
 private:
-       void spin_changed ();
+       void changed ();
 
        wxSpinCtrl* _hours;
        wxSpinCtrl* _minutes;
 };
+
+
+class TimePickerText : public TimePicker
+{
+public:
+       TimePickerText (wxWindow* parent, wxDateTime time);
+
+       int hours () const;
+       int minutes () const;
+
+private:
+       void changed ();
+
+       wxTextCtrl* _hours;
+       wxTextCtrl* _minutes;
+};