summaryrefslogtreecommitdiff
path: root/iup/test/sample.c
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2010-09-09 02:26:30 +0200
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2010-09-09 02:32:26 +0200
commit7505e88db66798b2b8fcdff2d92a7136cd826b5b (patch)
treeb6ced565318f8e8112e35cb0ad53abe4212ef8de /iup/test/sample.c
parente9a184546b18cf3b796bd560561f312934004c54 (diff)
Upgrading to IUP 3.2 - and cleaning up.
Diffstat (limited to 'iup/test/sample.c')
-rwxr-xr-xiup/test/sample.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/iup/test/sample.c b/iup/test/sample.c
index 038cffd..3c00d8d 100755
--- a/iup/test/sample.c
+++ b/iup/test/sample.c
@@ -138,6 +138,12 @@ static unsigned char img_bits2[] =
,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
};
+static int copydata_cb(Ihandle* ih, char* value, int size)
+{
+ printf("COPYDATA(%s, %d)\n", value, size);
+ return IUP_DEFAULT;
+}
+
static int valuechanged_cb(Ihandle *ih)
{
printf("VALUECHANGED_CB(%s)=%s\n", IupGetClassName(ih), IupGetAttribute(ih, "VALUE"));
@@ -397,6 +403,11 @@ void SampleTest(void)
// IupSetAttribute(box, "FGCOLOR", "255 0 0");
+// IupSetAttribute(dlg,"RASTERSIZE","1000x800");
+
+ IupSetCallback(dlg, "COPYDATA_CB", (Icallback)copydata_cb);
+
+
IupMap(dlg);
IupSetAttribute(tree, "TITLE0", "Figures");
@@ -407,6 +418,8 @@ void SampleTest(void)
IupSetAttribute(tree, "ADDLEAF4", "scalenus");
IupShow(dlg);
+
+// IupSetAttribute(dlg,"RASTERSIZE", NULL);
}
#ifndef BIG_TEST
@@ -414,6 +427,13 @@ int main(int argc, char* argv[])
{
IupOpen(&argc, &argv);
+ IupSetGlobal("SINGLEINSTANCE", "Iup Sample");
+ if (!IupGetGlobal("SINGLEINSTANCE"))
+ {
+ IupClose();
+ return EXIT_SUCCESS;
+ }
+
SampleTest();
IupMainLoop();