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

26 lines
1.4 KiB
Text

#include "CtrlPropCommon.h"
NAMESPACE_UPP
bool PropSetBlackEdge(const Value& v, Option& o) { if(!IsNumber(v)) return false; o.BlackEdge(v); return true; }
bool PropGetBlackEdge(Value& v, const Option& o) { v = o.IsBlackEdge(); return true; }
bool PropSetSwitchImage(const Value& v, Option& o) { if(!IsNumber(v)) return false; o.SwitchImage(v); return true; }
bool PropGetSwitchImage(Value& v, const Option& o) { v = o.IsSwitchImage(); return true; }
bool PropSetThreeState(const Value& v, Option& o) { if(!IsNumber(v)) return false; o.ThreeState(v); return true; }
bool PropGetThreeState(Value& v, const Option& o) { v = o.IsThreeState(); return true; }
bool PropSetShowLabel(const Value& v, Option& o) { if(!IsNumber(v)) return false; o.ShowLabel(v); return true; }
bool PropGetShowLabel(Value& v, const Option& o) { v = o.IsShowLabel(); return true; }
bool PropSetNotNull(const Value& v, Option& o) { if(!IsNumber(v)) return false; o.NotNull(v); return true; }
bool PropGetNotNull(Value& v, const Option& o) { v = o.IsNotNull(); return true; }
PROPERTIES(Option, Pusher)
PROPERTY("blackedge", PropSetBlackEdge, PropGetBlackEdge)
PROPERTY("switchimage", PropSetSwitchImage, PropGetSwitchImage)
PROPERTY("threestate", PropSetThreeState, PropGetThreeState)
PROPERTY("showlabel", PropSetShowLabel, PropGetShowLabel)
PROPERTY("notnull", PropSetNotNull, PropGetNotNull)
END_PROPERTIES
PROPS(Ctrl, Option, Pusher)
END_UPP_NAMESPACE