Doc, CtrlLib: Updated upp namespace agnostic implementation in context of layouts.

git-svn-id: svn://ultimatepp.org/upp/trunk@15341 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
klugier 2020-10-31 20:03:55 +00:00
parent db8060e8b6
commit b07df853e0
2 changed files with 16 additions and 8 deletions

File diff suppressed because one or more lines are too long

View file

@ -913,13 +913,11 @@ member).]&]
[s5; If you prefer to write code that is namespace agnostic, you
are not forced to use namespace Upp in the context of using layouts.
Below implementation presents how you can avoid such situation:&]
[s5; &]
[s0; &]
[s7; #include <CtrlLib/CtrlLib.h>&]
[s7; &]
[s7; namespace Upp `{&]
[s7; -|#define LAYOUTFILE <Gui16/dlg.lay>&]
[s7; -|#include <CtrlCore/lay.h>&]
[s7; `}&]
[s7; #define LAYOUTFILE <Gui16/dlg.lay>&]
[s7; #include <CtrlCore/lay.h>&]
[s7; &]
[s7; struct MyApp : public Upp`::WithDlgLayout<Upp`::TopWindow> `{&]
[s7; -|MyApp() `{&]
@ -931,7 +929,17 @@ Below implementation presents how you can avoid such situation:&]
[s7; `{&]
[s7; -|MyApp().Run();&]
[s7; `}&]
[s5; &]
[s0; &]
[s5; Please notice that from version 2021.1 of U`+`+ framework surrounding
inclusion with namespace is not required:&]
[s0; &]
[s7; namespace Upp `{&]
[s7; -|#define LAYOUTFILE <Gui16/dlg.lay>&]
[s7; -|#include <CtrlCore/lay.h>&]
[s7; `}&]
[s0; &]
[s5; However, for backward compatibility above construction is still
valid.&]
[s3;:17: 17. Value of widget&]
[s5; Many widgets have some sort of natural value. E.g. the value
of [^`:`:EditString^ EditString] is String entered by user, whereas