mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-21 06:45:39 -06:00
.upptst
git-svn-id: svn://ultimatepp.org/upp/trunk@6589 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
2a51384295
commit
c4d471c5f3
7 changed files with 71 additions and 3 deletions
|
|
@ -242,7 +242,7 @@ CONSOLE_APP_MAIN
|
||||||
{
|
{
|
||||||
StdLogSetup(LOG_FILE|LOG_COUT);
|
StdLogSetup(LOG_FILE|LOG_COUT);
|
||||||
SeedRandom();
|
SeedRandom();
|
||||||
/*
|
|
||||||
SetTest<int>();
|
SetTest<int>();
|
||||||
TestLowerBound<int>();
|
TestLowerBound<int>();
|
||||||
TestUpperBound<int>();
|
TestUpperBound<int>();
|
||||||
|
|
@ -256,7 +256,7 @@ CONSOLE_APP_MAIN
|
||||||
RemoveTest<String>();
|
RemoveTest<String>();
|
||||||
InsertNTest<String>();
|
InsertNTest<String>();
|
||||||
InVectorTest<String>();
|
InVectorTest<String>();
|
||||||
*/
|
|
||||||
SetTest<TestType>();
|
SetTest<TestType>();
|
||||||
TestLowerBound<TestType>();
|
TestLowerBound<TestType>();
|
||||||
TestUpperBound<TestType>();
|
TestUpperBound<TestType>();
|
||||||
|
|
|
||||||
0
upptst/PrintBg/PrintBg.upp
Normal file
0
upptst/PrintBg/PrintBg.upp
Normal file
17
upptst/PrintImage/Arrow.iml
Normal file
17
upptst/PrintImage/Arrow.iml
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
PREMULTIPLIED
|
||||||
|
IMAGE_ID(Arrow)
|
||||||
|
|
||||||
|
IMAGE_BEGIN_DATA
|
||||||
|
IMAGE_DATA(120,156,237,151,91,170,133,48,12,69,29,207,253,60,243,31,148,239,183,246,176,47,20,228,160,54,105,99,154,15,23,244)
|
||||||
|
IMAGE_DATA(79,208,213,186,147,180,248,20,127,133,199,9,179,174,171,235,251,222,53,77,163,178,198,113,116,251,190,139,58,76,211,228)
|
||||||
|
IMAGE_DATA(170,170,114,101,89,170,46,236,155,4,216,15,236,139,246,247,251,133,115,145,112,192,126,228,114,144,242,200,237,32,229,49)
|
||||||
|
IMAGE_DATA(12,131,171,235,90,116,113,51,38,245,95,109,219,38,186,186,174,83,247,144,4,123,194,117,176,230,129,190,211,182,109,182)
|
||||||
|
IMAGE_DATA(124,72,0,7,124,75,206,156,167,178,44,203,127,182,67,223,122,247,76,110,15,106,255,71,102,144,157,171,51,203,229,193)
|
||||||
|
IMAGE_DATA(233,255,168,235,126,126,178,228,65,237,255,56,39,156,215,113,6,180,226,65,205,51,178,128,103,127,177,224,65,205,51,106)
|
||||||
|
IMAGE_DATA(239,153,131,5,143,121,158,73,14,200,51,250,249,21,185,60,240,111,83,107,18,50,19,186,15,229,240,224,212,36,234,157)
|
||||||
|
IMAGE_DATA(78,219,131,91,147,168,104,122,80,231,85,228,5,217,231,160,229,65,173,73,161,60,231,244,224,206,24,49,60,233,17,59)
|
||||||
|
IMAGE_DATA(99,88,242,72,153,49,36,61,112,198,177,80,243,12,7,244,65,9,206,60,238,250,127,8,234,221,45,166,38,113,60,98)
|
||||||
|
IMAGE_DATA(235,133,119,160,204,122,120,38,118,159,40,30,148,254,127,134,244,140,17,3,222,15,23,78,239,60,242,196,140,161,141,118)
|
||||||
|
IMAGE_DATA(77,122,2,206,140,33,85,147,164,73,189,187,89,1,189,55,228,144,82,187,181,8,245,136,148,218,173,205,85,157,178,154)
|
||||||
|
IMAGE_DATA(231,59,142,125,131,123,239,177,8,254,51,235,89,120,121,121,57,231,11,8,76,70,51,0,0,0,0,0,0,0,0,0)
|
||||||
|
IMAGE_END_DATA(384, 1)
|
||||||
10
upptst/PrintImage/PrintImage.upp
Normal file
10
upptst/PrintImage/PrintImage.upp
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
uses
|
||||||
|
CtrlLib;
|
||||||
|
|
||||||
|
file
|
||||||
|
main.cpp,
|
||||||
|
Arrow.iml;
|
||||||
|
|
||||||
|
mainconfig
|
||||||
|
"" = "GUI SSE2";
|
||||||
|
|
||||||
4
upptst/PrintImage/init
Normal file
4
upptst/PrintImage/init
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
#ifndef _PrintImage_icpp_init_stub
|
||||||
|
#define _PrintImage_icpp_init_stub
|
||||||
|
#include "CtrlLib/init"
|
||||||
|
#endif
|
||||||
25
upptst/PrintImage/main.cpp
Normal file
25
upptst/PrintImage/main.cpp
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
#include <CtrlLib/CtrlLib.h>
|
||||||
|
|
||||||
|
using namespace Upp;
|
||||||
|
|
||||||
|
#define IMAGECLASS ArrowImg
|
||||||
|
#define IMAGEFILE <PrintImage/Arrow.iml>
|
||||||
|
#include <Draw/iml_header.h>
|
||||||
|
|
||||||
|
#define IMAGECLASS ArrowImg
|
||||||
|
#define IMAGEFILE <PrintImage/Arrow.iml>
|
||||||
|
#include <Draw/iml_source.h>
|
||||||
|
|
||||||
|
GUI_APP_MAIN
|
||||||
|
{
|
||||||
|
PrinterJob pd("test");
|
||||||
|
if(!pd.Execute())
|
||||||
|
return;
|
||||||
|
Draw& w = pd;
|
||||||
|
Size sz = w.GetPageSize();
|
||||||
|
w.StartPage();
|
||||||
|
Size isz = CtrlImg::exclamation().GetSize();
|
||||||
|
w.DrawImage(1000, 0, 500, 500, ArrowImg::Arrow());
|
||||||
|
w.DrawImage(0, 0, 500, 500, CtrlImg::exclamation());
|
||||||
|
w.EndPage();
|
||||||
|
}
|
||||||
|
|
@ -2,12 +2,24 @@
|
||||||
|
|
||||||
using namespace Upp;
|
using namespace Upp;
|
||||||
|
|
||||||
|
void Background(Report *r)
|
||||||
|
{
|
||||||
|
Draw& w = *r;
|
||||||
|
Size sz = r->GetSize();
|
||||||
|
Image m = CtrlImg::exclamation();
|
||||||
|
Size isz = m.GetSize();
|
||||||
|
for(int x = -isz.cx / 2; x < sz.cx; x += isz.cx)
|
||||||
|
for(int y = -isz.cy / 2; y < sz.cy; y += isz.cy)
|
||||||
|
w.DrawImage(x, y, m);
|
||||||
|
}
|
||||||
|
|
||||||
GUI_APP_MAIN
|
GUI_APP_MAIN
|
||||||
{
|
{
|
||||||
Report r;
|
Report r;
|
||||||
|
r.WhenPage = callback1(Background, &r);
|
||||||
r.Header("[A2< Header Page $$P");
|
r.Header("[A2< Header Page $$P");
|
||||||
r.Footer("[A2> Footer Page $$P");
|
r.Footer("[A2> Footer Page $$P");
|
||||||
r << "This is some [* QTF text";
|
r << "This is some [* QTF text&something else";
|
||||||
r << t_("顯示[* QTF 文字");
|
r << t_("顯示[* QTF 文字");
|
||||||
r << "&&Let's report some table:";
|
r << "&&Let's report some table:";
|
||||||
r << t_("輸出表格式報表:");
|
r << t_("輸出表格式報表:");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue