mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
Tutorial: GUI tutorial typedef removal.
git-svn-id: svn://ultimatepp.org/upp/trunk@15426 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
c44a84196b
commit
f66ea03045
4 changed files with 3 additions and 13 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
|
|
@ -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(); };
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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(); };
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue