ultimatepp/upptst/ArrayCtrlActions/main.cpp
cxl 30e164af52 .upptst
git-svn-id: svn://ultimatepp.org/upp/trunk@13013 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2019-04-21 19:00:31 +00:00

27 lines
628 B
C++

#include "ArrayCtrlActions.h"
ArrayCtrlActions::ArrayCtrlActions()
{
CtrlLayout(*this, "Window title");
action.AddColumn("Action");
list.AddColumn("List");
for(int i = 0; i < 4; i++)
list.Add(i);
list.Removing();
list.Inserting();
auto Log = [=](const char *s) { action.Add(String() << action.GetCount() << ": " << s); action.GoEnd(); };
list.WhenAction << [=] { Log("WhenAction"); };
list.WhenArrayAction << [=] { Log("WhenArrayAction"); };
list.WhenCursor << [=] { Log("WhenCursor"); };
list.WhenSel << [=] { Log("WhenSel"); };
}
GUI_APP_MAIN
{
ArrayCtrlActions().Run();
}