git-svn-id: svn://ultimatepp.org/upp/trunk@3905 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2011-09-24 12:22:45 +00:00
parent 87b197ae57
commit d61e2d62a8
3 changed files with 3223 additions and 2 deletions

View file

@ -3,6 +3,7 @@ uses
file
image.iml,
help.iml,
main.cpp;
mainconfig

3199
uppdev/ScrollTest/help.iml Normal file

File diff suppressed because it is too large Load diff

View file

@ -10,6 +10,8 @@ using namespace Upp;
#define IMAGEFILE <ScrollTest/image.iml>
#include <Draw/iml_source.h>
Image h;
void InitSb()
{
ScrollBar::Style& s = ScrollBar::StyleDefault().Write();
@ -18,6 +20,7 @@ void InitSb()
Size sz = ImageImg::Get(ImageImg::I_BU0).GetSize();
s.barsize = sz.cx;
s.arrowsize = sz.cy;
for(int i = 0; i < 4; i++) {
Image up = ImageImg::Get(ImageImg::I_BU0 + i);
s.up.look[i] = ChLookWith(up, uparrow);
@ -33,21 +36,39 @@ void InitSb()
s.left.look[i] = ChLookWith(RotateClockwise(down), RotateClockwise(downarrow));
s.hlower[i] = RotateClockwise(vlower);
if(IsNull(h))
h = RotateClockwise(vlower);
PNGEncoder().SaveFile("u:/" + AsString(i) + ".png", h);
DDUMP(h.GetHotSpot());
DDUMP(h.Get2ndSpot());
s.hthumb[i] = ChLookWith(RotateClockwise(thumb), RotateClockwise(thumbhandle));
s.hupper[i] = RotateClockwise(vupper);
s.right.look[i] = ChLookWith(RotateClockwise(up), RotateClockwise(uparrow));
}
}
struct Test : TopWindow {
virtual void Paint(Draw& w)
{
w.DrawRect(GetSize(), White());
ChPaint(w, Rect(10, 10, 100, 20), h);
}
};
GUI_APP_MAIN
{
InitSb();
// InitSb();
// Test().Run();
TopWindow app;
app.Sizeable();
ArrayCtrl x;
x.HeaderObject().Absolute();
x.AddColumn("", 2000);
for(int i = 0; i < 1000; i++)
for(int i = 0; i < 1/*000*/; i++)
x.Add(i);
app.Add(x.SizePos());
app.Run();