Tutorial: GUI tutorial typedef removal.

git-svn-id: svn://ultimatepp.org/upp/trunk@15426 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
klugier 2020-11-16 01:40:57 +00:00
parent c44a84196b
commit f66ea03045
4 changed files with 3 additions and 13 deletions

View file

@ -18,8 +18,6 @@ struct MyAppWindow : TopWindow {
bar.Sub("Menu", [=](Bar& bar) { SubMenu(bar); });
}
typedef MyAppWindow CLASSNAME;
MyAppWindow() {
Title("My application with menu").Sizeable();
AddFrame(menu);

View file

@ -5,8 +5,6 @@ using namespace Upp;
struct MyAppWindow : TopWindow {
Button button;
typedef MyAppWindow CLASSNAME;
MyAppWindow() {
Title("My application with button");
Add(button.LeftPos(10, 100).TopPos(10, 30));

View file

@ -9,12 +9,10 @@ struct MyApp : TopWindow {
Break(999);
}
typedef MyApp CLASSNAME;
MyApp() {
SetRect(0, 0, 100, 100);
Add(exit.SetLabel("exit").LeftPosZ(10, 64).TopPosZ(10, 24));
exit <<= THISBACK(Exit);
exit << [=] { Exit(); };
}
};

View file

@ -9,12 +9,10 @@ struct NonModalDialog : public TopWindow {
Close();
}
typedef NonModalDialog CLASSNAME;
NonModalDialog() {
SetRect(0, 0, 200, 50);
Add(b.SetLabel("Close non-modal dialog").SizePos());
b <<= THISBACK(DoClose);
b << [=] { DoClose(); };
}
};
@ -29,12 +27,10 @@ struct MainWindow : public TopWindow {
dlg.Open(this);
}
typedef MainWindow CLASSNAME;
MainWindow() {
SetRect(0, 0, 400, 100);
Add(b.SetLabel("Open/close non-modal dialog").SizePos());
b <<= THISBACK(DoOpen);
b << [=] { DoOpen(); };
}
};