mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
35 lines
495 B
C++
35 lines
495 B
C++
#include <CtrlLib/CtrlLib.h>
|
|
|
|
using namespace Upp;
|
|
|
|
#define LAYOUTFILE <IdCtrls/IdCtrls.lay>
|
|
#include <CtrlCore/lay.h>
|
|
|
|
struct Dialog : WithDialogLayout<TopWindow> {
|
|
typedef Dialog CLASSNAME;
|
|
|
|
IdCtrls ctrls;
|
|
|
|
Dialog();
|
|
};
|
|
|
|
Dialog::Dialog()
|
|
{
|
|
CtrlLayout(*this, "Dialog");
|
|
|
|
ctrls
|
|
("FIRSTNAME", firstname)
|
|
("LASTNAME", lastname)
|
|
("YEAR", year)
|
|
;
|
|
}
|
|
|
|
GUI_APP_MAIN
|
|
{
|
|
ValueMap m;
|
|
LoadFromJsonFile(m);
|
|
Dialog dlg;
|
|
dlg.ctrls.Set(m);
|
|
dlg.Execute();
|
|
StoreAsJsonFile(dlg.ctrls.Get());
|
|
}
|