ultimatepp/bazaar/CtrlProp/EditDouble.icpp
kohait 9b18b6c807 bazaar: Property, ValueCtrl, CtrlProp: namespace fixes and some cleanup
git-svn-id: svn://ultimatepp.org/upp/trunk@3865 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2011-09-15 23:17:59 +00:00

20 lines
901 B
Text

#include "CtrlPropCommon.h"
NAMESPACE_UPP
bool PropSetMin(const Value& v, EditDouble& o) { if(!IsNumber(v)) return false; o.MinMax(v, o.GetMax()); return true; }
bool PropGetMin(Value& v, const EditDouble& o) { v = o.GetMin(); return true; }
bool PropSetMax(const Value& v, EditDouble& o) { if(!IsNumber(v)) return false; o.MinMax(o.GetMin(), v); return true; }
bool PropGetMax(Value& v, const EditDouble& o) { v = o.GetMax(); return true; }
bool PropSetNotNull(const Value& v, EditDouble& o) { if(!IsNumber(v)) return false; o.NotNull(v); return true; }
bool PropGetNotNull(Value& v, const EditDouble& o) { v = o.IsNotNull(); return true; }
PROPERTIES(EditDouble, EditField)
PROPERTY("min", PropSetMin, PropGetMin)
PROPERTY("max", PropSetMax, PropGetMax)
PROPERTY("notnull", PropSetNotNull, PropGetNotNull)
END_PROPERTIES
PROPS(Ctrl, EditDouble, EditField)
END_UPP_NAMESPACE