mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
CtrlLib, Tutorial: fixed 16.2 tutorial (Layouts - Upp agnostic implementation).
This commit is contained in:
parent
b11938a43c
commit
d670725115
7 changed files with 41 additions and 19 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
using namespace Upp;
|
||||
|
||||
#define LAYOUTFILE <Gui16/dlg.lay>
|
||||
#define LAYOUTFILE <Gui16a/dlg.lay>
|
||||
#include <CtrlCore/lay.h>
|
||||
|
||||
struct MyAppWindow : public WithDlgLayout<TopWindow> {
|
||||
12
tutorial/Gui16b/Gui16b.upp
Normal file
12
tutorial/Gui16b/Gui16b.upp
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
description "Layouts - Upp namespace agnostic\377";
|
||||
|
||||
uses
|
||||
CtrlLib;
|
||||
|
||||
file
|
||||
main.cpp,
|
||||
dlg.lay;
|
||||
|
||||
mainconfig
|
||||
"" = "GUI";
|
||||
|
||||
6
tutorial/Gui16b/dlg.lay
Normal file
6
tutorial/Gui16b/dlg.lay
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
LAYOUT(DlgLayout, 208, 64)
|
||||
ITEM(Upp::Label, dv___0, SetLabel(t_("Label")).LeftPosZ(8, 36).TopPosZ(8, 19))
|
||||
ITEM(Upp::EditString, text, LeftPosZ(48, 92).TopPosZ(8, 19))
|
||||
ITEM(Upp::Option, option, SetLabel(t_("Option")).LeftPosZ(8, 108).TopPosZ(32, 15))
|
||||
END_LAYOUT
|
||||
|
||||
15
tutorial/Gui16b/main.cpp
Normal file
15
tutorial/Gui16b/main.cpp
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
#define LAYOUTFILE <Gui16b/dlg.lay>
|
||||
#include <CtrlCore/lay.h>
|
||||
|
||||
struct MyAppWindow : public WithDlgLayout<Upp::TopWindow> {
|
||||
MyAppWindow() {
|
||||
CtrlLayout(*this, "MyDialog");
|
||||
}
|
||||
};
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
MyAppWindow().Run();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue