mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-16 22:02:58 -06:00
20 lines
845 B
Text
20 lines
845 B
Text
#include "CtrlPropCommon.h"
|
|
|
|
NAMESPACE_UPP
|
|
|
|
bool PropSetInk(const Value& v, StaticText& o) { if(!v.Is<Color>()) return false; o.SetInk(v); return true; }
|
|
bool PropGetInk(Value& v, const StaticText& o) { v = o.GetInk(); return true; }
|
|
bool PropSetText(const Value& v, StaticText& o) { o.SetText(AsString(v)); return true; }
|
|
bool PropGetText(Value& v, const StaticText& o) { v = o.GetText(); return true; }
|
|
bool PropSetAlign(const Value& v, StaticText& o) { if(!IsNumber(v)) return false; o.SetAlign(v); return true; }
|
|
bool PropGetAlign(Value& v, const StaticText& o) { v = o.GetAlign(); return true; }
|
|
|
|
PROPERTIES(StaticText, Ctrl)
|
|
PROPERTY("ink", PropSetInk, PropGetInk)
|
|
PROPERTY("text", PropSetText, PropGetText)
|
|
PROPERTY("align", PropSetAlign, PropGetAlign)
|
|
END_PROPERTIES
|
|
|
|
PROPS(Ctrl, StaticText, Ctrl)
|
|
|
|
END_UPP_NAMESPACE
|