diff --git a/tutorial/Gui20a/main.cpp b/tutorial/Gui20a/main.cpp index 02a2a8080..a6b56f136 100644 --- a/tutorial/Gui20a/main.cpp +++ b/tutorial/Gui20a/main.cpp @@ -2,14 +2,14 @@ using namespace Upp; -struct MyApp : TopWindow { +struct MyAppWindow : TopWindow { Button exit; void Exit() { Break(999); } - MyApp() { + MyAppWindow() { SetRect(0, 0, 100, 100); Add(exit.SetLabel("exit").LeftPosZ(10, 64).TopPosZ(10, 24)); exit << [=] { Exit(); }; @@ -18,5 +18,5 @@ struct MyApp : TopWindow { GUI_APP_MAIN { - MyApp().Run(); + MyAppWindow().Run(); } diff --git a/tutorial/Gui20b/main.cpp b/tutorial/Gui20b/main.cpp index 1eba4f45c..a9d4423ff 100644 --- a/tutorial/Gui20b/main.cpp +++ b/tutorial/Gui20b/main.cpp @@ -2,10 +2,10 @@ using namespace Upp; -struct MyApp : TopWindow { +struct MyAppWindow : TopWindow { Button exit; - MyApp() { + MyAppWindow() { SetRect(0, 0, 100, 100); Add(exit.SetLabel("exit").LeftPosZ(10, 64).TopPosZ(10, 24)); exit <<= Breaker(999); @@ -14,5 +14,5 @@ struct MyApp : TopWindow { GUI_APP_MAIN { - MyApp().Run(); + MyAppWindow().Run(); } diff --git a/tutorial/Gui20c/main.cpp b/tutorial/Gui20c/main.cpp index e6a4aa85a..2c696876e 100644 --- a/tutorial/Gui20c/main.cpp +++ b/tutorial/Gui20c/main.cpp @@ -2,11 +2,11 @@ using namespace Upp; -struct MyApp : TopWindow { +struct MyAppWindow : TopWindow { Button ok, cancel; EditDate date; - MyApp() { + MyAppWindow() { SetRect(0, 0, 200, 90); Add(date.LeftPosZ(10, 80).TopPosZ(10, 20)); Add(ok.SetLabel("OK").LeftPosZ(10, 64).TopPosZ(40, 24)); @@ -19,7 +19,7 @@ struct MyApp : TopWindow { GUI_APP_MAIN { - MyApp app; + MyAppWindow app; switch(app.Run()) { case IDOK: PromptOK(String().Cat() << "OK: " << ~app.date); diff --git a/tutorial/Gui21/main.cpp b/tutorial/Gui21/main.cpp index 3fa8b686a..fde7e34cb 100644 --- a/tutorial/Gui21/main.cpp +++ b/tutorial/Gui21/main.cpp @@ -3,26 +3,23 @@ using namespace Upp; struct MyCtrl : public Ctrl { - int count; + int count = 0; - virtual void Paint(Draw& w) { + virtual void Paint(Draw& w) override { w.DrawRect(GetSize(), White()); w.DrawText(2, 2, AsString(count)); } - virtual void LeftDown(Point, dword) { + virtual void LeftDown(Point, dword) override { count++; Refresh(); } - - MyCtrl() { count = 0; } }; #define LAYOUTFILE #include struct Gui21 : public WithGui21Layout { - typedef Gui21 CLASSNAME; Gui21(); };