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

19 lines
799 B
Text

#include "CtrlPropCommon.h"
NAMESPACE_UPP
bool PropSetLabel(const Value& v, Pusher& o) { if(!IsString(v)) return false; o.SetLabel(String(v)); return true; }
bool PropGetLabel(Value& v, const Pusher& o) { v = o.GetLabel(); return true; }
bool PropSetClickFocus(const Value& v, Pusher& o) { if(!IsNumber(v)) return false; o.ClickFocus(v); return true; }
bool PropGetClickFocus(Value& v, const Pusher& o) { v = o.IsClickFocus(); return true; }
bool PropGetVisualState(Value& v, const Pusher& o) { v = o.GetVisualState(); return true; }
PROPERTIES(Pusher, Ctrl)
PROPERTY("label", PropSetLabel, PropGetLabel)
PROPERTY("clickfocus", PropSetClickFocus, PropGetClickFocus)
//PROPERTY_GET("visualstate", PropGetVisualState)
END_PROPERTIES
PROPS(Ctrl, Pusher, Ctrl)
END_UPP_NAMESPACE