summaryrefslogtreecommitdiff
path: root/src/wx/time_picker.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-10-26 11:36:12 +0000
committerCarl Hetherington <cth@carlh.net>2020-10-26 11:36:12 +0000
commit171c5b69beb10e709d6b8f67e45a11196bf7ce91 (patch)
tree81871c66cda557f7609993c25765cf70f85ea6d4 /src/wx/time_picker.h
parentd33fe443251131fb5a3f4072be311d3653d8dc1f (diff)
GTK3 KDM window fixes backported from v2.15.x.
Diffstat (limited to 'src/wx/time_picker.h')
-rw-r--r--src/wx/time_picker.h37
1 files changed, 32 insertions, 5 deletions
diff --git a/src/wx/time_picker.h b/src/wx/time_picker.h
index 53e31a06a..9e83c0043 100644
--- a/src/wx/time_picker.h
+++ b/src/wx/time_picker.h
@@ -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.
@@ -23,19 +23,46 @@
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;
+};