ultimatepp/bazaar/CtrlProp/PropList.cpp
kohait 308edc1f5d various fixes and reworks
bazaar: Gen: Ctrl::LogPos RichValue expose (needs my forum patch with template<> SetNull);
WhitEnterAction: fixes LostFocus useless double invokes
PopUpC: higly customizable now, supports Accept/Reject/Backup/Restore behaviour similar to TopWindow, WithCloserKeys template mapps the ENTER/ESC key functionality without ok/cancel/exit buttons
LogPosCtrl: major extend, supports new PopUpC, closer buttons gone, uses RichValue<Ctrl::LogPos>
ValueCtrl: port to new PopUpC
CtrProp: port to use new PopUpCand RichValue<Ctrl::LogPos>


git-svn-id: svn://ultimatepp.org/upp/trunk@3820 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2011-09-04 22:16:18 +00:00

49 lines
846 B
C++

#include "PropList.h"
PropListCtrl::PropListCtrl()
{
CtrlLayout(*this);
}
void PropListCtrl::Updated()
{
gl.SetData(Null);
sl.SetData(Null);
if(!ctrl) return;
Ctrl& e = *ctrl;
Value v;
bool b;
String t;
b = Props<Ctrl>::Get(e, "listset", v);
ValueArray vs = v;
t << "Set Properties: (" << vs.GetCount() << ")\n" << v;
gl.SetData(t);
v = Value();
b = Props<Ctrl>::Get(e, "listget", v);
t.Clear();
ValueArray vg = v;
t << "Get Properties: (" << vg.GetCount() << ")\n";
{
for(int i = 0; i < vg.GetCount(); i++)
{
String s = vg.Get(i);
Value v;
t << s << " = ";
b = Props<Ctrl>::Get(e, s, v);
if(b) t << v;
else t << "##ERR##";
t << "\n";
}
}
sl.SetData(t);
}
PropList::PropList()
{
SetRect(plc.GetRect());
Add(plc.HSizePos().VSizePos(0,20));
}