mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Several examples fixed to compile and work in new draw
git-svn-id: svn://ultimatepp.org/upp/trunk@1386 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
bacf2dc0ec
commit
b87ec0e8ff
10 changed files with 46 additions and 25 deletions
|
|
@ -14,7 +14,7 @@ GUI_APP_MAIN
|
|||
w.StartPage();
|
||||
const char *text = "Hello world!";
|
||||
Font font = Roman(300);
|
||||
Point p = Rect(w.GetPagePixels()).CenterPos(GetTextSize(text, font));
|
||||
Point p = Rect(w.GetPageSize()).CenterPos(GetTextSize(text, font));
|
||||
w.DrawText(p.x, p.y, "Hello world!", font);
|
||||
w.EndPage();
|
||||
}
|
||||
|
|
|
|||
11
reference/RichImlImage/RichImlImage.upp
Normal file
11
reference/RichImlImage/RichImlImage.upp
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
description "Demonstrates usage of internal (iml) images in QTF\377";
|
||||
|
||||
uses
|
||||
CtrlLib;
|
||||
|
||||
file
|
||||
main.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "GUI";
|
||||
|
||||
8
reference/RichImlImage/main.cpp
Normal file
8
reference/RichImlImage/main.cpp
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
PromptOK("@@iml:400*400`CtrlImg:exclamation`");
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
LAYOUT(MainLayout, 404, 204)
|
||||
ITEM(CounterCtrl, counter, SetFont(Roman(34)).Ink(Color(153, 0, 51)).Paper(Color(102, 204, 204)).LeftPosZ(128, 120).TopPosZ(56, 52))
|
||||
ITEM(CounterCtrl, counter, SetFont(RomanZ(34)).Ink(Color(153, 0, 51)).Paper(Color(102, 204, 204)).LeftPosZ(128, 120).TopPosZ(56, 52))
|
||||
ITEM(LabelBox, dv___1, SetLabel(t_("This is the CounterCtrl")).LeftPosZ(98, 184).TopPosZ(36, 80))
|
||||
END_LAYOUT
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue