git-svn-id: svn://ultimatepp.org/upp/trunk@5120 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2012-07-05 08:23:17 +00:00
parent 8bee4528f7
commit 6622aac7f4
11 changed files with 158 additions and 66 deletions

View file

@ -1,7 +1,7 @@
LAYOUT(AccessKeyLayout, 200, 100)
ITEM(Button, ok, SetLabel(t_("OK")).RightPosZ(90, 80).BottomPosZ(4, 22))
ITEM(Button, cancel, SetLabel(t_("Cancel")).RightPosZ(4, 80).BottomPosZ(4, 22))
ITEM(Label, dv___2, SetLabel(t_("Test")).SetFont(SansSerifZ(20)).LeftPosZ(4, 48).TopPosZ(4, 32))
ITEM(Label, dv___2, SetLabel(t_("asdfasdf\aTest")).SetFont(SansSerifZ(20)).LeftPosZ(4, 48).TopPosZ(4, 32))
ITEM(EditDate, dv___3, LeftPosZ(56, 140).TopPosZ(4, 19))
END_LAYOUT

View file

@ -5,6 +5,7 @@ include
gdfgsdfg;
file
test.js highlight js,
h.iml,
bak.tpp,
AccessKey.h,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Before After
Before After

48
uppdev/AccessKey/test.js Normal file
View file

@ -0,0 +1,48 @@
var s1 = new String("Hello !");
var s2 = new String("Hello !");
s1 == s2; // Is false, because they are two distinct objects.
s1.valueOf() == s2.valueOf(); // Is true.
//Automatic type coercion
alert(true == 2 ); // false... true → 1 !== 2 ← 2
alert(false == 2 ); // false... false → 0 !== 2 ← 2
alert(true == 1 ); // true.... true → 1 === 1 ← 1
alert(false == 0 ); // true.... false → 0 === 0 ← 0
alert(true == "2"); // false... true → 1 !== 2 ← "2"
alert(false == "2"); // false... false → 0 !== 2 ← "2"
alert(true == "1"); // true.... true → 1 === 1 ← "1"
alert(false == "0"); // true.... false → 0 === 0 ← "0"
alert(false == "" ); // true.... false → 0 === 0 ← ""
alert(false == NaN); // false... false → 0 !== NaN
//Type checked comparison (no conversion of types and values)
alert(true === 1); // false... data types do not match
//Explicit type coercion
alert(true === !!2); // true.... data types and values match
alert(true === !!0); // false... data types match but values differ
alert( 1 ? true : false); // true.... only ±0 and NaN are “falsy” numbers
alert("0" ? true : false); // true.... only the empty string is “falsy”
alert(Boolean({})); // true.... all objects are “truthy” except null
var d = new Date(2010, 2, 1, 14, 25, 30); // 2010-Mar-01 14:25:30
// Displays '2010-3-1 14:25:30':
alert(d.getFullYear() + '-' + (d.getMonth()+1) + '-' + d.getDate() + ' '
+ d.getHours() + ':' + d.getMinutes() + ':' + d.getSeconds());
// Built-in toString returns something like 'Mon Mar 01 2010 14:25:30 GMT-0500 (EST)':
alert(d);
s.length
var myRe = /(\d{4}-\d{2}-\d{2}) (\d{2}:\d{2}:\d{2})/;
var results = myRe.exec("The date and time are 2009-09-08 09:37:08.");
if (results) {
alert("Matched: " + results[0]); // Entire match
var my_date = results[1]; // First group == "2009-09-08"
var my_time = results[2]; // Second group == "09:37:08"
alert("It is " + my_time + " on " + my_date);
} else alert("Did not find a valid date!");
try

View file

@ -0,0 +1,10 @@
uses
CtrlLib,
Painter;
file
main.cpp;
mainconfig
"" = "GUI SSE2";

5
uppdev/PictureCtrl/init Normal file
View file

@ -0,0 +1,5 @@
#ifndef _PictureCtrl_icpp_init_stub
#define _PictureCtrl_icpp_init_stub
#include "CtrlLib/init"
#include "Painter/init"
#endif

View file

@ -0,0 +1,17 @@
#include <CtrlLib/CtrlLib.h>
#include <Painter/Painter.h>
using namespace Upp;
GUI_APP_MAIN
{
PaintingPainter p(100, 100);
p.Circle(50, 50, 40).Stroke(3, Black()).Fill(LtBlue());
Picture pc;
pc.Transparent();
pc.Background(Null).Set(AsDrawing(p));
TopWindow win;
win.Add(pc.SizePos());
win.Sizeable().Zoomable();
win.Run();
}

View file

@ -1,56 +1,59 @@
#include <RichEdit/RichEdit.h>
using namespace Upp;
String FileName()
{
// return "d:/test.qtf";
return GetExeDirFile("test.qtf");
}
GUI_APP_MAIN
{
// ChClassicSkin();
// ChStdSkin();
// SetLanguage(LNG_('P','L','P','L'));
// InstallCrashDump();
DDUMP(GetStdFontCy());
DUMP(GUI_PopUpEffect());
RichEditWithToolBar e;
e.SetPage(Size(6074, 3968));
Vector<int> h;
for(int i = 1; i < Font::GetFaceCount(); i++)
if((Font::GetFaceInfo(i) & Font::SCALEABLE) && !(Font::GetFaceInfo(i) & Font::SPECIAL))
h.Add(i);
e.FontFaces(h);
// GUI_PopUpEffect_Write(GUIEFFECT_NONE);
DUMP(ScrollBarSize());
e.Pick(ParseQTF(LoadFile(FileName())));
// e.SetQTF(LoadFile("U:\\xxx\\PainterBug.qtf"));
// e.ClipZoom(4, 1);
// Ctrl::ShowRepaint(50);
RichEdit::PosInfo f;
LoadFromFile(f, ConfigFile("pos"));
e.SetPosInfo(f);
// e.Pick(ParseQTF(AsQTF(CreateImageObject(CtrlImg::exclamation)) + " hahahaha"));
TopWindow w;
w.SetRect(0, 0, 700, 500);
w.Sizeable().Zoomable();
w.Add(e.SizePos());
w.Run();
/*
String strQTF = e.GetQTF(CHARSET_ISO8859_1);
e.SetQTF(strQTF);
w.Run();
*/
String x = e.GetQTF();
SaveFile(FileName(), x);
f = e.GetPosInfo();
StoreToFile(f, ConfigFile("pos"));
LOG("Exit");
}
#include <RichEdit/RichEdit.h>
using namespace Upp;
String FileName()
{
// return "d:/test.qtf";
return GetExeDirFile("test.qtf");
}
GUI_APP_MAIN
{
// ChClassicSkin();
// ChStdSkin();
// SetLanguage(LNG_('P','L','P','L'));
// InstallCrashDump();
DDUMP(GetStdFontCy());
DUMP(GUI_PopUpEffect());
PromptOK("[H20L1 &&&");
RichEditWithToolBar e;
e.SetPage(Size(6074, 3968));
Vector<int> h;
for(int i = 1; i < Font::GetFaceCount(); i++)
if((Font::GetFaceInfo(i) & Font::SCALEABLE) && !(Font::GetFaceInfo(i) & Font::SPECIAL))
h.Add(i);
e.FontFaces(h);
// GUI_PopUpEffect_Write(GUIEFFECT_NONE);
DUMP(ScrollBarSize());
e.Pick(ParseQTF(LoadFile(FileName())));
// e.SetQTF(LoadFile("U:\\xxx\\PainterBug.qtf"));
// e.ClipZoom(4, 1);
// Ctrl::ShowRepaint(50);
RichEdit::PosInfo f;
LoadFromFile(f, ConfigFile("pos"));
e.SetPosInfo(f);
// e.Pick(ParseQTF(AsQTF(CreateImageObject(CtrlImg::exclamation)) + " hahahaha"));
TopWindow w;
w.SetRect(0, 0, 700, 500);
w.Sizeable().Zoomable();
w.Add(e.SizePos());
w.Run();
/*
String strQTF = e.GetQTF(CHARSET_ISO8859_1);
e.SetQTF(strQTF);
w.Run();
*/
String x = e.GetQTF();
SaveFile(FileName(), x);
f = e.GetPosInfo();
StoreToFile(f, ConfigFile("pos"));
LOG("Exit");
}

View file

@ -1,9 +1,10 @@
uses
CtrlLib,
Geom;
file
main.cpp;
mainconfig
"" = "GUI ST";
uses
CtrlLib,
Geom;
file
main.cpp;
mainconfig
"" = "GUI ST";

5
uppdev/TestDraw/init Normal file
View file

@ -0,0 +1,5 @@
#ifndef _TestDraw_icpp_init_stub
#define _TestDraw_icpp_init_stub
#include "CtrlLib/init"
#include "Geom/init"
#endif

View file

@ -11,6 +11,8 @@ class TestDraw : public TopWindow {
w.DrawRect(200, 200, 1, 1, SBlack);
for(int i = 0; i < 3600; i += 450)
w.DrawText(200, 200, i, "Test of angle!", Arial(30));
w.DrawLine(0, 300, 1000, 300, PEN_DOT);
w.DrawLine(0, 305, 1000, 305, PEN_DASH);
}
public: