ultimatepp/bazaar/ValueCtrlTest/main.cpp
kohait 39e05a4bcd bazaar: ValueCtrl: esier extension of editors database and typenames for value types
git-svn-id: svn://ultimatepp.org/upp/trunk@3831 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2011-09-06 15:07:48 +00:00

31 lines
549 B
C++

#include "ValueCtrlTest.h"
ValueCtrlTest::ValueCtrlTest()
{
CtrlLayout(*this, "Window title");
clear <<= THISBACK(Clear);
vc <<= THISBACK(ActionCB);
Add(vc.HSizePos().BottomPos(0, 20));
Value v = ValueArray(Vector<Value>() << 123.8 << "Test");
vc.SetData(v);
}
void ValueCtrlTest::ActionCB()
{
Value v = vc.GetData();
ValueEditKey vk(v.GetType());
String s;
s << "(" << v.GetType() << ") " << vk.ToString();
s << " = " << AsString(v);
ToInfo(s);
RLOG(s);
}
GUI_APP_MAIN
{
ValueCtrlTest().Run();
}