Ide, CtrlLib: typedef removal from GUI tutorial + small changesin Layout Designer article.

git-svn-id: svn://ultimatepp.org/upp/trunk@15427 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
klugier 2020-11-16 01:48:56 +00:00
parent ebb7ca3b5e
commit 11adff8af5
3 changed files with 1583 additions and 1595 deletions

View file

@ -739,8 +739,6 @@ your window.&]
[s7; struct MyAppWindow : TopWindow `{&]
[s7; -|[* Button button];&]
[s7; &]
[s7; -|typedef MyAppWindow CLASSNAME;&]
[s7; &]
[s7; -|MyAppWindow() `{&]
[s7; -|-|Title(`"My application with button`");&]
[s7; -|-|[* Add(button.LeftPos(10, 100).TopPos(10, 30));]&]
@ -792,8 +790,6 @@ logical coordinate the specifies the center position.&]
[s7; struct MyAppWindow : TopWindow `{&]
[s7; -|Button lt, rt, lb, rb, lv, ht, hv, cb, rc;&]
[s7; &]
[s7; -|typedef MyAppWindow CLASSNAME;&]
[s7; &]
[s7; -|MyAppWindow() `{&]
[s7; -|-|Title(`"My application with button`").Sizeable();&]
[s7; -|-|`*this&]
@ -849,8 +845,6 @@ is fixed to the default Windows font):&]
[s7; struct MyAppWindow : TopWindow `{&]
[s7; -|Button button;&]
[s7; &]
[s7; -|typedef MyAppWindow CLASSNAME;&]
[s7; &]
[s7; -|MyAppWindow() `{&]
[s7; -|-|Title(`"My application with font`-zoomed button`").Sizeable();&]
[s7; -|-|`*this << button.SetLabel(`"Button`").[* LeftPos][*@6 Z](10, 64).[* TopPos][*@6 Z](10,
@ -1158,12 +1152,10 @@ to Break is then returned from Run.&]
[s7; -|-|[* Break](999);&]
[s7; -|`}&]
[s7; -|&]
[s7; -|typedef MyApp CLASSNAME;&]
[s7; -|&]
[s7; -|MyApp() `{&]
[s7; -|-|SetRect(0, 0, 100, 100);&]
[s7; -|-|Add(exit.SetLabel(`"exit`").LeftPosZ(10, 64).TopPosZ(10, 24));&]
[s7; -|-|exit <<`= THISBACK(Exit);&]
[s7; -|-|exit << `[`=`] `{ Exit(); `};&]
[s7; -|`}&]
[s7; `};&]
[s7; &]
@ -1183,8 +1175,6 @@ performs the [* Break].&]
[s7; struct MyApp : TopWindow `{&]
[s7; -|Button exit;&]
[s7; &]
[s7; -|typedef MyApp CLASSNAME;&]
[s7; -|&]
[s7; -|MyApp() `{&]
[s7; -|-|SetRect(0, 0, 100, 100);&]
[s7; -|-|Add(exit.SetLabel(`"exit`").LeftPosZ(10, 64).TopPosZ(10, 24));&]
@ -1212,8 +1202,6 @@ that invoke [* Accept] and [* Reject] as needed before calling the
[s7; -|Button ok, cancel;&]
[s7; -|EditDate date;&]
[s7; &]
[s7; -|typedef MyApp CLASSNAME;&]
[s7; -|&]
[s7; -|MyApp() `{&]
[s7; -|-|SetRect(0, 0, 200, 90);&]
[s7; -|-|Add(date.LeftPosZ(10, 80).TopPosZ(10, 20));&]
@ -1370,12 +1358,10 @@ window.&]
[s7; -|-|[* Close]();&]
[s7; -|`}&]
[s7; -|&]
[s7; -|typedef NonModalDialog CLASSNAME;&]
[s7; -|&]
[s7; -|NonModalDialog() `{&]
[s7; -|-|SetRect(0, 0, 200, 50);&]
[s7; -|-|Add(b.SetLabel(`"Close non`-modal dialog`").SizePos());&]
[s7; -|-|b <<`= THISBACK(DoClose);&]
[s7; -|-|b << `[`=`] `{ DoClose(); `};&]
[s7; -|`}&]
[s7; `};&]
[s7; &]
@ -1390,12 +1376,10 @@ window.&]
[s7; -|-|-|[* dlg.Open(this);]&]
[s7; -|`}&]
[s7; -|&]
[s7; -|typedef MainWindow CLASSNAME;&]
[s7; -|&]
[s7; -|MainWindow() `{&]
[s7; -|-|SetRect(0, 0, 400, 100);&]
[s7; -|-|Add(b.SetLabel(`"Open/close non`-modal dialog`").SizePos());&]
[s7; -|-|b <<`= THISBACK(DoOpen);&]
[s7; -|-|b << `[`=`] `{ DoOpen(); `};&]
[s7; -|`}&]
[s7; `};&]
[s7; &]

View file

@ -51,6 +51,7 @@ that can be directly used in application source code. It significantly
reduces the amount of time needed to create the program. It separates
logic from user interface. This allows to use some modern software
architectures like MVC (Model View Controller).&]
[s5; Layout Designer &]
[s0; &]
[s0;=
@@rawimage:3349&2962
@ -313,7 +314,10 @@ present below:&]
[s3;:4: 4. Adding support for custom widgets&]
[s5; For any widget Layout Designer support can be added. To do so
[* .usc] file should be created in the package where the widget
source code is located.&]
source code is located. After that, in .usc file the code that
describes widget should be added. There is lesson [*^topic`:`/`/CtrlLib`/srcdoc`/Tutorial`_en`-us`#21^ C
reating and using custom widgets] in GUI tutorial where the whole
process is explained.&]
[s5; More information about the scripting language that is used by
.usc file interpreter can be found [^topic`:`/`/Esc`/srcdoc`/Esc`_en`-us^ here].&]
[s3;:5: 5. Under the hood&]

File diff suppressed because it is too large Load diff