protected:
void changed ();
void set_clicked ();
+ virtual bool valid() const = 0;
wxSizer* _sizer;
wxPanel* _editable;
_frames->SetHint (std_to_wx(dcp::raw_convert<std::string>(hmsf.f)));
}
+ void set_maximum(dcpomatic::HMSF maximum)
+ {
+ _maximum = std::move(maximum);
+ }
+
dcpomatic::HMSF get () const
{
auto value_or_hint = [](wxTextCtrl const * t) {
{
return T(get(), fps);
}
+
+private:
+ bool valid() const override {
+ return !_maximum || get() <= *_maximum;
+ }
+
+ boost::optional<dcpomatic::HMSF> _maximum;
};
#endif