+ void set_hint (T t, float fps)
+ {
+ auto hmsf = t.split (fps);
+
+ _hours->SetHint (std_to_wx(dcp::raw_convert<std::string>(hmsf.h)));
+ _minutes->SetHint (std_to_wx(dcp::raw_convert<std::string>(hmsf.m)));
+ _seconds->SetHint (std_to_wx(dcp::raw_convert<std::string>(hmsf.s)));
+ _frames->SetHint (std_to_wx(dcp::raw_convert<std::string>(hmsf.f)));
+ }
+
+ dcpomatic::HMSF get () const
+ {
+ auto value_or_hint = [](wxTextCtrl const * t) {
+ auto s = wx_to_std (t->GetValue().IsEmpty() ? t->GetHint() : t->GetValue());
+ if (s.empty()) {
+ return 0;
+ }
+ return dcp::raw_convert<int>(s);
+ };
+
+ return { value_or_hint(_hours),
+ value_or_hint(_minutes),
+ value_or_hint(_seconds),
+ value_or_hint(_frames) };
+ }
+
+ T get (float fps) const