ultimatepp/bazaar/PopUpTest/main.cpp
kohait eae1b88db4 bazaar: PopUpC and alueAccessorEditot
git-svn-id: svn://ultimatepp.org/upp/trunk@14148 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2020-03-10 18:36:52 +00:00

41 lines
699 B
C++

#include "PopUpTest.h"
void PopUpTest::OkCB()
{
int exitcode = pu.GetExitCode();
String a = AsString(pu.ei.GetData());
drop.SetLabel(String().Cat() << "dropped OK, " << a << "(" << (exitcode) << ")");
}
void PopUpTest::CancelCB()
{
drop.SetLabel("dropped Cancel");
}
void PopUpTest::DoDrop()
{
drop.SetLabel("dropping");
pu.PopUp(this);
}
PopUpTest::PopUpTest()
{
CtrlLayout(*this, "Window title");
CtrlLayout(pu);
pu.Acceptor(pu.ok, CKOK).Rejector(pu.cancel, CKCANCEL);
pu.WhenAccept = THISBACK(OkCB);
pu.WhenReject = THISBACK(CancelCB);
drop <<= THISBACK(DoDrop);
//init
pu.ei.SetData(123);
}
GUI_APP_MAIN
{
PopUpTest().Run();
}