diff --git a/upptst/TestChStyle/TestChStyle.h b/upptst/TestChStyle/TestChStyle.h new file mode 100644 index 000000000..cc511fc42 --- /dev/null +++ b/upptst/TestChStyle/TestChStyle.h @@ -0,0 +1,17 @@ +#ifndef _TestChStyle_TestChStyle_h +#define _TestChStyle_TestChStyle_h + +#include + +using namespace Upp; + +#define LAYOUTFILE +#include + +class TestChStyle : public WithTestChStyleLayout { +public: + typedef TestChStyle CLASSNAME; + TestChStyle(); +}; + +#endif diff --git a/upptst/TestChStyle/TestChStyle.lay b/upptst/TestChStyle/TestChStyle.lay new file mode 100644 index 000000000..10705bb05 --- /dev/null +++ b/upptst/TestChStyle/TestChStyle.lay @@ -0,0 +1,9 @@ +LAYOUT(TestChStyleLayout, 236, 164) + ITEM(EditString, normal, LeftPosZ(8, 216).TopPosZ(8, 19)) + ITEM(EditString, readonly, SetEditable(false).LeftPosZ(8, 216).TopPosZ(32, 19)) + ITEM(EditString, disabled, LeftPosZ(8, 216).TopPosZ(56, 19)) + ITEM(DropList, dl_normal, LeftPosZ(8, 216).TopPosZ(88, 19)) + ITEM(DropList, dl_readonly, SetEditable(false).LeftPosZ(8, 216).TopPosZ(112, 19)) + ITEM(DropList, dl_disabled, LeftPosZ(8, 216).TopPosZ(136, 19)) +END_LAYOUT + diff --git a/upptst/TestChStyle/TestChStyle.upp b/upptst/TestChStyle/TestChStyle.upp new file mode 100644 index 000000000..99f187971 --- /dev/null +++ b/upptst/TestChStyle/TestChStyle.upp @@ -0,0 +1,11 @@ +uses + CtrlLib; + +file + TestChStyle.h, + main.cpp, + TestChStyle.lay; + +mainconfig + "" = "GUI"; + diff --git a/upptst/TestChStyle/init b/upptst/TestChStyle/init new file mode 100644 index 000000000..539c8a009 --- /dev/null +++ b/upptst/TestChStyle/init @@ -0,0 +1,4 @@ +#ifndef _TestChStyle_icpp_init_stub +#define _TestChStyle_icpp_init_stub +#include "CtrlLib/init" +#endif diff --git a/upptst/TestChStyle/main.cpp b/upptst/TestChStyle/main.cpp new file mode 100644 index 000000000..98bc7ec88 --- /dev/null +++ b/upptst/TestChStyle/main.cpp @@ -0,0 +1,28 @@ +#include "TestChStyle.h" + +void Dl(DropList& dl) +{ + dl.Add("Case1"); + dl.Add("Case2"); + dl <<= "Case1"; +} + +TestChStyle::TestChStyle() +{ + CtrlLayout(*this, "Window title"); + + readonly <<= "Read only"; + disabled <<= "Disabled"; + disabled.Disable(); + + Dl(dl_normal); + Dl(dl_readonly); + Dl(dl_disabled); + dl_disabled.Disable(); +} + +GUI_APP_MAIN +{ + Ctrl::SetSkin(ChStdSkin); + TestChStyle().Run(); +} diff --git a/upptst/Zip/Zip.cpp b/upptst/Zip/Zip.cpp new file mode 100644 index 000000000..d931e69ad --- /dev/null +++ b/upptst/Zip/Zip.cpp @@ -0,0 +1,19 @@ +#include +#include + +using namespace Upp; + +CONSOLE_APP_MAIN +{ + FileZip zip(GetHomeDirFile("test.zip")); + String s = LoadDataFile("Zip.cpp"); + zip.WriteFile(s, "zip.cpp"); + + zip.WriteFile(s, "zip2.cpp", Gate2(), GetSysTime(), false); + + zip.BeginFile("test.txt", GetSysTime(), false); + String h = "Just a test here!"; + h.Cat(' ', 1000); + zip.Put(~h, h.GetCount()); + zip.EndFile(); +} diff --git a/upptst/Zip/Zip.upp b/upptst/Zip/Zip.upp new file mode 100644 index 000000000..718f2b294 --- /dev/null +++ b/upptst/Zip/Zip.upp @@ -0,0 +1,10 @@ +uses + Core, + plugin/zip; + +file + Zip.cpp; + +mainconfig + "" = ""; + diff --git a/upptst/Zip/init b/upptst/Zip/init new file mode 100644 index 000000000..6fe970ab3 --- /dev/null +++ b/upptst/Zip/init @@ -0,0 +1,5 @@ +#ifndef _Zip_icpp_init_stub +#define _Zip_icpp_init_stub +#include "Core/init" +#include "plugin/zip/init" +#endif