From a41e0fc338db36a1125391b8d14f0abc6557ad3e Mon Sep 17 00:00:00 2001 From: cxl Date: Sat, 11 Jan 2020 13:26:13 +0000 Subject: [PATCH] .upptst git-svn-id: svn://ultimatepp.org/upp/trunk@13852 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- upptst/ChScrollbars/ChScrollbars.upp | 10 +++++++++ upptst/ChScrollbars/main.cpp | 31 ++++++++++++++++++++++++++++ upptst/ChScrollbars/test.iml | 8 +++++++ 3 files changed, 49 insertions(+) create mode 100644 upptst/ChScrollbars/ChScrollbars.upp create mode 100644 upptst/ChScrollbars/main.cpp create mode 100644 upptst/ChScrollbars/test.iml diff --git a/upptst/ChScrollbars/ChScrollbars.upp b/upptst/ChScrollbars/ChScrollbars.upp new file mode 100644 index 000000000..ef242c2b0 --- /dev/null +++ b/upptst/ChScrollbars/ChScrollbars.upp @@ -0,0 +1,10 @@ +uses + CtrlLib; + +file + main.cpp, + test.iml; + +mainconfig + "" = "GUI"; + diff --git a/upptst/ChScrollbars/main.cpp b/upptst/ChScrollbars/main.cpp new file mode 100644 index 000000000..38b832740 --- /dev/null +++ b/upptst/ChScrollbars/main.cpp @@ -0,0 +1,31 @@ +#include + +using namespace Upp; + +#define IMAGECLASS TestImg +#define IMAGEFILE +#include + +#define IMAGECLASS TestImg +#define IMAGEFILE +#include + +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(); +} diff --git a/upptst/ChScrollbars/test.iml b/upptst/ChScrollbars/test.iml new file mode 100644 index 000000000..0c57d147f --- /dev/null +++ b/upptst/ChScrollbars/test.iml @@ -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)