ultimatepp/bazaar/CtrlProp/EditField.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

32 lines
2 KiB
Text

#include "CtrlPropCommon.h"
NAMESPACE_UPP
bool PropSetPassword(const Value& v, EditField& o) { if(!IsNumber(v)) return false; o.Password(v); return true; }
bool PropGetPassword(Value& v, const EditField& o) { v = o.IsPassword(); return true; }
bool PropSetAutoFormat(const Value& v, EditField& o) { if(!IsNumber(v)) return false; o.AutoFormat(v); return true; }
bool PropGetAutoFormat(Value& v, const EditField& o) { v = o.IsAutoFormat(); return true; }
bool PropSetClickSelect(const Value& v, EditField& o) { if(!IsNumber(v)) return false; o.ClickSelect(v); return true; }
bool PropGetClickSelect(Value& v, const EditField& o) { v = o.IsClickSelect(); return true; }
bool PropSetInitCaps(const Value& v, EditField& o) { if(!IsNumber(v)) return false; o.InitCaps(v); return true; }
bool PropGetInitCaps(Value& v, const EditField& o) { v = o.IsInitCaps(); return true; }
bool PropSetMaxChars(const Value& v, EditField& o) { if(!IsNumber(v)) return false; o.MaxChars(v); return true; }
bool PropGetMaxChars(Value& v, const EditField& o) { v = o.GetMaxChars(); return true; }
bool PropSetNoBackground(const Value& v, EditField& o) { if(!IsNumber(v)) return false; o.NoBackground(v); return true; }
bool PropGetNoBackground(Value& v, const EditField& o) { v = o.IsNoBackground(); return true; }
bool PropSetAlignRight(const Value& v, EditField& o) { if(!IsNumber(v)) return false; o.AlignRight(v); return true; }
bool PropGetAlignRight(Value& v, const EditField& o) { v = o.IsAlignRight(); return true; }
PROPERTIES(EditField, Ctrl)
PROPERTY("password", PropSetPassword, PropGetPassword)
PROPERTY("autoformat", PropSetAutoFormat, PropGetAutoFormat)
PROPERTY("clickselect", PropSetClickSelect, PropGetClickSelect)
PROPERTY("initcaps", PropSetInitCaps, PropGetInitCaps)
PROPERTY("maxchars", PropSetMaxChars, PropGetMaxChars)
PROPERTY("nobackground", PropSetNoBackground, PropGetNoBackground)
PROPERTY("alignright", PropSetAlignRight, PropGetAlignRight)
END_PROPERTIES
PROPS(Ctrl, EditField, Ctrl)
END_UPP_NAMESPACE