git-svn-id: svn://ultimatepp.org/upp/trunk@13852 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2020-01-11 13:26:13 +00:00
parent 964003ca75
commit a41e0fc338
3 changed files with 49 additions and 0 deletions

View file

@ -0,0 +1,10 @@
uses
CtrlLib;
file
main.cpp,
test.iml;
mainconfig
"" = "GUI";

View file

@ -0,0 +1,31 @@
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
#define IMAGECLASS TestImg
#define IMAGEFILE <ChScrollbars/test.iml>
#include <Draw/iml_header.h>
#define IMAGECLASS TestImg
#define IMAGEFILE <ChScrollbars/test.iml>
#include <Draw/iml_source.h>
struct MyApp : TopWindow {
virtual void Paint(Draw& w) {
w.DrawRect(GetSize(), White());
w.DrawImage(10, 10, TestImg::scrollbar());
Image sb = WithHotSpot(TestImg::scrollbar(), CH_SCROLLBAR_IMAGE, 0);
Image vsb = WithHotSpot(RotateClockwise(TestImg::scrollbar()), CH_SCROLLBAR_IMAGE, 0);
ChPaint(w, 10, 120, 200, DPI(16), sb);
for(int i = 0; i < 40; i += 4) {
ChPaint(w, 10, 160 + i * DPI(5), 4 * i, DPI(16), sb);
ChPaint(w, 360 + i * DPI(5), 10, DPI(16), 4 * i, vsb);
}
}
};
GUI_APP_MAIN
{
MyApp().Run();
}

View file

@ -0,0 +1,8 @@
PREMULTIPLIED
IMAGE_ID(scrollbar)
IMAGE_BEGIN_DATA
IMAGE_DATA(120,156,59,160,193,32,192,64,4,248,79,103,76,44,128,168,255,255,159,190,152,56,119,210,223,93,216,221,57,56,221,134)
IMAGE_DATA(219,141,3,239,38,252,110,164,204,28,98,104,242,221,71,185,63,105,225,62,132,27,71,221,55,188,221,55,216,243,199,80)
IMAGE_DATA(40,95,6,151,27,7,115,29,66,76,29,60,120,219,7,152,238,28,224,246,21,0,144,213,195,124,0,0,0,0,0,0)
IMAGE_END_DATA(96, 1)