diff --git a/uppdev/RichEditTest/RichEditTest.upp b/uppdev/RichEditTest/RichEditTest.upp index 25850ee8c..66c855ca2 100644 --- a/uppdev/RichEditTest/RichEditTest.upp +++ b/uppdev/RichEditTest/RichEditTest.upp @@ -5,7 +5,8 @@ uses file main.cpp, todo.txt, - test.tpp; + test.tpp, + test.iml; mainconfig "" = "GUI", diff --git a/uppdev/RichEditTest/main.cpp b/uppdev/RichEditTest/main.cpp index bf4fa8994..ac26d7b7d 100644 --- a/uppdev/RichEditTest/main.cpp +++ b/uppdev/RichEditTest/main.cpp @@ -28,6 +28,7 @@ GUI_APP_MAIN DUMP(ScrollBarSize()); e.Pick(ParseQTF(LoadFile(FileName()))); +// e.ClipZoom(4, 1); RichEdit::PosInfo f; LoadFromFile(f, ConfigFile("pos")); e.SetPosInfo(f); diff --git a/uppdev/RichEditTest/test.iml b/uppdev/RichEditTest/test.iml new file mode 100644 index 000000000..a5b0ccf38 --- /dev/null +++ b/uppdev/RichEditTest/test.iml @@ -0,0 +1 @@ +PREMULTIPLIED diff --git a/uppdev/TabCtrl/main.cpp b/uppdev/TabCtrl/main.cpp index d22a07a05..9107c695c 100644 --- a/uppdev/TabCtrl/main.cpp +++ b/uppdev/TabCtrl/main.cpp @@ -14,7 +14,9 @@ TabCtrlTest::TabCtrlTest() CtrlLayout(tab2); CtrlLayout(tab3); b.SetRect(0, 0, 16, 16); - tab.Add(tab1, "First")/*.Control(&b)*/; + tab.Add(tab1, "\1[G0@K$K First")/*.Control(&b)*/; +// tab.Add(tab1, "First")/*.Control(&b)*/; +#if 0 tab.Add(tab2, "Second")/*.Image(CtrlImg::cut())*/; tab.Add(tab3, "Third"); tab.Add(arr.SizePos(), "Array"); @@ -28,6 +30,7 @@ TabCtrlTest::TabCtrlTest() tab.Add(arr.SizePos(), "Array"); tab.Add(arr.SizePos(), "Array"); tab.Set(2); +#endif // tab.SetStyle(tab.StyleDefault().Standard()); arr.AddColumn("1") diff --git a/uppdev/TestEditInt/TestEditInt.lay b/uppdev/TestEditInt/TestEditInt.lay index 2f86b0a48..b894f57b8 100644 --- a/uppdev/TestEditInt/TestEditInt.lay +++ b/uppdev/TestEditInt/TestEditInt.lay @@ -1,3 +1,4 @@ LAYOUT(TestEditIntLayout, 448, 412) - ITEM(EditInt, edt3, LeftPosZ(68, 48).TopPosZ(52, 19)) + ITEM(EditIntSpin, edt, LeftPosZ(68, 48).TopPosZ(52, 19)) END_LAYOUT + diff --git a/uppdev/TestEditInt/main.cpp b/uppdev/TestEditInt/main.cpp index 5c24dcee2..f2257b2f8 100644 --- a/uppdev/TestEditInt/main.cpp +++ b/uppdev/TestEditInt/main.cpp @@ -16,6 +16,7 @@ class TestEditInt : public WithTestEditIntLayout TestEditInt::TestEditInt() { CtrlLayout(*this, "Window title"); +// edt.OnSides(); } GUI_APP_MAIN diff --git a/uppdev/TestPainter/main.cpp b/uppdev/TestPainter/main.cpp index 906c8790a..e359f9089 100644 --- a/uppdev/TestPainter/main.cpp +++ b/uppdev/TestPainter/main.cpp @@ -5,27 +5,30 @@ using namespace Upp; struct App : TopWindow { void Paint(Draw& w) { - Font fnt = Roman(20); - String txt = "IČ Z"; - Vector dx; - for(int i = 0; i < txt.GetCount(); i++) - dx.Add(fnt['W']); - { - DrawPainter sw(w, GetSize()); - sw.Clear(White()); - for(int i = 0; i < 20; i++) { - sw.DrawRect(100 + 50 * i, 100, 4, 4, i & 1 ? LtRed() : LtBlue()); - sw.DrawText(100 + 50 * i, 100, 300 * i, txt, fnt, i & 1 ? Red() : Blue()); - sw.DrawRect(100 + 50 * i, 200, 4, 4, i & 1 ? LtRed() : LtBlue()); - sw.DrawText(100 + 50 * i, 200, 300 * i, txt, fnt, i & 1 ? Red() : Blue(), dx); - } - } - for(int i = 0; i < 20; i++) { - w.DrawRect(100 + 50 * i, 300, 4, 4, i & 1 ? LtRed() : LtBlue()); - w.DrawText(100 + 50 * i, 300, 300 * i, txt, fnt, i & 1 ? Red() : Blue()); - w.DrawRect(100 + 50 * i, 400, 4, 4, i & 1 ? LtRed() : LtBlue()); - w.DrawText(100 + 50 * i, 400, 300 * i, txt, fnt, i & 1 ? Red() : Blue(), dx); - } + DrawPainter sw(w, GetSize()); + sw.Clear(White()); + double width2=200; + double width1=100; + double h1=50.5; + double length2=100; + sw.Offset(200, 200); + sw + .Move(-.5*width2, h1) + .Line(-.5*width1, 0) + .Line( .5*width1, 0) + .Line( .5*width2, h1) + .Line(-.5*width2, h1) + .Fill(Green()) +// .Fill(-.25*width2, h1, White(), -.15*width2, .4*h1, .3*width2, Green()) + ; + sw + .Rectangle(-.5*width2,h1,width2,length2) + .ColorStop(0.10, Green()) + .ColorStop(0.25, White()) + .ColorStop(0.55, Green()) + .Fill(Green()) +// .Fill(-.5*width2, 0., Green(), .5*width2, 0., Green()) + ; } }; diff --git a/uppdev/cjk/cjk.upp b/uppdev/cjk/cjk.upp new file mode 100644 index 000000000..78afc12a4 --- /dev/null +++ b/uppdev/cjk/cjk.upp @@ -0,0 +1,9 @@ +uses + CtrlLib; + +file + main.cpp; + +mainconfig + "" = "GUI SSE2"; + diff --git a/uppdev/cjk/main.cpp b/uppdev/cjk/main.cpp new file mode 100644 index 000000000..20cd1f231 --- /dev/null +++ b/uppdev/cjk/main.cpp @@ -0,0 +1,16 @@ +#include + +using namespace Upp; + +struct MyApp : TopWindow { + virtual void Paint(Draw& w) { + w.DrawRect(GetSize(), White); + w.DrawText(10, 10, "ultimate++是一个性能优良的C++GUI库"); + } +}; + +GUI_APP_MAIN +{ + MyApp().Run(); +} +