mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
.upptst
git-svn-id: svn://ultimatepp.org/upp/trunk@9547 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
a384a704ff
commit
02a500dbf8
8 changed files with 103 additions and 0 deletions
17
upptst/TestChStyle/TestChStyle.h
Normal file
17
upptst/TestChStyle/TestChStyle.h
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#ifndef _TestChStyle_TestChStyle_h
|
||||
#define _TestChStyle_TestChStyle_h
|
||||
|
||||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
#define LAYOUTFILE <TestChStyle/TestChStyle.lay>
|
||||
#include <CtrlCore/lay.h>
|
||||
|
||||
class TestChStyle : public WithTestChStyleLayout<TopWindow> {
|
||||
public:
|
||||
typedef TestChStyle CLASSNAME;
|
||||
TestChStyle();
|
||||
};
|
||||
|
||||
#endif
|
||||
9
upptst/TestChStyle/TestChStyle.lay
Normal file
9
upptst/TestChStyle/TestChStyle.lay
Normal file
|
|
@ -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
|
||||
|
||||
11
upptst/TestChStyle/TestChStyle.upp
Normal file
11
upptst/TestChStyle/TestChStyle.upp
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
uses
|
||||
CtrlLib;
|
||||
|
||||
file
|
||||
TestChStyle.h,
|
||||
main.cpp,
|
||||
TestChStyle.lay;
|
||||
|
||||
mainconfig
|
||||
"" = "GUI";
|
||||
|
||||
4
upptst/TestChStyle/init
Normal file
4
upptst/TestChStyle/init
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#ifndef _TestChStyle_icpp_init_stub
|
||||
#define _TestChStyle_icpp_init_stub
|
||||
#include "CtrlLib/init"
|
||||
#endif
|
||||
28
upptst/TestChStyle/main.cpp
Normal file
28
upptst/TestChStyle/main.cpp
Normal file
|
|
@ -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();
|
||||
}
|
||||
19
upptst/Zip/Zip.cpp
Normal file
19
upptst/Zip/Zip.cpp
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#include <Core/Core.h>
|
||||
#include <plugin/zip/zip.h>
|
||||
|
||||
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<int, int>(), GetSysTime(), false);
|
||||
|
||||
zip.BeginFile("test.txt", GetSysTime(), false);
|
||||
String h = "Just a test here!";
|
||||
h.Cat(' ', 1000);
|
||||
zip.Put(~h, h.GetCount());
|
||||
zip.EndFile();
|
||||
}
|
||||
10
upptst/Zip/Zip.upp
Normal file
10
upptst/Zip/Zip.upp
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
uses
|
||||
Core,
|
||||
plugin/zip;
|
||||
|
||||
file
|
||||
Zip.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "";
|
||||
|
||||
5
upptst/Zip/init
Normal file
5
upptst/Zip/init
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
#ifndef _Zip_icpp_init_stub
|
||||
#define _Zip_icpp_init_stub
|
||||
#include "Core/init"
|
||||
#include "plugin/zip/init"
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue