Mercurial > dwindows
annotate dwtest.c @ 1261:61d0c5f84644
Initial attempt at adding dw_draw_arc() support on all platforms.
This code doesn't yet work... will probably require a bunch of fixes...
but I wanted to get the code committed while doing research on it.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 25 Oct 2011 10:51:59 +0000 |
parents | 2d2b945ee0bf |
children | 83b0ed8c8377 |
rev | line source |
---|---|
191
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
1 #include <stdlib.h> |
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
2 #include <string.h> |
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
3 #include <stdio.h> |
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
4 #include "dw.h" |
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
5 |
219
79968cf0f3b3
Choose a nice font. ;)
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
218
diff
changeset
|
6 /* Select a fixed width font for our platform */ |
79968cf0f3b3
Choose a nice font. ;)
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
218
diff
changeset
|
7 #ifdef __OS2__ |
79968cf0f3b3
Choose a nice font. ;)
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
218
diff
changeset
|
8 #define FIXEDFONT "5.System VIO" |
305
32ad8a0dc06b
Escape backslashes so icons under Windows and OS/2 can be found.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
304
diff
changeset
|
9 #define FOLDER_ICON_NAME "os2\\folder" |
32ad8a0dc06b
Escape backslashes so icons under Windows and OS/2 can be found.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
304
diff
changeset
|
10 #define FILE_ICON_NAME "os2\\file" |
219
79968cf0f3b3
Choose a nice font. ;)
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
218
diff
changeset
|
11 #elif defined(__WIN32__) |
1242
8e37ebb3fab7
Changed FIXEDFONT to "Lucinda Console" on Windows. Terminal looks better to me...
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1230
diff
changeset
|
12 #define FIXEDFONT "10.Lucida Console" |
305
32ad8a0dc06b
Escape backslashes so icons under Windows and OS/2 can be found.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
304
diff
changeset
|
13 #define FOLDER_ICON_NAME "win\\folder" |
32ad8a0dc06b
Escape backslashes so icons under Windows and OS/2 can be found.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
304
diff
changeset
|
14 #define FILE_ICON_NAME "win\\file" |
674
78f9aa6d6d89
Fixes or fonts and loading images from files. Added Mac specific settings to dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
672
diff
changeset
|
15 #elif defined(__MAC__) |
746
0a364e76a7aa
9 point Monaco looks better than 8 point... so switching in dwtest...
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
674
diff
changeset
|
16 #define FIXEDFONT "9.Monaco" |
674
78f9aa6d6d89
Fixes or fonts and loading images from files. Added Mac specific settings to dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
672
diff
changeset
|
17 #define FOLDER_ICON_NAME "mac/folder" |
78f9aa6d6d89
Fixes or fonts and loading images from files. Added Mac specific settings to dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
672
diff
changeset
|
18 #define FILE_ICON_NAME "mac/file" |
219
79968cf0f3b3
Choose a nice font. ;)
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
218
diff
changeset
|
19 #elif GTK_MAJOR_VERSION > 1 |
1002
0802d6122ec7
Changes to the test program to use new font style for GTK2+.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
992
diff
changeset
|
20 #define FIXEDFONT "10.monospace" |
297
5414d3d582e4
Add icons to tree items on page three.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
293
diff
changeset
|
21 #define FOLDER_ICON_NAME "gtk/folder" |
5414d3d582e4
Add icons to tree items on page three.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
293
diff
changeset
|
22 #define FILE_ICON_NAME "gtk/file" |
219
79968cf0f3b3
Choose a nice font. ;)
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
218
diff
changeset
|
23 #else |
79968cf0f3b3
Choose a nice font. ;)
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
218
diff
changeset
|
24 #define FIXEDFONT "fixed" |
297
5414d3d582e4
Add icons to tree items on page three.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
293
diff
changeset
|
25 #define FOLDER_ICON_NAME "gtk/folder" |
5414d3d582e4
Add icons to tree items on page three.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
293
diff
changeset
|
26 #define FILE_ICON_NAME "gtk/file" |
219
79968cf0f3b3
Choose a nice font. ;)
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
218
diff
changeset
|
27 #endif |
191
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
28 |
257
9ea4ac9a097f
Added dw_icon_load_from_file() on OS/2 and Windows. Added a stub on Unix
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
254
diff
changeset
|
29 #define SCROLLBARWIDTH 14 |
774
bf3e9892146f
Add new notebook page to test scrollbox widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
746
diff
changeset
|
30 #define MAX_WIDGETS 20 |
257
9ea4ac9a097f
Added dw_icon_load_from_file() on OS/2 and Windows. Added a stub on Unix
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
254
diff
changeset
|
31 |
191
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
32 unsigned long flStyle = DW_FCF_SYSMENU | DW_FCF_TITLEBAR | |
957
beed3e7f9d4b
Fixes to flip pixmaps when loading from file or data on Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
955
diff
changeset
|
33 DW_FCF_SHELLPOSITION | DW_FCF_TASKLIST | DW_FCF_DLGBORDER; |
191
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
34 |
567
81ca08481d49
Added the basics of the color chooser on OS/2. Needs some more logic to
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
566
diff
changeset
|
35 unsigned long current_color = DW_RGB(100,100,100); |
566
f6de197ecbe9
Add dw_color_choose()
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
531
diff
changeset
|
36 |
602
489a684af1bb
Add some more test
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
600
diff
changeset
|
37 int iteration = 0; |
774
bf3e9892146f
Add new notebook page to test scrollbox widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
746
diff
changeset
|
38 void create_button( int); |
503
f3ed8dda02f8
Added dw_filesystem_change_*() and testcase code from Mark in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
487
diff
changeset
|
39 |
1090
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
40 static char folder_ico[1718] = { |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
41 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x01, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x05, 0x00, 0x00, 0x4E, 0x01, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
42 0x80, 0x00, 0x80, 0x80, 0x00, 0x00, 0xC0, 0xC0, 0xC0, 0x00, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x30, 0x03, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x3B, 0x37, 0x77, 0x77, 0x77, 0x77, 0xB7, 0x33, 0x3B, 0x37, 0x77, 0x77, 0x77, 0x77, 0xB7, 0x33, 0x3B, 0x37, 0x77, 0x77, 0x77, 0x77, 0xB7, 0x33, 0x3B, 0x37, |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
43 0x77, 0x77, 0x77, 0x77, 0xB7, 0x33, 0x37, 0x37, 0x77, 0x77, 0x77, 0x77, 0xB7, 0x33, 0x37, 0x3F, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x33, 0x37, 0x73, 0x33, 0x33, 0x33, 0x33, 0x33, 0x30, 0x37, 0x77, 0x77, 0x7F, 0xFF, 0xFF, 0x30, 0x00, 0x3F, 0x77, 0x77, 0xF3, 0x33, 0x33, 0x30, 0x00, 0x03, 0xFF, 0xFF, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
44 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x81, 0xFF, 0x00, 0x00, 0xC3, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x80, |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
45 0x00, 0x00, 0xC0, 0xC0, 0xC0, 0x00, 0xC0, 0xDC, 0xC0, 0x00, 0xF0, 0xCA, 0xA6, 0x00, 0x04, 0x04, 0x04, 0x00, 0x08, 0x08, 0x08, 0x00, 0x0C, 0x0C, 0x0C, 0x00, 0x11, 0x11, 0x11, 0x00, 0x16, 0x16, 0x16, 0x00, 0x1C, 0x1C, 0x1C, 0x00, 0x22, 0x22, 0x22, 0x00, 0x29, 0x29, 0x29, 0x00, 0x55, 0x55, 0x55, 0x00, 0x4D, 0x4D, 0x4D, 0x00, 0x42, 0x42, 0x42, 0x00, 0x39, 0x39, 0x39, 0x00, 0x80, 0x7C, 0xFF, 0x00, 0x50, 0x50, 0xFF, 0x00, 0x93, 0x00, 0xD6, 0x00, 0xFF, 0xEC, 0xCC, 0x00, 0xC6, 0xD6, 0xEF, 0x00, 0xD6, 0xE7, 0xE7, 0x00, 0x90, 0xA9, 0xAD, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
46 0x99, 0x00, 0x00, 0x00, 0xCC, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x33, 0x33, 0x00, 0x00, 0x33, 0x66, 0x00, 0x00, 0x33, 0x99, 0x00, 0x00, 0x33, 0xCC, 0x00, 0x00, 0x33, 0xFF, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x66, 0x33, 0x00, 0x00, 0x66, 0x66, 0x00, 0x00, 0x66, 0x99, 0x00, 0x00, 0x66, 0xCC, 0x00, 0x00, 0x66, 0xFF, 0x00, 0x00, 0x99, 0x00, 0x00, 0x00, 0x99, 0x33, 0x00, 0x00, 0x99, 0x66, 0x00, 0x00, 0x99, 0x99, 0x00, 0x00, 0x99, 0xCC, 0x00, 0x00, 0x99, 0xFF, 0x00, 0x00, 0xCC, 0x00, 0x00, 0x00, 0xCC, 0x33, 0x00, 0x00, 0xCC, 0x66, 0x00, 0x00, 0xCC, 0x99, 0x00, 0x00, 0xCC, 0xCC, 0x00, 0x00, 0xCC, |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
47 0xFF, 0x00, 0x00, 0xFF, 0x66, 0x00, 0x00, 0xFF, 0x99, 0x00, 0x00, 0xFF, 0xCC, 0x00, 0x33, 0x00, 0x00, 0x00, 0x33, 0x00, 0x33, 0x00, 0x33, 0x00, 0x66, 0x00, 0x33, 0x00, 0x99, 0x00, 0x33, 0x00, 0xCC, 0x00, 0x33, 0x00, 0xFF, 0x00, 0x33, 0x33, 0x00, 0x00, 0x33, 0x33, 0x33, 0x00, 0x33, 0x33, 0x66, 0x00, 0x33, 0x33, 0x99, 0x00, 0x33, 0x33, 0xCC, 0x00, 0x33, 0x33, 0xFF, 0x00, 0x33, 0x66, 0x00, 0x00, 0x33, 0x66, 0x33, 0x00, 0x33, 0x66, 0x66, 0x00, 0x33, 0x66, 0x99, 0x00, 0x33, 0x66, 0xCC, 0x00, 0x33, 0x66, 0xFF, 0x00, 0x33, 0x99, 0x00, 0x00, 0x33, 0x99, 0x33, 0x00, 0x33, 0x99, 0x66, 0x00, 0x33, 0x99, |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
48 0x99, 0x00, 0x33, 0x99, 0xCC, 0x00, 0x33, 0x99, 0xFF, 0x00, 0x33, 0xCC, 0x00, 0x00, 0x33, 0xCC, 0x33, 0x00, 0x33, 0xCC, 0x66, 0x00, 0x33, 0xCC, 0x99, 0x00, 0x33, 0xCC, 0xCC, 0x00, 0x33, 0xCC, 0xFF, 0x00, 0x33, 0xFF, 0x33, 0x00, 0x33, 0xFF, 0x66, 0x00, 0x33, 0xFF, 0x99, 0x00, 0x33, 0xFF, 0xCC, 0x00, 0x33, 0xFF, 0xFF, 0x00, 0x66, 0x00, 0x00, 0x00, 0x66, 0x00, 0x33, 0x00, 0x66, 0x00, 0x66, 0x00, 0x66, 0x00, 0x99, 0x00, 0x66, 0x00, 0xCC, 0x00, 0x66, 0x00, 0xFF, 0x00, 0x66, 0x33, 0x00, 0x00, 0x66, 0x33, 0x33, 0x00, 0x66, 0x33, 0x66, 0x00, 0x66, 0x33, 0x99, 0x00, 0x66, 0x33, 0xCC, 0x00, 0x66, 0x33, |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
49 0xFF, 0x00, 0x66, 0x66, 0x00, 0x00, 0x66, 0x66, 0x33, 0x00, 0x66, 0x66, 0x66, 0x00, 0x66, 0x66, 0x99, 0x00, 0x66, 0x66, 0xCC, 0x00, 0x66, 0x99, 0x00, 0x00, 0x66, 0x99, 0x33, 0x00, 0x66, 0x99, 0x66, 0x00, 0x66, 0x99, 0x99, 0x00, 0x66, 0x99, 0xCC, 0x00, 0x66, 0x99, 0xFF, 0x00, 0x66, 0xCC, 0x00, 0x00, 0x66, 0xCC, 0x33, 0x00, 0x66, 0xCC, 0x99, 0x00, 0x66, 0xCC, 0xCC, 0x00, 0x66, 0xCC, 0xFF, 0x00, 0x66, 0xFF, 0x00, 0x00, 0x66, 0xFF, 0x33, 0x00, 0x66, 0xFF, 0x99, 0x00, 0x66, 0xFF, 0xCC, 0x00, 0xCC, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xCC, 0x00, 0x99, 0x99, 0x00, 0x00, 0x99, 0x33, 0x99, 0x00, 0x99, 0x00, |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
50 0x99, 0x00, 0x99, 0x00, 0xCC, 0x00, 0x99, 0x00, 0x00, 0x00, 0x99, 0x33, 0x33, 0x00, 0x99, 0x00, 0x66, 0x00, 0x99, 0x33, 0xCC, 0x00, 0x99, 0x00, 0xFF, 0x00, 0x99, 0x66, 0x00, 0x00, 0x99, 0x66, 0x33, 0x00, 0x99, 0x33, 0x66, 0x00, 0x99, 0x66, 0x99, 0x00, 0x99, 0x66, 0xCC, 0x00, 0x99, 0x33, 0xFF, 0x00, 0x99, 0x99, 0x33, 0x00, 0x99, 0x99, 0x66, 0x00, 0x99, 0x99, 0x99, 0x00, 0x99, 0x99, 0xCC, 0x00, 0x99, 0x99, 0xFF, 0x00, 0x99, 0xCC, 0x00, 0x00, 0x99, 0xCC, 0x33, 0x00, 0x66, 0xCC, 0x66, 0x00, 0x99, 0xCC, 0x99, 0x00, 0x99, 0xCC, 0xCC, 0x00, 0x99, 0xCC, 0xFF, 0x00, 0x99, 0xFF, 0x00, 0x00, 0x99, 0xFF, |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
51 0x33, 0x00, 0x99, 0xCC, 0x66, 0x00, 0x99, 0xFF, 0x99, 0x00, 0x99, 0xFF, 0xCC, 0x00, 0x99, 0xFF, 0xFF, 0x00, 0xCC, 0x00, 0x00, 0x00, 0x99, 0x00, 0x33, 0x00, 0xCC, 0x00, 0x66, 0x00, 0xCC, 0x00, 0x99, 0x00, 0xCC, 0x00, 0xCC, 0x00, 0x99, 0x33, 0x00, 0x00, 0xCC, 0x33, 0x33, 0x00, 0xCC, 0x33, 0x66, 0x00, 0xCC, 0x33, 0x99, 0x00, 0xCC, 0x33, 0xCC, 0x00, 0xCC, 0x33, 0xFF, 0x00, 0xCC, 0x66, 0x00, 0x00, 0xCC, 0x66, 0x33, 0x00, 0x99, 0x66, 0x66, 0x00, 0xCC, 0x66, 0x99, 0x00, 0xCC, 0x66, 0xCC, 0x00, 0x99, 0x66, 0xFF, 0x00, 0xCC, 0x99, 0x00, 0x00, 0xCC, 0x99, 0x33, 0x00, 0xCC, 0x99, 0x66, 0x00, 0xCC, 0x99, |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
52 0x99, 0x00, 0xCC, 0x99, 0xCC, 0x00, 0xCC, 0x99, 0xFF, 0x00, 0xCC, 0xCC, 0x00, 0x00, 0xCC, 0xCC, 0x33, 0x00, 0xCC, 0xCC, 0x66, 0x00, 0xCC, 0xCC, 0x99, 0x00, 0xCC, 0xCC, 0xCC, 0x00, 0xCC, 0xCC, 0xFF, 0x00, 0xCC, 0xFF, 0x00, 0x00, 0xCC, 0xFF, 0x33, 0x00, 0x99, 0xFF, 0x66, 0x00, 0xCC, 0xFF, 0x99, 0x00, 0xCC, 0xFF, 0xCC, 0x00, 0xCC, 0xFF, 0xFF, 0x00, 0xCC, 0x00, 0x33, 0x00, 0xFF, 0x00, 0x66, 0x00, 0xFF, 0x00, 0x99, 0x00, 0xCC, 0x33, 0x00, 0x00, 0xFF, 0x33, 0x33, 0x00, 0xFF, 0x33, 0x66, 0x00, 0xFF, 0x33, 0x99, 0x00, 0xFF, 0x33, 0xCC, 0x00, 0xFF, 0x33, 0xFF, 0x00, 0xFF, 0x66, 0x00, 0x00, 0xFF, 0x66, |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
53 0x33, 0x00, 0xCC, 0x66, 0x66, 0x00, 0xFF, 0x66, 0x99, 0x00, 0xFF, 0x66, 0xCC, 0x00, 0xCC, 0x66, 0xFF, 0x00, 0xFF, 0x99, 0x00, 0x00, 0xFF, 0x99, 0x33, 0x00, 0xFF, 0x99, 0x66, 0x00, 0xFF, 0x99, 0x99, 0x00, 0xFF, 0x99, 0xCC, 0x00, 0xFF, 0x99, 0xFF, 0x00, 0xFF, 0xCC, 0x00, 0x00, 0xFF, 0xCC, 0x33, 0x00, 0xFF, 0xCC, 0x66, 0x00, 0xFF, 0xCC, 0x99, 0x00, 0xFF, 0xCC, 0xCC, 0x00, 0xFF, 0xCC, 0xFF, 0x00, 0xFF, 0xFF, 0x33, 0x00, 0xCC, 0xFF, 0x66, 0x00, 0xFF, 0xFF, 0x99, 0x00, 0xFF, 0xFF, 0xCC, 0x00, 0x66, 0x66, 0xFF, 0x00, 0x66, 0xFF, 0x66, 0x00, 0x66, 0xFF, 0xFF, 0x00, 0xFF, 0x66, 0x66, 0x00, 0xFF, 0x66, |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
54 0xFF, 0x00, 0xFF, 0xFF, 0x66, 0x00, 0x21, 0x00, 0xA5, 0x00, 0x5F, 0x5F, 0x5F, 0x00, 0x77, 0x77, 0x77, 0x00, 0x86, 0x86, 0x86, 0x00, 0x96, 0x96, 0x96, 0x00, 0xCB, 0xCB, 0xCB, 0x00, 0xB2, 0xB2, 0xB2, 0x00, 0xD7, 0xD7, 0xD7, 0x00, 0xDD, 0xDD, 0xDD, 0x00, 0xE3, 0xE3, 0xE3, 0x00, 0xEA, 0xEA, 0xEA, 0x00, 0xF1, 0xF1, 0xF1, 0x00, 0xF8, 0xF8, 0xF8, 0x00, 0xF0, 0xFB, 0xFF, 0x00, 0xA4, 0xA0, 0xA0, 0x00, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x0A, 0x0A, |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
55 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x4B, 0x0A, 0x0A, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x4B, 0x52, 0x7A, 0x52, 0xA0, 0x7A, 0x7A, 0x7A, 0x7A, 0x7A, 0x7A, 0x7A, 0x7A, 0x58, 0xA0, 0x52, 0x4B, 0x52, 0x7A, 0x52, 0xA0, 0x7A, 0x7A, 0x7A, 0x7A, 0x7A, 0x7A, 0x7A, 0x7A, 0x58, 0xA0, 0x52, 0x4B, 0x52, 0x7A, 0x52, 0xA0, 0x9A, 0x9A, |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
56 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0xA0, 0x58, 0xA0, 0x52, 0x4B, 0x52, 0x7A, 0x52, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0x79, 0xA0, 0x52, 0x4B, 0x52, 0x7A, 0x52, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0x7A, 0xA0, 0x52, 0x4B, 0x52, 0x7A, 0x52, 0xFF, 0xF6, 0xF6, 0xF6, 0xF6, 0xF6, 0xFF, 0xFF, 0xFF, 0x9A, 0xF6, 0x52, 0x4B, 0x52, 0xA0, 0x9A, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x0A, 0x52, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xA0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x2A, 0x0A, 0x0A, 0x0A, 0x52, 0xFF, 0xA0, 0xA0, 0xA0, 0xA0, 0xFF, 0x52, 0x52, 0x52, |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
57 0x52, 0x52, 0x2A, 0x0A, 0x0A, 0x0A, 0x0A, 0x52, 0xFF, 0xFF, 0xFF, 0xF6, 0x52, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x52, 0x52, 0x52, 0x52, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xC0, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
58 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x81, 0xFF, 0x00, 0x00, 0xC3, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
59 }; |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
60 |
191
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
61 HWND mainwindow, |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
62 entryfield, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
63 checkable_menuitem, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
64 noncheckable_menuitem, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
65 cursortogglebutton, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
66 colorchoosebutton, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
67 okbutton, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
68 cancelbutton, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
69 lbbox, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
70 combox, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
71 combobox1, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
72 combobox2, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
73 spinbutton, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
74 slider, |
1190
76262040ed5f
Added DW_PERCENT_INDETERMINATE which can be passed to dw_percent_set_pos() to
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1186
diff
changeset
|
75 percent, |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
76 notebookbox, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
77 notebookbox1, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
78 notebookbox2, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
79 notebookbox3, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
80 notebookbox4, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
81 notebookbox5, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
82 notebookbox6, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
83 notebookbox7, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
84 notebookbox8, |
1200
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
85 notebookbox9, |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
86 html, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
87 rawhtml, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
88 notebook, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
89 vscrollbar, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
90 hscrollbar, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
91 status1, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
92 status2, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
93 rendcombo, |
957
beed3e7f9d4b
Fixes to flip pixmaps when loading from file or data on Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
955
diff
changeset
|
94 imagexspin, |
beed3e7f9d4b
Fixes to flip pixmaps when loading from file or data on Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
955
diff
changeset
|
95 imageyspin, |
1243
c191a562c14a
Added new dw_pixmap_stretch_bitblt() function on Windows and OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1242
diff
changeset
|
96 imagestretchcheck, |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
97 container_status, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
98 tree_status, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
99 stext, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
100 tree, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
101 container, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
102 container_mle, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
103 pagebox, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
104 treebox, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
105 containerbox, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
106 textbox1, textbox2, textboxA, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
107 gap_box, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
108 buttonbox, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
109 buttonsbox, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
110 buttonboxperm, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
111 cal, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
112 scrollbox, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
113 labelarray[MAX_WIDGETS], |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
114 entryarray[MAX_WIDGETS], |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
115 filetoolbarbox; |
620
9876b75d7115
Added menu tests, including checked and disabled menu items.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
606
diff
changeset
|
116 |
9876b75d7115
Added menu tests, including checked and disabled menu items.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
606
diff
changeset
|
117 HMENUI mainmenubar,changeable_menu; |
9876b75d7115
Added menu tests, including checked and disabled menu items.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
606
diff
changeset
|
118 #define CHECKABLE_MENUITEMID 2001 |
9876b75d7115
Added menu tests, including checked and disabled menu items.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
606
diff
changeset
|
119 #define NONCHECKABLE_MENUITEMID 2002 |
503
f3ed8dda02f8
Added dw_filesystem_change_*() and testcase code from Mark in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
487
diff
changeset
|
120 |
f3ed8dda02f8
Added dw_filesystem_change_*() and testcase code from Mark in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
487
diff
changeset
|
121 void *containerinfo; |
191
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
122 |
620
9876b75d7115
Added menu tests, including checked and disabled menu items.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
606
diff
changeset
|
123 |
9876b75d7115
Added menu tests, including checked and disabled menu items.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
606
diff
changeset
|
124 int menu_enabled = 1; |
9876b75d7115
Added menu tests, including checked and disabled menu items.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
606
diff
changeset
|
125 |
957
beed3e7f9d4b
Fixes to flip pixmaps when loading from file or data on Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
955
diff
changeset
|
126 HPIXMAP text1pm,text2pm,image; |
672
388f2a48aaae
Missed one function to typedef. Fixed errors in the test program and switched to using
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
643
diff
changeset
|
127 HICN fileicon,foldericon; |
388f2a48aaae
Missed one function to typedef. Fixed errors in the test program and switched to using
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
643
diff
changeset
|
128 int mle_point=-1; |
1243
c191a562c14a
Added new dw_pixmap_stretch_bitblt() function on Windows and OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1242
diff
changeset
|
129 int image_x = 20, image_y = 20, image_stretch = 0; |
217
7112c817573d
Added test code from mark hessling.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
213
diff
changeset
|
130 |
7112c817573d
Added test code from mark hessling.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
213
diff
changeset
|
131 int font_width = 8; |
7112c817573d
Added test code from mark hessling.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
213
diff
changeset
|
132 int font_height=12; |
1002
0802d6122ec7
Changes to the test program to use new font style for GTK2+.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
992
diff
changeset
|
133 int rows=10,width1=6,cols=80; |
217
7112c817573d
Added test code from mark hessling.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
213
diff
changeset
|
134 char *current_file = NULL; |
7112c817573d
Added test code from mark hessling.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
213
diff
changeset
|
135 int timerid; |
7112c817573d
Added test code from mark hessling.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
213
diff
changeset
|
136 int num_lines=0; |
7112c817573d
Added test code from mark hessling.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
213
diff
changeset
|
137 int max_linewidth=0; |
7112c817573d
Added test code from mark hessling.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
213
diff
changeset
|
138 int current_row=0,current_col=0; |
391
2059f18e9c20
Add extra button to test mouse cursor change.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
385
diff
changeset
|
139 int cursor_arrow = 1; |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
140 int render_type = 0; |
217
7112c817573d
Added test code from mark hessling.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
213
diff
changeset
|
141 |
7112c817573d
Added test code from mark hessling.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
213
diff
changeset
|
142 FILE *fp=NULL; |
7112c817573d
Added test code from mark hessling.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
213
diff
changeset
|
143 char **lp; |
7112c817573d
Added test code from mark hessling.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
213
diff
changeset
|
144 |
297
5414d3d582e4
Add icons to tree items on page three.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
293
diff
changeset
|
145 char *resolve_keyname( int vk ) |
5414d3d582e4
Add icons to tree items on page three.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
293
diff
changeset
|
146 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
147 char *keyname; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
148 switch(vk) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
149 { |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
150 case VK_LBUTTON : keyname = "VK_LBUTTON"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
151 case VK_RBUTTON : keyname = "VK_RBUTTON"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
152 case VK_CANCEL : keyname = "VK_CANCEL"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
153 case VK_MBUTTON : keyname = "VK_MBUTTON"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
154 /* case VK_BACK : keyname = "VK_BACK"; break;*/ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
155 case VK_TAB : keyname = "VK_TAB"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
156 case VK_CLEAR : keyname = "VK_CLEAR"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
157 case VK_RETURN : keyname = "VK_RETURN"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
158 /* case VK_MENU : keyname = "VK_MENU"; break;*/ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
159 case VK_PAUSE : keyname = "VK_PAUSE"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
160 case VK_CAPITAL : keyname = "VK_CAPITAL"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
161 case VK_ESCAPE : keyname = "VK_ESCAPE"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
162 case VK_SPACE : keyname = "VK_SPACE"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
163 case VK_PRIOR : keyname = "VK_PRIOR"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
164 case VK_NEXT : keyname = "VK_NEXT"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
165 case VK_END : keyname = "VK_END"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
166 case VK_HOME : keyname = "VK_HOME"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
167 case VK_LEFT : keyname = "VK_LEFT"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
168 case VK_UP : keyname = "VK_UP"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
169 case VK_RIGHT : keyname = "VK_RIGHT"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
170 case VK_DOWN : keyname = "VK_DOWN"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
171 case VK_SELECT : keyname = "VK_SELECT"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
172 case VK_PRINT : keyname = "VK_PRINT"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
173 case VK_EXECUTE : keyname = "VK_EXECUTE"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
174 case VK_SNAPSHOT: keyname = "VK_SNAPSHOT"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
175 case VK_INSERT : keyname = "VK_INSERT"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
176 case VK_DELETE : keyname = "VK_DELETE"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
177 case VK_HELP : keyname = "VK_HELP"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
178 case VK_LWIN : keyname = "VK_LWIN"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
179 case VK_RWIN : keyname = "VK_RWIN"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
180 case VK_NUMPAD0 : keyname = "VK_NUMPAD0"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
181 case VK_NUMPAD1 : keyname = "VK_NUMPAD1"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
182 case VK_NUMPAD2 : keyname = "VK_NUMPAD2"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
183 case VK_NUMPAD3 : keyname = "VK_NUMPAD3"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
184 case VK_NUMPAD4 : keyname = "VK_NUMPAD4"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
185 case VK_NUMPAD5 : keyname = "VK_NUMPAD5"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
186 case VK_NUMPAD6 : keyname = "VK_NUMPAD6"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
187 case VK_NUMPAD7 : keyname = "VK_NUMPAD7"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
188 case VK_NUMPAD8 : keyname = "VK_NUMPAD8"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
189 case VK_NUMPAD9 : keyname = "VK_NUMPAD9"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
190 case VK_MULTIPLY: keyname = "VK_MULTIPLY"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
191 case VK_ADD : keyname = "VK_ADD"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
192 case VK_SEPARATOR: keyname = "VK_SEPARATOR"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
193 case VK_SUBTRACT: keyname = "VK_SUBTRACT"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
194 case VK_DECIMAL : keyname = "VK_DECIMAL"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
195 case VK_DIVIDE : keyname = "VK_DIVIDE"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
196 case VK_F1 : keyname = "VK_F1"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
197 case VK_F2 : keyname = "VK_F2"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
198 case VK_F3 : keyname = "VK_F3"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
199 case VK_F4 : keyname = "VK_F4"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
200 case VK_F5 : keyname = "VK_F5"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
201 case VK_F6 : keyname = "VK_F6"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
202 case VK_F7 : keyname = "VK_F7"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
203 case VK_F8 : keyname = "VK_F8"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
204 case VK_F9 : keyname = "VK_F9"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
205 case VK_F10 : keyname = "VK_F10"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
206 case VK_F11 : keyname = "VK_F11"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
207 case VK_F12 : keyname = "VK_F12"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
208 case VK_F13 : keyname = "VK_F13"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
209 case VK_F14 : keyname = "VK_F14"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
210 case VK_F15 : keyname = "VK_F15"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
211 case VK_F16 : keyname = "VK_F16"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
212 case VK_F17 : keyname = "VK_F17"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
213 case VK_F18 : keyname = "VK_F18"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
214 case VK_F19 : keyname = "VK_F19"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
215 case VK_F20 : keyname = "VK_F20"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
216 case VK_F21 : keyname = "VK_F21"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
217 case VK_F22 : keyname = "VK_F22"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
218 case VK_F23 : keyname = "VK_F23"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
219 case VK_F24 : keyname = "VK_F24"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
220 case VK_NUMLOCK : keyname = "VK_NUMLOCK"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
221 case VK_SCROLL : keyname = "VK_SCROLL"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
222 case VK_LSHIFT : keyname = "VK_LSHIFT"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
223 case VK_RSHIFT : keyname = "VK_RSHIFT"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
224 case VK_LCONTROL: keyname = "VK_LCONTROL"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
225 case VK_RCONTROL: keyname = "VK_RCONTROL"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
226 /* case VK_LMENU : keyname = "VK_LMENU"; break; */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
227 /* case VK_RMENU : keyname = "VK_RMENU"; break;*/ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
228 default: keyname = "<unknown>"; break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
229 } |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
230 return keyname; |
297
5414d3d582e4
Add icons to tree items on page three.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
293
diff
changeset
|
231 } |
5414d3d582e4
Add icons to tree items on page three.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
293
diff
changeset
|
232 |
5414d3d582e4
Add icons to tree items on page three.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
293
diff
changeset
|
233 char *resolve_keymodifiers( int mask ) |
5414d3d582e4
Add icons to tree items on page three.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
293
diff
changeset
|
234 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
235 if ( (mask & KC_CTRL) && (mask & KC_SHIFT) && (mask & KC_ALT) ) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
236 return "KC_CTRL KC_SHIFT KC_ALT"; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
237 else if ( (mask & KC_CTRL) && (mask & KC_SHIFT) ) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
238 return "KC_CTRL KC_SHIFT"; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
239 else if ( (mask & KC_CTRL) && (mask & KC_ALT) ) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
240 return "KC_CTRL KC_ALT"; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
241 else if ( (mask & KC_SHIFT) && (mask & KC_ALT) ) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
242 return "KC_SHIFT KC_ALT"; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
243 else if ( (mask & KC_SHIFT) ) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
244 return "KC_SHIFT"; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
245 else if ( (mask & KC_CTRL) ) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
246 return "KC_CTRL"; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
247 else if ( (mask & KC_ALT) ) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
248 return "KC_ALT"; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
249 else return "none"; |
297
5414d3d582e4
Add icons to tree items on page three.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
293
diff
changeset
|
250 } |
5414d3d582e4
Add icons to tree items on page three.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
293
diff
changeset
|
251 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
252 void update_render(void); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
253 |
217
7112c817573d
Added test code from mark hessling.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
213
diff
changeset
|
254 /* This gets called when a part of the graph needs to be repainted. */ |
218
fe0ab0040ba2
Not quite right yet but... handle resize and pixmap resizing.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
217
diff
changeset
|
255 int DWSIGNAL text_expose(HWND hwnd, DWExpose *exp, void *data) |
217
7112c817573d
Added test code from mark hessling.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
213
diff
changeset
|
256 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
257 if(render_type != 1) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
258 { |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
259 HPIXMAP hpm; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
260 unsigned long width,height; |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
261 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
262 if ( hwnd == textbox1 ) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
263 hpm = text1pm; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
264 else if ( hwnd == textbox2 ) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
265 hpm = text2pm; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
266 else |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
267 return TRUE; |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
268 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
269 width = (int)DW_PIXMAP_WIDTH(hpm); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
270 height = (int)DW_PIXMAP_HEIGHT(hpm); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
271 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
272 dw_pixmap_bitblt(hwnd, NULL, 0, 0, (int)width, (int)height, 0, hpm, 0, 0 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
273 dw_flush(); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
274 } |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
275 else |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
276 { |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
277 update_render(); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
278 } |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
279 return TRUE; |
217
7112c817573d
Added test code from mark hessling.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
213
diff
changeset
|
280 } |
7112c817573d
Added test code from mark hessling.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
213
diff
changeset
|
281 |
7112c817573d
Added test code from mark hessling.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
213
diff
changeset
|
282 void read_file( void ) |
7112c817573d
Added test code from mark hessling.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
213
diff
changeset
|
283 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
284 int i,len; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
285 fp = fopen( current_file, "r" ); |
1090
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
286 if ( fp ) |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
287 { |
1090
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
288 lp = (char **)calloc( 1000,sizeof(char *)); |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
289 /* should test for out of memory */ |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
290 max_linewidth=0; |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
291 for ( i = 0; i < 1000; i++ ) |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
292 { |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
293 lp[i] = (char *)calloc(1, 1025); |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
294 if ( fgets( lp[i], 1024, fp ) == NULL ) |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
295 break; |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
296 len = (int)strlen( lp[i] ); |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
297 if ( len > max_linewidth ) |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
298 max_linewidth = len; |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
299 if ( lp[i][len - 1] == '\n' ) |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
300 lp[i][len - 1] = '\0'; |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
301 } |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
302 num_lines = i; |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
303 fclose( fp ); |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
304 dw_scrollbar_set_range(hscrollbar, max_linewidth, cols); |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
305 dw_scrollbar_set_pos(hscrollbar, 0); |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
306 dw_scrollbar_set_range(vscrollbar, num_lines, rows); |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
307 dw_scrollbar_set_pos(vscrollbar, 0); |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
308 } |
217
7112c817573d
Added test code from mark hessling.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
213
diff
changeset
|
309 } |
7112c817573d
Added test code from mark hessling.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
213
diff
changeset
|
310 |
1230
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
311 /* When hpma is not NULL we are printing.. so handle things differently */ |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
312 void draw_file( int row, int col, int nrows, int fheight, HPIXMAP hpma ) |
217
7112c817573d
Added test code from mark hessling.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
213
diff
changeset
|
313 { |
1230
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
314 HPIXMAP hpm = hpma ? hpma : text2pm; |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
315 char buf[10]; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
316 int i,y,fileline; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
317 char *pLine; |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
318 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
319 if ( current_file ) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
320 { |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
321 dw_color_foreground_set(DW_CLR_WHITE); |
1230
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
322 if(!hpma) |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
323 dw_draw_rect(0, text1pm, TRUE, 0, 0, (int)DW_PIXMAP_WIDTH(text1pm), (int)DW_PIXMAP_HEIGHT(text1pm)); |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
324 dw_draw_rect(0, hpm, TRUE, 0, 0, (int)DW_PIXMAP_WIDTH(hpm), (int)DW_PIXMAP_HEIGHT(hpm)); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
325 |
1230
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
326 for ( i = 0;(i < nrows) && (i+row < num_lines); i++) |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
327 { |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
328 fileline = i + row - 1; |
1230
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
329 y = i*fheight; |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
330 dw_color_background_set( 1 + (fileline % 15) ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
331 dw_color_foreground_set( fileline < 0 ? DW_CLR_WHITE : fileline % 16 ); |
1230
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
332 if(!hpma) |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
333 { |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
334 sprintf( buf, "%6.6d", i+row ); |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
335 dw_draw_text( 0, text1pm, 0, y, buf); |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
336 } |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
337 pLine = lp[i+row]; |
1230
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
338 dw_draw_text( 0, hpm, 0, y, pLine+col ); |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
339 } |
1230
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
340 if(!hpma) |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
341 { |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
342 text_expose( textbox1, NULL, NULL); |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
343 text_expose( textbox2, NULL, NULL); |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
344 } |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
345 } |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
346 } |
380
fcb52d773ed2
Implement tests for setting background color on render boxes.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
378
diff
changeset
|
347 |
1230
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
348 /* When hpma is not NULL we are printing.. so handle things differently */ |
1137
e24e5a13ff2c
Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1110
diff
changeset
|
349 void draw_shapes(int direct, HPIXMAP hpma) |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
350 { |
1137
e24e5a13ff2c
Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1110
diff
changeset
|
351 HPIXMAP hpm = hpma ? hpma : text2pm; |
e24e5a13ff2c
Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1110
diff
changeset
|
352 int width = (int)DW_PIXMAP_WIDTH(hpm), height = (int)DW_PIXMAP_HEIGHT(hpm); |
e24e5a13ff2c
Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1110
diff
changeset
|
353 HPIXMAP pixmap = direct ? NULL : hpm; |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
354 HWND window = direct ? textbox2 : 0; |
1259
2d2b945ee0bf
Added a polygon to the test code to make sure that works on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1243
diff
changeset
|
355 int x[7] = { 20, 180, 180, 230, 180, 180, 20 }; |
2d2b945ee0bf
Added a polygon to the test code to make sure that works on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1243
diff
changeset
|
356 int y[7] = { 50, 50, 20, 70, 120, 90, 90 }; |
2d2b945ee0bf
Added a polygon to the test code to make sure that works on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1243
diff
changeset
|
357 |
957
beed3e7f9d4b
Fixes to flip pixmaps when loading from file or data on Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
955
diff
changeset
|
358 image_x = (int)dw_spinbutton_get_pos(imagexspin); |
beed3e7f9d4b
Fixes to flip pixmaps when loading from file or data on Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
955
diff
changeset
|
359 image_y = (int)dw_spinbutton_get_pos(imageyspin); |
1243
c191a562c14a
Added new dw_pixmap_stretch_bitblt() function on Windows and OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1242
diff
changeset
|
360 image_stretch = dw_checkbox_get(imagestretchcheck); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
361 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
362 dw_color_foreground_set(DW_CLR_WHITE); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
363 dw_draw_rect(window, pixmap, TRUE, 0, 0, width, height); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
364 dw_color_foreground_set(DW_CLR_DARKPINK); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
365 dw_draw_rect(window, pixmap, TRUE, 10, 10, width - 20, height - 20); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
366 dw_color_foreground_set(DW_CLR_GREEN); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
367 dw_color_background_set(DW_CLR_DARKRED); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
368 dw_draw_text(window, pixmap, 10, 10, "This should be aligned with the edges."); |
1259
2d2b945ee0bf
Added a polygon to the test code to make sure that works on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1243
diff
changeset
|
369 dw_color_foreground_set(DW_CLR_BLUE); |
2d2b945ee0bf
Added a polygon to the test code to make sure that works on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1243
diff
changeset
|
370 dw_draw_polygon(window, pixmap, TRUE, 7, x, y); |
1261
61d0c5f84644
Initial attempt at adding dw_draw_arc() support on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1259
diff
changeset
|
371 dw_color_foreground_set(DW_CLR_CYAN); |
61d0c5f84644
Initial attempt at adding dw_draw_arc() support on all platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1259
diff
changeset
|
372 dw_draw_arc(window, pixmap, 0, width - 40, height - 40, width - 40, height - 20, width - 20, height - 40); |
957
beed3e7f9d4b
Fixes to flip pixmaps when loading from file or data on Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
955
diff
changeset
|
373 if(image) |
beed3e7f9d4b
Fixes to flip pixmaps when loading from file or data on Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
955
diff
changeset
|
374 { |
1243
c191a562c14a
Added new dw_pixmap_stretch_bitblt() function on Windows and OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1242
diff
changeset
|
375 if(image_stretch) |
c191a562c14a
Added new dw_pixmap_stretch_bitblt() function on Windows and OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1242
diff
changeset
|
376 dw_pixmap_stretch_bitblt(window, pixmap, 10, 10, width - 20, height - 20, 0, image, 0, 0, (int)DW_PIXMAP_WIDTH(image), (int)DW_PIXMAP_HEIGHT(image)); |
c191a562c14a
Added new dw_pixmap_stretch_bitblt() function on Windows and OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1242
diff
changeset
|
377 else |
c191a562c14a
Added new dw_pixmap_stretch_bitblt() function on Windows and OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1242
diff
changeset
|
378 dw_pixmap_bitblt(window, pixmap, image_x, image_y, (int)DW_PIXMAP_WIDTH(image), (int)DW_PIXMAP_HEIGHT(image), 0, image, 0, 0); |
957
beed3e7f9d4b
Fixes to flip pixmaps when loading from file or data on Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
955
diff
changeset
|
379 } |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
380 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
381 /* If we aren't drawing direct do a bitblt */ |
1137
e24e5a13ff2c
Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1110
diff
changeset
|
382 if(!direct && !hpma) |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
383 { |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
384 text_expose( textbox2, NULL, NULL); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
385 } |
217
7112c817573d
Added test code from mark hessling.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
213
diff
changeset
|
386 } |
7112c817573d
Added test code from mark hessling.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
213
diff
changeset
|
387 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
388 void update_render(void) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
389 { |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
390 switch(render_type) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
391 { |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
392 case 0: |
1137
e24e5a13ff2c
Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1110
diff
changeset
|
393 draw_shapes(FALSE, NULL); |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
394 break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
395 case 1: |
1137
e24e5a13ff2c
Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1110
diff
changeset
|
396 draw_shapes(TRUE, NULL); |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
397 break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
398 case 2: |
1230
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
399 draw_file(current_row, current_col, rows, font_height, NULL); |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
400 break; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
401 } |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
402 } |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
403 |
1137
e24e5a13ff2c
Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1110
diff
changeset
|
404 int DWSIGNAL draw_page(HPRINT print, HPIXMAP pixmap, int page_num, void *data) |
e24e5a13ff2c
Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1110
diff
changeset
|
405 { |
1146
9d97610b2140
Adding dw_pixmap_set_font() which is equivalent to dw_window_set_font() except for pixmaps.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1142
diff
changeset
|
406 dw_pixmap_set_font(pixmap, FIXEDFONT); |
1230
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
407 if(page_num == 0) |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
408 { |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
409 draw_shapes(FALSE, pixmap); |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
410 } |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
411 else if(page_num == 1) |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
412 { |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
413 /* Get the font size for this printer context... */ |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
414 int fheight, fwidth; |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
415 |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
416 /* If we have a file to display... */ |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
417 if(current_file) |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
418 { |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
419 int nrows; |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
420 |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
421 /* Calculate new dimensions */ |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
422 dw_font_text_extents_get(NULL, pixmap, "(g", NULL, &fheight); |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
423 nrows = (int)(DW_PIXMAP_HEIGHT(pixmap) / fheight); |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
424 |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
425 /* Do the actual drawing */ |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
426 draw_file(0, 0, nrows, fheight, pixmap); |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
427 } |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
428 else |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
429 { |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
430 /* We don't have a file so center an error message on the page */ |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
431 char *text = "No file currently selected!"; |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
432 int posx, posy; |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
433 |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
434 dw_font_text_extents_get(NULL, pixmap, text, &fwidth, &fheight); |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
435 |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
436 posx = (int)(DW_PIXMAP_WIDTH(pixmap) - fwidth)/2; |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
437 posy = (int)(DW_PIXMAP_HEIGHT(pixmap) - fheight)/2; |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
438 |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
439 dw_color_foreground_set(DW_CLR_BLACK); |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
440 dw_color_background_set(DW_CLR_WHITE); |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
441 dw_draw_text(NULL, pixmap, posx, posy, text); |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
442 } |
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
443 } |
1137
e24e5a13ff2c
Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1110
diff
changeset
|
444 return TRUE; |
e24e5a13ff2c
Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1110
diff
changeset
|
445 } |
e24e5a13ff2c
Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1110
diff
changeset
|
446 |
e24e5a13ff2c
Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1110
diff
changeset
|
447 int DWSIGNAL print_callback(HWND window, void *data) |
e24e5a13ff2c
Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1110
diff
changeset
|
448 { |
1230
75a773cdb626
Fixes to dw_font_text_extents_get() on Mac so it honors the font set with dw_pixmap_set_font().
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1227
diff
changeset
|
449 HPRINT print = dw_print_new("DWTest Job", 0, 2, DW_SIGNAL_FUNC(draw_page), NULL); |
1137
e24e5a13ff2c
Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1110
diff
changeset
|
450 dw_print_run(print, 0); |
e24e5a13ff2c
Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1110
diff
changeset
|
451 return FALSE; |
e24e5a13ff2c
Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1110
diff
changeset
|
452 } |
e24e5a13ff2c
Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1110
diff
changeset
|
453 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
454 int DWSIGNAL refresh_callback(HWND window, void *data) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
455 { |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
456 update_render(); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
457 return FALSE; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
458 } |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
459 |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
460 int DWSIGNAL render_select_event_callback(HWND window, int index) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
461 { |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
462 if(index != render_type) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
463 { |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
464 if(index == 2) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
465 { |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
466 dw_scrollbar_set_range(hscrollbar, max_linewidth, cols); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
467 dw_scrollbar_set_pos(hscrollbar, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
468 dw_scrollbar_set_range(vscrollbar, num_lines, rows); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
469 dw_scrollbar_set_pos(vscrollbar, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
470 current_col = current_row = 0; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
471 } |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
472 else |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
473 { |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
474 dw_scrollbar_set_range(hscrollbar, 0, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
475 dw_scrollbar_set_pos(hscrollbar, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
476 dw_scrollbar_set_range(vscrollbar, 0, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
477 dw_scrollbar_set_pos(vscrollbar, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
478 } |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
479 render_type = index; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
480 update_render(); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
481 } |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
482 return FALSE; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
483 } |
566
f6de197ecbe9
Add dw_color_choose()
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
531
diff
changeset
|
484 |
f6de197ecbe9
Add dw_color_choose()
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
531
diff
changeset
|
485 int DWSIGNAL colorchoose_callback(HWND window, void *data) |
f6de197ecbe9
Add dw_color_choose()
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
531
diff
changeset
|
486 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
487 current_color = dw_color_choose(current_color); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
488 return FALSE; |
566
f6de197ecbe9
Add dw_color_choose()
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
531
diff
changeset
|
489 } |
f6de197ecbe9
Add dw_color_choose()
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
531
diff
changeset
|
490 |
391
2059f18e9c20
Add extra button to test mouse cursor change.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
385
diff
changeset
|
491 int DWSIGNAL cursortoggle_callback(HWND window, void *data) |
2059f18e9c20
Add extra button to test mouse cursor change.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
385
diff
changeset
|
492 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
493 if(cursor_arrow) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
494 { |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
495 dw_window_set_text((HWND)cursortogglebutton,"Set Cursor pointer - ARROW"); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
496 dw_window_set_pointer((HWND)data,DW_POINTER_CLOCK); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
497 cursor_arrow = 0; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
498 } |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
499 else |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
500 { |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
501 dw_window_set_text((HWND)cursortogglebutton,"Set Cursor pointer - CLOCK"); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
502 dw_window_set_pointer((HWND)data,DW_POINTER_DEFAULT); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
503 cursor_arrow = 1; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
504 } |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
505 return FALSE; |
391
2059f18e9c20
Add extra button to test mouse cursor change.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
385
diff
changeset
|
506 } |
2059f18e9c20
Add extra button to test mouse cursor change.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
385
diff
changeset
|
507 |
217
7112c817573d
Added test code from mark hessling.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
213
diff
changeset
|
508 int DWSIGNAL beep_callback(HWND window, void *data) |
7112c817573d
Added test code from mark hessling.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
213
diff
changeset
|
509 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
510 dw_timer_disconnect( timerid ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
511 return TRUE; |
217
7112c817573d
Added test code from mark hessling.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
213
diff
changeset
|
512 } |
7112c817573d
Added test code from mark hessling.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
213
diff
changeset
|
513 |
267
bf8b907f8a29
Added initial version of updated key_press_event callback.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
266
diff
changeset
|
514 int DWSIGNAL keypress_callback(HWND window, char ch, int vk, int state, void *data) |
254
42332e598d55
Add third notebook page - for tree example. Just starting.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
253
diff
changeset
|
515 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
516 char tmpbuf[100]; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
517 if ( ch ) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
518 sprintf( tmpbuf, "Key: %c(%d) Modifiers: %s(%d)", ch, ch, resolve_keymodifiers(state), state ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
519 else |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
520 sprintf( tmpbuf, "Key: %s(%d) Modifiers: %s(%d)", resolve_keyname(vk), vk, resolve_keymodifiers(state), state ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
521 dw_window_set_text( status1, tmpbuf); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
522 return 0; |
620
9876b75d7115
Added menu tests, including checked and disabled menu items.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
606
diff
changeset
|
523 } |
9876b75d7115
Added menu tests, including checked and disabled menu items.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
606
diff
changeset
|
524 |
9876b75d7115
Added menu tests, including checked and disabled menu items.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
606
diff
changeset
|
525 int DWSIGNAL menu_callback(HWND window, void *data) |
9876b75d7115
Added menu tests, including checked and disabled menu items.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
606
diff
changeset
|
526 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
527 char buf[100]; |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
528 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
529 sprintf( buf, "%s menu item selected", (char *)data ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
530 dw_messagebox( "Menu Item Callback", DW_MB_OK | DW_MB_INFORMATION, buf ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
531 return 0; |
620
9876b75d7115
Added menu tests, including checked and disabled menu items.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
606
diff
changeset
|
532 } |
9876b75d7115
Added menu tests, including checked and disabled menu items.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
606
diff
changeset
|
533 |
9876b75d7115
Added menu tests, including checked and disabled menu items.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
606
diff
changeset
|
534 int DWSIGNAL menutoggle_callback(HWND window, void *data) |
9876b75d7115
Added menu tests, including checked and disabled menu items.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
606
diff
changeset
|
535 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
536 if ( menu_enabled ) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
537 { |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
538 dw_menu_item_set_state( changeable_menu, CHECKABLE_MENUITEMID, DW_MIS_DISABLED ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
539 dw_menu_item_set_state( changeable_menu, NONCHECKABLE_MENUITEMID, DW_MIS_DISABLED ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
540 menu_enabled = 0; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
541 } |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
542 else |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
543 { |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
544 dw_menu_item_set_state( changeable_menu, CHECKABLE_MENUITEMID, DW_MIS_ENABLED ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
545 dw_menu_item_set_state( changeable_menu, NONCHECKABLE_MENUITEMID, DW_MIS_ENABLED ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
546 menu_enabled = 1; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
547 } |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
548 return 0; |
620
9876b75d7115
Added menu tests, including checked and disabled menu items.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
606
diff
changeset
|
549 } |
9876b75d7115
Added menu tests, including checked and disabled menu items.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
606
diff
changeset
|
550 |
9876b75d7115
Added menu tests, including checked and disabled menu items.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
606
diff
changeset
|
551 int DWSIGNAL helpabout_callback(HWND window, void *data) |
9876b75d7115
Added menu tests, including checked and disabled menu items.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
606
diff
changeset
|
552 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
553 char buf[100]; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
554 DWEnv env; |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
555 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
556 dw_environment_query(&env); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
557 sprintf( buf, "dwindows test\n\nOS: %s %s %s Version: %d.%d.%d.%d\n\ndwindows Version: %d.%d.%d", |
620
9876b75d7115
Added menu tests, including checked and disabled menu items.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
606
diff
changeset
|
558 env.osName, env.buildDate, env.buildTime, |
9876b75d7115
Added menu tests, including checked and disabled menu items.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
606
diff
changeset
|
559 env.MajorVersion, env.MinorVersion, env.MajorBuild, env.MinorBuild, |
9876b75d7115
Added menu tests, including checked and disabled menu items.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
606
diff
changeset
|
560 env.DWMajorVersion, env.DWMinorVersion, env.DWSubVersion ); |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
561 dw_messagebox( "About dwindows", DW_MB_OK | DW_MB_INFORMATION, buf ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
562 return 0; |
254
42332e598d55
Add third notebook page - for tree example. Just starting.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
253
diff
changeset
|
563 } |
42332e598d55
Add third notebook page - for tree example. Just starting.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
253
diff
changeset
|
564 |
192
d946e329670c
Added test application for OS/2, and allow dw_color_xxx_set() to use OS/2
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
191
diff
changeset
|
565 int DWSIGNAL exit_callback(HWND window, void *data) |
191
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
566 { |
1220
67ff39b9577c
Initial implementation of dw_taskbar_* for the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1213
diff
changeset
|
567 dw_taskbar_delete(textbox1, fileicon); |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
568 dw_window_destroy((HWND)data); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
569 exit(0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
570 return -1; |
191
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
571 } |
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
572 |
192
d946e329670c
Added test application for OS/2, and allow dw_color_xxx_set() to use OS/2
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
191
diff
changeset
|
573 int DWSIGNAL test_callback(HWND window, void *data) |
191
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
574 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
575 dw_window_destroy((HWND)data); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
576 if ( current_file ) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
577 dw_free( current_file ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
578 exit(0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
579 return -1; |
191
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
580 } |
192
d946e329670c
Added test application for OS/2, and allow dw_color_xxx_set() to use OS/2
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
191
diff
changeset
|
581 |
905
ae5d884af4ed
Added a Browse Folder button to test the folder browsing dialogs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
897
diff
changeset
|
582 int DWSIGNAL browse_file_callback(HWND window, void *data) |
191
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
583 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
584 char *tmp; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
585 tmp = dw_file_browse("Pick a file", ".", "c", DW_FILE_OPEN ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
586 if ( tmp ) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
587 { |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
588 if ( current_file ) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
589 { |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
590 dw_free( current_file ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
591 } |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
592 current_file = tmp; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
593 dw_window_set_text( entryfield, current_file ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
594 read_file(); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
595 current_col = current_row = 0; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
596 update_render(); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
597 } |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
598 return 0; |
191
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
599 } |
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
600 |
905
ae5d884af4ed
Added a Browse Folder button to test the folder browsing dialogs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
897
diff
changeset
|
601 int DWSIGNAL browse_folder_callback(HWND window, void *data) |
ae5d884af4ed
Added a Browse Folder button to test the folder browsing dialogs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
897
diff
changeset
|
602 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
603 char *tmp = dw_file_browse("Pick a folder", ".", "c", DW_DIRECTORY_OPEN ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
604 printf("Folder picked: %s\n", tmp ? tmp : "None"); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
605 return 0; |
905
ae5d884af4ed
Added a Browse Folder button to test the folder browsing dialogs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
897
diff
changeset
|
606 } |
ae5d884af4ed
Added a Browse Folder button to test the folder browsing dialogs.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
897
diff
changeset
|
607 |
503
f3ed8dda02f8
Added dw_filesystem_change_*() and testcase code from Mark in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
487
diff
changeset
|
608 int DWSIGNAL button_callback(HWND window, void *data) |
f3ed8dda02f8
Added dw_filesystem_change_*() and testcase code from Mark in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
487
diff
changeset
|
609 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
610 unsigned int y,m,d; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
611 unsigned int idx; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
612 int len; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
613 long spvalue; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
614 char buf1[100]; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
615 char buf2[100]; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
616 char buf3[500]; |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
617 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
618 idx = dw_listbox_selected( combobox1 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
619 dw_listbox_get_text( combobox1, idx, buf1, 99 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
620 idx = dw_listbox_selected( combobox2 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
621 dw_listbox_get_text( combobox2, idx, buf2, 99 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
622 dw_calendar_get_date( cal, &y, &m, &d ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
623 spvalue = dw_spinbutton_get_pos( spinbutton ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
624 len = sprintf( buf3, "spinbutton: %ld\ncombobox1: \"%s\"\ncombobox2: \"%s\"\ncalendar: %d-%d-%d", |
620
9876b75d7115
Added menu tests, including checked and disabled menu items.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
606
diff
changeset
|
625 spvalue, |
9876b75d7115
Added menu tests, including checked and disabled menu items.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
606
diff
changeset
|
626 buf1, buf2, |
9876b75d7115
Added menu tests, including checked and disabled menu items.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
606
diff
changeset
|
627 y, m, d ); |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
628 dw_messagebox( "Values", DW_MB_OK | DW_MB_INFORMATION, buf3 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
629 dw_clipboard_set_text( buf3, len ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
630 return 0; |
503
f3ed8dda02f8
Added dw_filesystem_change_*() and testcase code from Mark in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
487
diff
changeset
|
631 } |
f3ed8dda02f8
Added dw_filesystem_change_*() and testcase code from Mark in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
487
diff
changeset
|
632 |
1190
76262040ed5f
Added DW_PERCENT_INDETERMINATE which can be passed to dw_percent_set_pos() to
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1186
diff
changeset
|
633 int DWSIGNAL percent_button_box_callback(HWND window, void *data) |
503
f3ed8dda02f8
Added dw_filesystem_change_*() and testcase code from Mark in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
487
diff
changeset
|
634 { |
1190
76262040ed5f
Added DW_PERCENT_INDETERMINATE which can be passed to dw_percent_set_pos() to
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1186
diff
changeset
|
635 dw_percent_set_pos(percent, DW_PERCENT_INDETERMINATE); |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
636 return 0; |
503
f3ed8dda02f8
Added dw_filesystem_change_*() and testcase code from Mark in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
487
diff
changeset
|
637 } |
f3ed8dda02f8
Added dw_filesystem_change_*() and testcase code from Mark in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
487
diff
changeset
|
638 |
634
c6a216c8174f
Support for setting transparent colour for bitmaps
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
629
diff
changeset
|
639 int DWSIGNAL change_color_red_callback(HWND window, void *data) |
c6a216c8174f
Support for setting transparent colour for bitmaps
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
629
diff
changeset
|
640 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
641 dw_window_set_color(buttonsbox, DW_CLR_RED, DW_CLR_RED); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
642 return 0; |
634
c6a216c8174f
Support for setting transparent colour for bitmaps
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
629
diff
changeset
|
643 } |
c6a216c8174f
Support for setting transparent colour for bitmaps
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
629
diff
changeset
|
644 |
c6a216c8174f
Support for setting transparent colour for bitmaps
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
629
diff
changeset
|
645 int DWSIGNAL change_color_yellow_callback(HWND window, void *data) |
c6a216c8174f
Support for setting transparent colour for bitmaps
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
629
diff
changeset
|
646 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
647 dw_window_set_color(buttonsbox, DW_CLR_YELLOW, DW_CLR_YELLOW); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
648 return 0; |
634
c6a216c8174f
Support for setting transparent colour for bitmaps
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
629
diff
changeset
|
649 } |
c6a216c8174f
Support for setting transparent colour for bitmaps
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
629
diff
changeset
|
650 |
c6a216c8174f
Support for setting transparent colour for bitmaps
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
629
diff
changeset
|
651 |
217
7112c817573d
Added test code from mark hessling.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
213
diff
changeset
|
652 /* Callback to handle user selection of the scrollbar position */ |
620
9876b75d7115
Added menu tests, including checked and disabled menu items.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
606
diff
changeset
|
653 void DWSIGNAL scrollbar_valuechanged_callback(HWND hwnd, int value, void *data) |
217
7112c817573d
Added test code from mark hessling.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
213
diff
changeset
|
654 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
655 if(data) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
656 { |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
657 HWND stext = (HWND)data; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
658 char tmpbuf[100]; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
659 if ( hwnd == vscrollbar ) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
660 { |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
661 current_row = value; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
662 } |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
663 else |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
664 { |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
665 current_col = value; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
666 } |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
667 sprintf(tmpbuf, "Row:%d Col:%d Lines:%d Cols:%d", current_row,current_col,num_lines,max_linewidth); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
668 dw_window_set_text(stext, tmpbuf); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
669 update_render(); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
670 } |
217
7112c817573d
Added test code from mark hessling.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
213
diff
changeset
|
671 } |
7112c817573d
Added test code from mark hessling.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
213
diff
changeset
|
672 |
602
489a684af1bb
Add some more test
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
600
diff
changeset
|
673 /* Callback to handle user selection of the spinbutton position */ |
620
9876b75d7115
Added menu tests, including checked and disabled menu items.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
606
diff
changeset
|
674 void DWSIGNAL spinbutton_valuechanged_callback(HWND hwnd, int value, void *data) |
602
489a684af1bb
Add some more test
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
600
diff
changeset
|
675 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
676 dw_messagebox("DWTest", DW_MB_OK, "New value from spinbutton: %d\n", value); |
602
489a684af1bb
Add some more test
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
600
diff
changeset
|
677 } |
489a684af1bb
Add some more test
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
600
diff
changeset
|
678 |
627
77cc62375fee
Fixed dw_html_raw() under GTK+ and added test case for it
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
621
diff
changeset
|
679 /* Callback to handle user selection of the slider position */ |
77cc62375fee
Fixed dw_html_raw() under GTK+ and added test case for it
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
621
diff
changeset
|
680 void DWSIGNAL slider_valuechanged_callback(HWND hwnd, int value, void *data) |
77cc62375fee
Fixed dw_html_raw() under GTK+ and added test case for it
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
621
diff
changeset
|
681 { |
1190
76262040ed5f
Added DW_PERCENT_INDETERMINATE which can be passed to dw_percent_set_pos() to
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1186
diff
changeset
|
682 dw_percent_set_pos(percent, value * 10); |
627
77cc62375fee
Fixed dw_html_raw() under GTK+ and added test case for it
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
621
diff
changeset
|
683 } |
77cc62375fee
Fixed dw_html_raw() under GTK+ and added test case for it
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
621
diff
changeset
|
684 |
218
fe0ab0040ba2
Not quite right yet but... handle resize and pixmap resizing.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
217
diff
changeset
|
685 /* Handle size change of the main render window */ |
fe0ab0040ba2
Not quite right yet but... handle resize and pixmap resizing.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
217
diff
changeset
|
686 int DWSIGNAL configure_event(HWND hwnd, int width, int height, void *data) |
fe0ab0040ba2
Not quite right yet but... handle resize and pixmap resizing.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
217
diff
changeset
|
687 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
688 HPIXMAP old1 = text1pm, old2 = text2pm; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
689 unsigned long depth = dw_color_depth_get(); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
690 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
691 rows = height / font_height; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
692 cols = width / font_width; |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
693 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
694 /* Create new pixmaps with the current sizes */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
695 text1pm = dw_pixmap_new(textbox1, (unsigned long)(font_width*(width1)), (unsigned long)height, (int)depth); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
696 text2pm = dw_pixmap_new(textbox2, (unsigned long)width, (unsigned long)height, (int)depth); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
697 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
698 /* Destroy the old pixmaps */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
699 dw_pixmap_destroy(old1); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
700 dw_pixmap_destroy(old2); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
701 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
702 /* Update scrollbar ranges with new values */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
703 dw_scrollbar_set_range(hscrollbar, max_linewidth, cols); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
704 dw_scrollbar_set_range(vscrollbar, num_lines, rows); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
705 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
706 /* Redraw the window */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
707 update_render(); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
708 return TRUE; |
218
fe0ab0040ba2
Not quite right yet but... handle resize and pixmap resizing.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
217
diff
changeset
|
709 } |
fe0ab0040ba2
Not quite right yet but... handle resize and pixmap resizing.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
217
diff
changeset
|
710 |
311
24c1dfffe97e
Unified the callback functions for tree and container widgets.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
310
diff
changeset
|
711 int DWSIGNAL item_enter_cb( HWND window, char *text, void *data ) |
304
c28c0a804442
Added extra notebook page for a container example.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
300
diff
changeset
|
712 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
713 char buf[200]; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
714 HWND statline = (HWND)data; |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
715 |
1102
cfe7d2b6bc16
Added DW_INT_TO_POINTER/DW_UINT_TO_POINTER/DW_POINTER_TO_INT/DW_POINTER_TO_UINT macros.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1090
diff
changeset
|
716 sprintf(buf,"DW_SIGNAL_ITEM_ENTER: Window: %x Text: %s", DW_POINTER_TO_UINT(window), text ); |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
717 dw_window_set_text( statline, buf); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
718 return 0; |
304
c28c0a804442
Added extra notebook page for a container example.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
300
diff
changeset
|
719 } |
c28c0a804442
Added extra notebook page for a container example.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
300
diff
changeset
|
720 |
311
24c1dfffe97e
Unified the callback functions for tree and container widgets.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
310
diff
changeset
|
721 int DWSIGNAL item_context_cb( HWND window, char *text, int x, int y, void *data, void *itemdata ) |
304
c28c0a804442
Added extra notebook page for a container example.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
300
diff
changeset
|
722 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
723 char buf[200]; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
724 HWND statline = (HWND)data; |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
725 |
1102
cfe7d2b6bc16
Added DW_INT_TO_POINTER/DW_UINT_TO_POINTER/DW_POINTER_TO_INT/DW_POINTER_TO_UINT macros.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1090
diff
changeset
|
726 sprintf(buf,"DW_SIGNAL_ITEM_CONTEXT: Window: %x Text: %s x: %d y: %d Itemdata: %x", DW_POINTER_TO_UINT(window), text, x, y, DW_POINTER_TO_UINT(itemdata) ); |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
727 dw_window_set_text( statline, buf); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
728 return 0; |
304
c28c0a804442
Added extra notebook page for a container example.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
300
diff
changeset
|
729 } |
c28c0a804442
Added extra notebook page for a container example.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
300
diff
changeset
|
730 |
311
24c1dfffe97e
Unified the callback functions for tree and container widgets.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
310
diff
changeset
|
731 int DWSIGNAL list_select_cb( HWND window, int item, void *data ) |
304
c28c0a804442
Added extra notebook page for a container example.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
300
diff
changeset
|
732 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
733 char buf[200]; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
734 HWND statline = (HWND)data; |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
735 |
1102
cfe7d2b6bc16
Added DW_INT_TO_POINTER/DW_UINT_TO_POINTER/DW_POINTER_TO_INT/DW_POINTER_TO_UINT macros.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1090
diff
changeset
|
736 sprintf(buf,"DW_SIGNAL_LIST_SELECT: Window: %d Item: %d", DW_POINTER_TO_UINT(window), item ); |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
737 dw_window_set_text( statline, buf); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
738 return 0; |
304
c28c0a804442
Added extra notebook page for a container example.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
300
diff
changeset
|
739 } |
c28c0a804442
Added extra notebook page for a container example.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
300
diff
changeset
|
740 |
328
e00aff2b899e
Tree item handles are now of the type HTREEITEM instead of HWND since they
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
327
diff
changeset
|
741 int DWSIGNAL item_select_cb( HWND window, HTREEITEM item, char *text, void *data, void *itemdata ) |
304
c28c0a804442
Added extra notebook page for a container example.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
300
diff
changeset
|
742 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
743 char buf[200]; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
744 HWND statline = (HWND)data; |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
745 |
1102
cfe7d2b6bc16
Added DW_INT_TO_POINTER/DW_UINT_TO_POINTER/DW_POINTER_TO_INT/DW_POINTER_TO_UINT macros.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1090
diff
changeset
|
746 sprintf(buf,"DW_SIGNAL_ITEM_SELECT: Window: %x Item: %x Text: %s Itemdata: %x", DW_POINTER_TO_UINT(window), |
cfe7d2b6bc16
Added DW_INT_TO_POINTER/DW_UINT_TO_POINTER/DW_POINTER_TO_INT/DW_POINTER_TO_UINT macros.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1090
diff
changeset
|
747 DW_POINTER_TO_UINT(item), text, DW_POINTER_TO_UINT(itemdata) ); |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
748 dw_window_set_text( statline, buf); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
749 return 0; |
304
c28c0a804442
Added extra notebook page for a container example.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
300
diff
changeset
|
750 } |
c28c0a804442
Added extra notebook page for a container example.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
300
diff
changeset
|
751 |
348
fa6aeb52d51a
Added MLE for the container page to show what is going on in the item-select
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
346
diff
changeset
|
752 int DWSIGNAL container_select_cb( HWND window, HTREEITEM item, char *text, void *data, void *itemdata ) |
fa6aeb52d51a
Added MLE for the container page to show what is going on in the item-select
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
346
diff
changeset
|
753 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
754 char buf[200]; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
755 char *str; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
756 HWND statline = (HWND)data; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
757 unsigned long size; |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
758 |
1102
cfe7d2b6bc16
Added DW_INT_TO_POINTER/DW_UINT_TO_POINTER/DW_POINTER_TO_INT/DW_POINTER_TO_UINT macros.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1090
diff
changeset
|
759 sprintf(buf,"DW_SIGNAL_ITEM_SELECT: Window: %x Item: %x Text: %s Itemdata: %x", DW_POINTER_TO_UINT(window), |
cfe7d2b6bc16
Added DW_INT_TO_POINTER/DW_UINT_TO_POINTER/DW_POINTER_TO_INT/DW_POINTER_TO_UINT macros.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1090
diff
changeset
|
760 DW_POINTER_TO_UINT(item), text, DW_POINTER_TO_UINT(itemdata) ); |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
761 dw_window_set_text( statline, buf); |
1102
cfe7d2b6bc16
Added DW_INT_TO_POINTER/DW_UINT_TO_POINTER/DW_POINTER_TO_INT/DW_POINTER_TO_UINT macros.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1090
diff
changeset
|
762 sprintf(buf,"\r\nDW_SIGNAL_ITEM_SELECT: Window: %x Item: %x Text: %s Itemdata: %x\r\n", DW_POINTER_TO_UINT(window), |
cfe7d2b6bc16
Added DW_INT_TO_POINTER/DW_UINT_TO_POINTER/DW_POINTER_TO_INT/DW_POINTER_TO_UINT macros.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1090
diff
changeset
|
763 DW_POINTER_TO_UINT(item), text, DW_POINTER_TO_UINT(itemdata) ); |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
764 mle_point = dw_mle_import( container_mle, buf, mle_point); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
765 str = dw_container_query_start(container, DW_CRA_SELECTED); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
766 while(str) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
767 { |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
768 sprintf(buf,"Selected: %s\r\n", str); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
769 mle_point = dw_mle_import( container_mle, buf, mle_point); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
770 str = dw_container_query_next(container, DW_CRA_SELECTED); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
771 } |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
772 /* Make the last inserted point the cursor location */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
773 dw_mle_set_cursor(container_mle, mle_point); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
774 /* set the details of item 0 to new data */ |
1102
cfe7d2b6bc16
Added DW_INT_TO_POINTER/DW_UINT_TO_POINTER/DW_POINTER_TO_INT/DW_POINTER_TO_UINT macros.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1090
diff
changeset
|
775 fprintf(stderr,"In cb: container: %x containerinfo: %x icon: %x\n", DW_POINTER_TO_INT(container), |
cfe7d2b6bc16
Added DW_INT_TO_POINTER/DW_UINT_TO_POINTER/DW_POINTER_TO_INT/DW_POINTER_TO_UINT macros.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1090
diff
changeset
|
776 DW_POINTER_TO_INT(containerinfo), DW_POINTER_TO_INT(fileicon)); |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
777 dw_filesystem_change_file(container, 0, "new data", fileicon); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
778 size = 999; |
1102
cfe7d2b6bc16
Added DW_INT_TO_POINTER/DW_UINT_TO_POINTER/DW_POINTER_TO_INT/DW_POINTER_TO_UINT macros.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1090
diff
changeset
|
779 fprintf(stderr,"In cb: container: %x containerinfo: %x icon: %x\n", DW_POINTER_TO_INT(container), |
cfe7d2b6bc16
Added DW_INT_TO_POINTER/DW_UINT_TO_POINTER/DW_POINTER_TO_INT/DW_POINTER_TO_UINT macros.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1090
diff
changeset
|
780 DW_POINTER_TO_INT(containerinfo), DW_POINTER_TO_INT(fileicon)); |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
781 dw_filesystem_change_item(container, 1, 0, &size); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
782 return 0; |
348
fa6aeb52d51a
Added MLE for the container page to show what is going on in the item-select
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
346
diff
changeset
|
783 } |
fa6aeb52d51a
Added MLE for the container page to show what is going on in the item-select
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
346
diff
changeset
|
784 |
346
81fae15885d7
Implemented switch-page on OS/2, and changed the signal prototype to
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
336
diff
changeset
|
785 int DWSIGNAL switch_page_cb( HWND window, unsigned long page_num, void *itemdata ) |
333
b6491cefa512
Add test for switch-page signal.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
328
diff
changeset
|
786 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
787 FILE *fp=fopen("log","a"); |
1090
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
788 if ( fp ) |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
789 { |
1102
cfe7d2b6bc16
Added DW_INT_TO_POINTER/DW_UINT_TO_POINTER/DW_POINTER_TO_INT/DW_POINTER_TO_UINT macros.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1090
diff
changeset
|
790 fprintf(fp,"DW_SIGNAL_SWITCH_PAGE: Window: %x PageNum: %u Itemdata: %x\n", DW_POINTER_TO_UINT(window), |
cfe7d2b6bc16
Added DW_INT_TO_POINTER/DW_UINT_TO_POINTER/DW_POINTER_TO_INT/DW_POINTER_TO_UINT macros.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1090
diff
changeset
|
791 DW_POINTER_TO_UINT(page_num), DW_POINTER_TO_UINT(itemdata) ); |
1090
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
792 fclose(fp); |
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
793 } |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
794 return 0; |
333
b6491cefa512
Add test for switch-page signal.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
328
diff
changeset
|
795 } |
b6491cefa512
Add test for switch-page signal.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
328
diff
changeset
|
796 |
474
053211e0698b
Add tracing code for column-click signal.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
459
diff
changeset
|
797 int DWSIGNAL column_click_cb( HWND window, int column_num, void *data ) |
053211e0698b
Add tracing code for column-click signal.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
459
diff
changeset
|
798 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
799 char buf[200], buf1[100]; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
800 HWND statline = (HWND)data; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
801 int column_type; |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
802 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
803 if(column_num == 0) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
804 strcpy(buf1,"Filename"); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
805 else |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
806 { |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
807 column_type = dw_filesystem_get_column_type( window, column_num-1 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
808 if( column_type == DW_CFA_STRING) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
809 strcpy(buf1,"String"); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
810 else if( column_type == DW_CFA_ULONG) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
811 strcpy(buf1,"ULong"); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
812 else if( column_type == DW_CFA_DATE) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
813 strcpy(buf1,"Date"); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
814 else if( column_type == DW_CFA_TIME) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
815 strcpy(buf1,"Time"); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
816 else if( column_type == DW_CFA_BITMAPORICON) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
817 strcpy(buf1,"BitmapOrIcon"); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
818 else |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
819 strcpy(buf1,"Unknown"); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
820 } |
1102
cfe7d2b6bc16
Added DW_INT_TO_POINTER/DW_UINT_TO_POINTER/DW_POINTER_TO_INT/DW_POINTER_TO_UINT macros.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1090
diff
changeset
|
821 sprintf(buf,"DW_SIGNAL_COLUMN_CLICK: Window: %x Column: %d Type: %s Itemdata: %x", DW_POINTER_TO_UINT(window), |
cfe7d2b6bc16
Added DW_INT_TO_POINTER/DW_UINT_TO_POINTER/DW_POINTER_TO_INT/DW_POINTER_TO_UINT macros.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1090
diff
changeset
|
822 column_num, buf1, DW_POINTER_TO_UINT(data) ); |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
823 dw_window_set_text( statline, buf); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
824 return 0; |
474
053211e0698b
Add tracing code for column-click signal.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
459
diff
changeset
|
825 } |
053211e0698b
Add tracing code for column-click signal.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
459
diff
changeset
|
826 |
602
489a684af1bb
Add some more test
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
600
diff
changeset
|
827 int DWSIGNAL combobox_select_event_callback(HWND window, int index) |
489a684af1bb
Add some more test
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
600
diff
changeset
|
828 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
829 fprintf(stderr,"got combobox_select_event for index: %d, iteration: %d\n", index, iteration++); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
830 return FALSE; |
602
489a684af1bb
Add some more test
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
600
diff
changeset
|
831 } |
489a684af1bb
Add some more test
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
600
diff
changeset
|
832 |
191
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
833 void archive_add(void) |
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
834 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
835 HWND browsefilebutton, browsefolderbutton, browsebox; |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
836 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
837 lbbox = dw_box_new(BOXVERT, 10); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
838 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
839 dw_box_pack_start(notebookbox1, lbbox, 150, 70, TRUE, TRUE, 0); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
840 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
841 /* Archive Name */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
842 stext = dw_text_new("File to browse", 0); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
843 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
844 dw_window_set_style(stext, DW_DT_VCENTER, DW_DT_VCENTER); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
845 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
846 dw_box_pack_start(lbbox, stext, 130, 15, TRUE, TRUE, 2); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
847 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
848 browsebox = dw_box_new(BOXHORZ, 0); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
849 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
850 dw_box_pack_start(lbbox, browsebox, 0, 0, TRUE, TRUE, 0); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
851 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
852 entryfield = dw_entryfield_new("", 100L); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
853 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
854 dw_entryfield_set_limit(entryfield, 260); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
855 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
856 dw_box_pack_start(browsebox, entryfield, 100, 15, TRUE, TRUE, 4); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
857 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
858 browsefilebutton = dw_button_new("Browse File", 1001L); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
859 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
860 dw_box_pack_start(browsebox, browsefilebutton, 40, 15, TRUE, TRUE, 0); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
861 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
862 browsefolderbutton = dw_button_new("Browse Folder", 1001L); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
863 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
864 dw_box_pack_start(browsebox, browsefolderbutton, 40, 15, TRUE, TRUE, 0); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
865 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
866 dw_window_set_color(browsebox, DW_CLR_PALEGRAY, DW_CLR_PALEGRAY); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
867 dw_window_set_color(stext, DW_CLR_BLACK, DW_CLR_PALEGRAY); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
868 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
869 /* Buttons */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
870 buttonbox = dw_box_new(BOXHORZ, 10); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
871 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
872 dw_box_pack_start(lbbox, buttonbox, 0, 0, TRUE, TRUE, 0); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
873 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
874 cursortogglebutton = dw_button_new("Set Cursor pointer - CLOCK", 1003L); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
875 dw_box_pack_start(buttonbox, cursortogglebutton, 130, 30, TRUE, TRUE, 2); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
876 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
877 okbutton = dw_button_new("Turn Off Annoying Beep!", 1001L); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
878 dw_box_pack_start(buttonbox, okbutton, 130, 30, TRUE, TRUE, 2); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
879 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
880 cancelbutton = dw_button_new("Exit", 1002L); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
881 dw_box_pack_start(buttonbox, cancelbutton, 130, 30, TRUE, TRUE, 2); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
882 dw_window_click_default( mainwindow, cancelbutton ); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
883 |
1077
34f1d6f5f1c3
Added function dw_box_pack_at_index() on Windows, Mac and OS/2. And an example usage in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1049
diff
changeset
|
884 colorchoosebutton = dw_button_new("Color Chooser Dialog", 1004L); |
34f1d6f5f1c3
Added function dw_box_pack_at_index() on Windows, Mac and OS/2. And an example usage in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1049
diff
changeset
|
885 dw_box_pack_at_index(buttonbox, colorchoosebutton, 1, 130, 30, TRUE, TRUE, 2); |
34f1d6f5f1c3
Added function dw_box_pack_at_index() on Windows, Mac and OS/2. And an example usage in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1049
diff
changeset
|
886 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
887 /* Set some nice fonts and colors */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
888 dw_window_set_color(lbbox, DW_CLR_DARKCYAN, DW_CLR_PALEGRAY); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
889 dw_window_set_color(buttonbox, DW_CLR_DARKCYAN, DW_CLR_PALEGRAY); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
890 dw_window_set_color(okbutton, DW_CLR_PALEGRAY, DW_CLR_DARKCYAN); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
891 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
892 dw_signal_connect(browsefilebutton, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(browse_file_callback), (void *)notebookbox1); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
893 dw_signal_connect(browsefolderbutton, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(browse_folder_callback), (void *)notebookbox1); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
894 dw_signal_connect(okbutton, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(beep_callback), (void *)notebookbox1); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
895 dw_signal_connect(cancelbutton, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(exit_callback), (void *)mainwindow); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
896 dw_signal_connect(cursortogglebutton, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(cursortoggle_callback), (void *)mainwindow); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
897 dw_signal_connect(colorchoosebutton, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(colorchoose_callback), (void *)mainwindow); |
191
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
898 } |
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
899 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
900 int API motion_notify_event(HWND window, int x, int y, int buttonmask, void *data) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
901 { |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
902 char buf[200]; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
903 sprintf(buf, "%s: %dx%d", data ? "motion_notify" : "button_press", x, y); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
904 dw_window_set_text(status2, buf); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
905 return 0; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
906 } |
191
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
907 |
1220
67ff39b9577c
Initial implementation of dw_taskbar_* for the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1213
diff
changeset
|
908 int API context_menu_event(HWND window, int x, int y, int buttonmask, void *data) |
67ff39b9577c
Initial implementation of dw_taskbar_* for the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1213
diff
changeset
|
909 { |
1221
10f5b8645975
Fixes to allow non-toplevel window handles in dw_taskbar_insert() on Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1220
diff
changeset
|
910 HMENUI hwndMenu = dw_menu_new(0L); |
10f5b8645975
Fixes to allow non-toplevel window handles in dw_taskbar_insert() on Windows.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1220
diff
changeset
|
911 HWND menuitem = dw_menu_append_item(hwndMenu, "~Quit", 1019, 0L, TRUE, FALSE, DW_NOMENU); |
1220
67ff39b9577c
Initial implementation of dw_taskbar_* for the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1213
diff
changeset
|
912 long px, py; |
67ff39b9577c
Initial implementation of dw_taskbar_* for the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1213
diff
changeset
|
913 |
67ff39b9577c
Initial implementation of dw_taskbar_* for the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1213
diff
changeset
|
914 dw_signal_connect(menuitem, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(exit_callback), (void *)mainwindow); |
67ff39b9577c
Initial implementation of dw_taskbar_* for the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1213
diff
changeset
|
915 dw_pointer_query_pos(&px, &py); |
1227
b54d37938d61
Fix for the status popup menu not functioning when a different
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1224
diff
changeset
|
916 /* Use the toplevel window handle here.... because on the Mac.. |
b54d37938d61
Fix for the status popup menu not functioning when a different
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1224
diff
changeset
|
917 * using the control itself, when a different tab is active |
b54d37938d61
Fix for the status popup menu not functioning when a different
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1224
diff
changeset
|
918 * the control is removed from the window and can no longer |
b54d37938d61
Fix for the status popup menu not functioning when a different
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1224
diff
changeset
|
919 * handle the messages. |
b54d37938d61
Fix for the status popup menu not functioning when a different
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1224
diff
changeset
|
920 */ |
b54d37938d61
Fix for the status popup menu not functioning when a different
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1224
diff
changeset
|
921 dw_menu_popup(&hwndMenu, mainwindow, (int)px, (int)py); |
1224
cfe8608253a8
Return code of 0 from the button press callback on OS/2 was causing
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1221
diff
changeset
|
922 return TRUE; |
1220
67ff39b9577c
Initial implementation of dw_taskbar_* for the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1213
diff
changeset
|
923 } |
67ff39b9577c
Initial implementation of dw_taskbar_* for the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1213
diff
changeset
|
924 |
191
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
925 void text_add(void) |
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
926 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
927 unsigned long depth = dw_color_depth_get(); |
1137
e24e5a13ff2c
Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1110
diff
changeset
|
928 HWND vscrollbox, hbox, button1, button2, label; |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
929 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
930 /* create a box to pack into the notebook page */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
931 pagebox = dw_box_new(BOXHORZ, 2); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
932 dw_box_pack_start( notebookbox2, pagebox, 0, 0, TRUE, TRUE, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
933 /* now a status area under this box */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
934 hbox = dw_box_new(BOXHORZ, 1 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
935 dw_box_pack_start( notebookbox2, hbox, 100, 20, TRUE, FALSE, 1); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
936 status1 = dw_status_text_new("", 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
937 dw_box_pack_start( hbox, status1, 100, 20, TRUE, FALSE, 1); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
938 status2 = dw_status_text_new("", 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
939 dw_box_pack_start( hbox, status2, 100, 20, TRUE, FALSE, 1); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
940 /* a box with combobox and button */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
941 hbox = dw_box_new(BOXHORZ, 1 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
942 dw_box_pack_start( notebookbox2, hbox, 100, 25, TRUE, FALSE, 1); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
943 rendcombo = dw_combobox_new( "Shapes Double Buffered", 0 ); |
1142
88cc189b5e56
Some layout updates on the dwtest render page.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1137
diff
changeset
|
944 dw_box_pack_start( hbox, rendcombo, 80, 25, TRUE, FALSE, 0); |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
945 dw_listbox_append(rendcombo, "Shapes Double Buffered"); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
946 dw_listbox_append(rendcombo, "Shapes Direct"); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
947 dw_listbox_append(rendcombo, "File Display"); |
957
beed3e7f9d4b
Fixes to flip pixmaps when loading from file or data on Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
955
diff
changeset
|
948 label = dw_text_new("Image X:", 100); |
1142
88cc189b5e56
Some layout updates on the dwtest render page.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1137
diff
changeset
|
949 dw_window_set_style(label, DW_DT_VCENTER | DW_DT_CENTER, DW_DT_VCENTER | DW_DT_CENTER); |
88cc189b5e56
Some layout updates on the dwtest render page.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1137
diff
changeset
|
950 dw_box_pack_start( hbox, label, 60, 25, FALSE, FALSE, 0); |
957
beed3e7f9d4b
Fixes to flip pixmaps when loading from file or data on Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
955
diff
changeset
|
951 imagexspin = dw_spinbutton_new("20", 1021); |
1142
88cc189b5e56
Some layout updates on the dwtest render page.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1137
diff
changeset
|
952 dw_box_pack_start( hbox, imagexspin, 25, 25, TRUE, FALSE, 0); |
957
beed3e7f9d4b
Fixes to flip pixmaps when loading from file or data on Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
955
diff
changeset
|
953 label = dw_text_new("Y:", 100); |
1142
88cc189b5e56
Some layout updates on the dwtest render page.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1137
diff
changeset
|
954 dw_window_set_style(label, DW_DT_VCENTER | DW_DT_CENTER, DW_DT_VCENTER | DW_DT_CENTER); |
88cc189b5e56
Some layout updates on the dwtest render page.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1137
diff
changeset
|
955 dw_box_pack_start( hbox, label, 25, 25, FALSE, FALSE, 0); |
957
beed3e7f9d4b
Fixes to flip pixmaps when loading from file or data on Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
955
diff
changeset
|
956 imageyspin = dw_spinbutton_new("20", 1021); |
1142
88cc189b5e56
Some layout updates on the dwtest render page.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1137
diff
changeset
|
957 dw_box_pack_start( hbox, imageyspin, 25, 25, TRUE, FALSE, 0); |
957
beed3e7f9d4b
Fixes to flip pixmaps when loading from file or data on Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
955
diff
changeset
|
958 dw_spinbutton_set_limits(imagexspin, 2000, 0); |
beed3e7f9d4b
Fixes to flip pixmaps when loading from file or data on Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
955
diff
changeset
|
959 dw_spinbutton_set_limits(imageyspin, 2000, 0); |
beed3e7f9d4b
Fixes to flip pixmaps when loading from file or data on Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
955
diff
changeset
|
960 dw_spinbutton_set_pos(imagexspin, 20); |
beed3e7f9d4b
Fixes to flip pixmaps when loading from file or data on Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
955
diff
changeset
|
961 dw_spinbutton_set_pos(imageyspin, 20); |
1243
c191a562c14a
Added new dw_pixmap_stretch_bitblt() function on Windows and OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1242
diff
changeset
|
962 imagestretchcheck = dw_checkbox_new("Stretch", 1021); |
c191a562c14a
Added new dw_pixmap_stretch_bitblt() function on Windows and OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1242
diff
changeset
|
963 dw_box_pack_start( hbox, imagestretchcheck, 25, 25, TRUE, FALSE, 0); |
957
beed3e7f9d4b
Fixes to flip pixmaps when loading from file or data on Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
955
diff
changeset
|
964 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
965 button1 = dw_button_new( "Refresh", 1223L ); |
1142
88cc189b5e56
Some layout updates on the dwtest render page.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1137
diff
changeset
|
966 dw_box_pack_start( hbox, button1, 100, 25, FALSE, FALSE, 0); |
1137
e24e5a13ff2c
Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1110
diff
changeset
|
967 button2 = dw_button_new( "Print", 1224L ); |
1142
88cc189b5e56
Some layout updates on the dwtest render page.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1137
diff
changeset
|
968 dw_box_pack_start( hbox, button2, 100, 25, FALSE, FALSE, 0); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
969 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
970 /* create render box for number pixmap */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
971 textbox1 = dw_render_new( 100 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
972 dw_window_set_font(textbox1, FIXEDFONT); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
973 dw_font_text_extents_get(textbox1, NULL, "(g", &font_width, &font_height); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
974 font_width = font_width / 2; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
975 vscrollbox = dw_box_new(BOXVERT, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
976 dw_box_pack_start(vscrollbox, textbox1, font_width*width1, font_height*rows, FALSE, TRUE, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
977 dw_box_pack_start(vscrollbox, 0, (font_width*(width1+1)), SCROLLBARWIDTH, FALSE, FALSE, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
978 dw_box_pack_start(pagebox, vscrollbox, 0, 0, FALSE, TRUE, 0); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
979 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
980 /* pack empty space 1 character wide */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
981 dw_box_pack_start(pagebox, 0, font_width, 0, FALSE, TRUE, 0); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
982 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
983 /* create box for filecontents and horz scrollbar */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
984 textboxA = dw_box_new( BOXVERT,0 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
985 dw_box_pack_start( pagebox, textboxA, 0, 0, TRUE, TRUE, 0); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
986 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
987 /* create render box for filecontents pixmap */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
988 textbox2 = dw_render_new( 101 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
989 dw_box_pack_start( textboxA, textbox2, 10, 10, TRUE, TRUE, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
990 dw_window_set_font(textbox2, FIXEDFONT); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
991 /* create horizonal scrollbar */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
992 hscrollbar = dw_scrollbar_new(FALSE, 50); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
993 dw_box_pack_start( textboxA, hscrollbar, 100, SCROLLBARWIDTH, TRUE, FALSE, 0); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
994 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
995 /* create vertical scrollbar */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
996 vscrollbox = dw_box_new(BOXVERT, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
997 vscrollbar = dw_scrollbar_new(TRUE, 50); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
998 dw_box_pack_start(vscrollbox, vscrollbar, SCROLLBARWIDTH, 100, FALSE, TRUE, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
999 /* Pack an area of empty space 14x14 pixels */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1000 dw_box_pack_start(vscrollbox, 0, SCROLLBARWIDTH, SCROLLBARWIDTH, FALSE, FALSE, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1001 dw_box_pack_start(pagebox, vscrollbox, 0, 0, FALSE, TRUE, 0); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1002 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1003 text1pm = dw_pixmap_new( textbox1, font_width*width1, font_height*rows, (int)depth ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1004 text2pm = dw_pixmap_new( textbox2, font_width*cols, font_height*rows, (int)depth ); |
958 | 1005 image = dw_pixmap_new_from_file(textbox2, "image/test"); |
957
beed3e7f9d4b
Fixes to flip pixmaps when loading from file or data on Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
955
diff
changeset
|
1006 if(!image) |
958 | 1007 image = dw_pixmap_new_from_file(textbox2, "~/test"); |
1008 if(image) | |
1009 dw_pixmap_set_transparent_color(image, DW_CLR_WHITE); | |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1010 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1011 dw_messagebox("DWTest", DW_MB_OK|DW_MB_INFORMATION, "Width: %d Height: %d\n", font_width, font_height); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1012 dw_draw_rect(0, text1pm, TRUE, 0, 0, font_width*width1, font_height*rows); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1013 dw_draw_rect(0, text2pm, TRUE, 0, 0, font_width*cols, font_height*rows); |
1220
67ff39b9577c
Initial implementation of dw_taskbar_* for the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1213
diff
changeset
|
1014 dw_signal_connect(textbox1, DW_SIGNAL_BUTTON_PRESS, DW_SIGNAL_FUNC(context_menu_event), NULL); |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1015 dw_signal_connect(textbox1, DW_SIGNAL_EXPOSE, DW_SIGNAL_FUNC(text_expose), NULL); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1016 dw_signal_connect(textbox2, DW_SIGNAL_EXPOSE, DW_SIGNAL_FUNC(text_expose), NULL); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1017 dw_signal_connect(textbox2, DW_SIGNAL_CONFIGURE, DW_SIGNAL_FUNC(configure_event), text2pm); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1018 dw_signal_connect(textbox2, DW_SIGNAL_MOTION_NOTIFY, DW_SIGNAL_FUNC(motion_notify_event), (void *)1); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1019 dw_signal_connect(textbox2, DW_SIGNAL_BUTTON_PRESS, DW_SIGNAL_FUNC(motion_notify_event), (void *)0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1020 dw_signal_connect(hscrollbar, DW_SIGNAL_VALUE_CHANGED, DW_SIGNAL_FUNC(scrollbar_valuechanged_callback), (void *)status1); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1021 dw_signal_connect(vscrollbar, DW_SIGNAL_VALUE_CHANGED, DW_SIGNAL_FUNC(scrollbar_valuechanged_callback), (void *)status1); |
1243
c191a562c14a
Added new dw_pixmap_stretch_bitblt() function on Windows and OS/2.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1242
diff
changeset
|
1022 dw_signal_connect(imagestretchcheck, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(refresh_callback), NULL); |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1023 dw_signal_connect(button1, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(refresh_callback), NULL); |
1137
e24e5a13ff2c
Added code to test the new print functions in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1110
diff
changeset
|
1024 dw_signal_connect(button2, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(print_callback), NULL); |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1025 dw_signal_connect(rendcombo, DW_SIGNAL_LIST_SELECT, DW_SIGNAL_FUNC(render_select_event_callback), NULL ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1026 dw_signal_connect(mainwindow, DW_SIGNAL_KEY_PRESS, DW_SIGNAL_FUNC(keypress_callback), NULL); |
1220
67ff39b9577c
Initial implementation of dw_taskbar_* for the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1213
diff
changeset
|
1027 |
67ff39b9577c
Initial implementation of dw_taskbar_* for the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1213
diff
changeset
|
1028 dw_taskbar_insert(textbox1, fileicon, "DWTest"); |
254
42332e598d55
Add third notebook page - for tree example. Just starting.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
253
diff
changeset
|
1029 } |
42332e598d55
Add third notebook page - for tree example. Just starting.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
253
diff
changeset
|
1030 |
42332e598d55
Add third notebook page - for tree example. Just starting.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
253
diff
changeset
|
1031 void tree_add(void) |
42332e598d55
Add third notebook page - for tree example. Just starting.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
253
diff
changeset
|
1032 { |
1186
ce83df520be0
Remove the MDI notebook tab from DEPRECATED.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1152
diff
changeset
|
1033 HTREEITEM t1,t2; |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1034 HWND listbox; |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1035 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1036 /* create a box to pack into the notebook page */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1037 listbox = dw_listbox_new(1024, TRUE); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1038 dw_box_pack_start( notebookbox3, listbox, 500, 200, TRUE, TRUE, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1039 dw_listbox_append(listbox, "Test 1"); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1040 dw_listbox_append(listbox, "Test 2"); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1041 dw_listbox_append(listbox, "Test 3"); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1042 dw_listbox_append(listbox, "Test 4"); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1043 dw_listbox_append(listbox, "Test 5"); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1044 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1045 /* create a box to pack into the notebook page */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1046 treebox = dw_box_new(BOXHORZ, 2); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1047 dw_box_pack_start( notebookbox3, treebox, 500, 200, TRUE, TRUE, 0); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1048 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1049 /* now a tree area under this box */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1050 tree = dw_tree_new(101); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1051 dw_box_pack_start( notebookbox3, tree, 500, 200, TRUE, FALSE, 1); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1052 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1053 /* and a status area to see whats going on */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1054 tree_status = dw_status_text_new("", 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1055 dw_box_pack_start( notebookbox3, tree_status, 100, 20, TRUE, FALSE, 1); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1056 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1057 /* set up our signal trappers... */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1058 dw_signal_connect(tree, DW_SIGNAL_ITEM_CONTEXT, DW_SIGNAL_FUNC(item_context_cb), (void *)tree_status); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1059 dw_signal_connect(tree, DW_SIGNAL_ITEM_SELECT, DW_SIGNAL_FUNC(item_select_cb), (void *)tree_status); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1060 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1061 t1 = dw_tree_insert(tree, "tree folder 1", foldericon, NULL, (void *)1 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1062 t2 = dw_tree_insert(tree, "tree folder 2", foldericon, NULL, (void *)2 ); |
1186
ce83df520be0
Remove the MDI notebook tab from DEPRECATED.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1152
diff
changeset
|
1063 dw_tree_insert(tree, "tree file 1", fileicon, t1, (void *)3 ); |
ce83df520be0
Remove the MDI notebook tab from DEPRECATED.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1152
diff
changeset
|
1064 dw_tree_insert(tree, "tree file 2", fileicon, t1, (void *)4 ); |
ce83df520be0
Remove the MDI notebook tab from DEPRECATED.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1152
diff
changeset
|
1065 dw_tree_insert(tree, "tree file 3", fileicon, t2, (void *)5 ); |
ce83df520be0
Remove the MDI notebook tab from DEPRECATED.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1152
diff
changeset
|
1066 dw_tree_insert(tree, "tree file 4", fileicon, t2, (void *)6 ); |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1067 /* set the folder name and icon again to show error with dw_tree_item_change under GTK 2.0 */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1068 dw_tree_item_change(tree, t1, "tree folder 1", foldericon ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1069 dw_tree_item_change(tree, t2, "tree folder 2", foldericon ); |
304
c28c0a804442
Added extra notebook page for a container example.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
300
diff
changeset
|
1070 } |
c28c0a804442
Added extra notebook page for a container example.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
300
diff
changeset
|
1071 |
c28c0a804442
Added extra notebook page for a container example.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
300
diff
changeset
|
1072 void container_add(void) |
c28c0a804442
Added extra notebook page for a container example.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
300
diff
changeset
|
1073 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1074 char *titles[4]; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1075 char *names[3]; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1076 char buffer[100]; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1077 unsigned long flags[4] = { DW_CFA_BITMAPORICON | DW_CFA_LEFT | DW_CFA_HORZSEPARATOR | DW_CFA_SEPARATOR, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1078 DW_CFA_ULONG | DW_CFA_RIGHT | DW_CFA_HORZSEPARATOR | DW_CFA_SEPARATOR, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1079 DW_CFA_TIME | DW_CFA_CENTER | DW_CFA_HORZSEPARATOR | DW_CFA_SEPARATOR, |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1080 DW_CFA_DATE | DW_CFA_LEFT | DW_CFA_HORZSEPARATOR | DW_CFA_SEPARATOR }; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1081 int z; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1082 CTIME time; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1083 CDATE date; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1084 unsigned long size; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1085 HICN thisicon; |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1086 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1087 /* create a box to pack into the notebook page */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1088 containerbox = dw_box_new(BOXHORZ, 2); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1089 dw_box_pack_start( notebookbox4, containerbox, 500, 200, TRUE, TRUE, 0); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1090 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1091 /* now a container area under this box */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1092 container = dw_container_new(100, TRUE); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1093 dw_box_pack_start( notebookbox4, container, 500, 200, TRUE, FALSE, 1); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1094 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1095 /* and a status area to see whats going on */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1096 container_status = dw_status_text_new("", 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1097 dw_box_pack_start( notebookbox4, container_status, 100, 20, TRUE, FALSE, 1); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1098 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1099 titles[0] = "Type"; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1100 titles[1] = "Size"; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1101 titles[2] = "Time"; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1102 titles[3] = "Date"; |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1103 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1104 dw_filesystem_setup(container, flags, titles, 4); |
1213
22cedf18db25
Fixed a slight miscalculation and simplified the Windows container row code.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1201
diff
changeset
|
1105 dw_container_set_row_bg(container, DW_CLR_DEFAULT, DW_CLR_DEFAULT); |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1106 containerinfo = dw_container_alloc(container, 3); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1107 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1108 for(z=0;z<3;z++) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1109 { |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1110 names[z] = (char *)malloc( 100 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1111 /* yes, there is a memory leak here */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1112 sprintf(names[z],"Don't allocate from stack: Item: %d",z); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1113 size = z*100; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1114 sprintf(buffer, "Filename %d",z+1); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1115 if (z == 0 ) thisicon = foldericon; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1116 else thisicon = fileicon; |
1102
cfe7d2b6bc16
Added DW_INT_TO_POINTER/DW_UINT_TO_POINTER/DW_POINTER_TO_INT/DW_POINTER_TO_UINT macros.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1090
diff
changeset
|
1117 fprintf(stderr,"Initial: container: %x containerinfo: %x icon: %x\n", DW_POINTER_TO_INT(container), |
cfe7d2b6bc16
Added DW_INT_TO_POINTER/DW_UINT_TO_POINTER/DW_POINTER_TO_INT/DW_POINTER_TO_UINT macros.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1090
diff
changeset
|
1118 DW_POINTER_TO_INT(containerinfo), DW_POINTER_TO_INT(thisicon)); |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1119 dw_filesystem_set_file(container, containerinfo, z, buffer, thisicon); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1120 dw_filesystem_set_item(container, containerinfo, 0, z, &thisicon); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1121 dw_filesystem_set_item(container, containerinfo, 1, z, &size); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1122 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1123 time.seconds = z+10; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1124 time.minutes = z+10; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1125 time.hours = z+10; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1126 dw_filesystem_set_item(container, containerinfo, 2, z, &time); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1127 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1128 date.day = z+10; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1129 date.month = z+10; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1130 date.year = z+2000; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1131 dw_filesystem_set_item(container, containerinfo, 3, z, &date); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1132 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1133 dw_container_set_row_title(containerinfo, z, names[z]); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1134 } |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1135 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1136 dw_container_insert(container, containerinfo, 3); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1137 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1138 containerinfo = dw_container_alloc(container, 1); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1139 dw_filesystem_set_file(container, containerinfo, 0, strdup("Yikes"), foldericon); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1140 size = 324; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1141 dw_filesystem_set_item(container, containerinfo, 0, 0, &foldericon); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1142 dw_filesystem_set_item(container, containerinfo, 1, 0, &size); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1143 dw_filesystem_set_item(container, containerinfo, 2, 0, &time); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1144 dw_filesystem_set_item(container, containerinfo, 3, 0, &date); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1145 dw_container_set_row_title(containerinfo, 0, strdup("Extra")); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1146 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1147 dw_container_insert(container, containerinfo, 1); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1148 dw_container_optimize(container); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1149 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1150 container_mle = dw_mle_new( 111 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1151 dw_box_pack_start( containerbox, container_mle, 500, 200, TRUE, TRUE, 0); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1152 |
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1153 mle_point = dw_mle_import(container_mle, "", -1); |
991
64c4c40c5835
Added some MLE tests to dwtest program to make sure MLEs function the same across platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
958
diff
changeset
|
1154 sprintf(buffer, "[%d]", mle_point); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1155 mle_point = dw_mle_import(container_mle, buffer, mle_point); |
991
64c4c40c5835
Added some MLE tests to dwtest program to make sure MLEs function the same across platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
958
diff
changeset
|
1156 sprintf(buffer, "[%d]abczxydefijkl", mle_point); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1157 mle_point = dw_mle_import(container_mle, buffer, mle_point); |
992
2d80b4dcff9a
A few MLE fixes on the Mac... and a slightly updated dwtest for MLE testing.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
991
diff
changeset
|
1158 dw_mle_delete(container_mle, 9, 3); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1159 mle_point = dw_mle_import(container_mle, "gh", 12); |
991
64c4c40c5835
Added some MLE tests to dwtest program to make sure MLEs function the same across platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
958
diff
changeset
|
1160 dw_mle_get_size(container_mle, (unsigned long*)&mle_point, NULL); |
992
2d80b4dcff9a
A few MLE fixes on the Mac... and a slightly updated dwtest for MLE testing.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
991
diff
changeset
|
1161 sprintf(buffer, "[%d]\r\n\r\n", mle_point); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1162 mle_point = dw_mle_import(container_mle, buffer, mle_point); |
991
64c4c40c5835
Added some MLE tests to dwtest program to make sure MLEs function the same across platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
958
diff
changeset
|
1163 dw_mle_set_cursor(container_mle, mle_point); |
64c4c40c5835
Added some MLE tests to dwtest program to make sure MLEs function the same across platforms.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
958
diff
changeset
|
1164 /* connect our event trappers... */ |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1165 dw_signal_connect(container, DW_SIGNAL_ITEM_ENTER, DW_SIGNAL_FUNC(item_enter_cb), (void *)container_status); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1166 dw_signal_connect(container, DW_SIGNAL_ITEM_CONTEXT, DW_SIGNAL_FUNC(item_context_cb), (void *)container_status); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1167 dw_signal_connect(container, DW_SIGNAL_ITEM_SELECT, DW_SIGNAL_FUNC(container_select_cb), (void *)container_status); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1168 dw_signal_connect(container, DW_SIGNAL_COLUMN_CLICK, DW_SIGNAL_FUNC(column_click_cb), (void *)container_status); |
195
b023d363fc09
Added scrollbar and timer support on OS/2 and GTK.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
193
diff
changeset
|
1169 } |
191
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
1170 |
195
b023d363fc09
Added scrollbar and timer support on OS/2 and GTK.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
193
diff
changeset
|
1171 /* Beep every second */ |
b023d363fc09
Added scrollbar and timer support on OS/2 and GTK.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
193
diff
changeset
|
1172 int DWSIGNAL timer_callback(void *data) |
b023d363fc09
Added scrollbar and timer support on OS/2 and GTK.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
193
diff
changeset
|
1173 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1174 dw_beep(200, 200); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1175 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1176 /* Return TRUE so we get called again */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1177 return TRUE; |
191
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
1178 } |
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
1179 |
503
f3ed8dda02f8
Added dw_filesystem_change_*() and testcase code from Mark in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
487
diff
changeset
|
1180 |
f3ed8dda02f8
Added dw_filesystem_change_*() and testcase code from Mark in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
487
diff
changeset
|
1181 void buttons_add(void) |
f3ed8dda02f8
Added dw_filesystem_change_*() and testcase code from Mark in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
487
diff
changeset
|
1182 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1183 HWND abutton1,abutton2,calbox; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1184 int i; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1185 char **text; |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1186 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1187 /* create a box to pack into the notebook page */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1188 buttonsbox = dw_box_new(BOXVERT, 2); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1189 dw_box_pack_start( notebookbox5, buttonsbox, 25, 200, TRUE, TRUE, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1190 dw_window_set_color(buttonsbox, DW_CLR_RED, DW_CLR_RED); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1191 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1192 calbox = dw_box_new(DW_HORZ, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1193 dw_box_pack_start(notebookbox5, calbox, 500, 200, TRUE, TRUE, 1); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1194 cal = dw_calendar_new(100); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1195 dw_box_pack_start(calbox, cal, 180, 160, TRUE, TRUE, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1196 /* |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1197 dw_calendar_set_date(cal, 2001, 1, 1); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1198 */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1199 /* |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1200 * Create our file toolbar boxes... |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1201 */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1202 buttonboxperm = dw_box_new( BOXVERT, 0 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1203 dw_box_pack_start( buttonsbox, buttonboxperm, 25, 0, FALSE, TRUE, 2 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1204 dw_window_set_color(buttonboxperm, DW_CLR_WHITE, DW_CLR_WHITE); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1205 // abutton1 = dw_bitmapbutton_new_from_file( "Top Button", 0, FILE_ICON_NAME ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1206 abutton1 = dw_bitmapbutton_new_from_file( "Top Button", 0, "z:\\projects\\RexxGd\\regina\\tile_up.png" ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1207 dw_box_pack_start( buttonboxperm, abutton1, 100, 30, FALSE, FALSE, 0 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1208 dw_signal_connect( abutton1, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(button_callback), NULL ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1209 dw_box_pack_start( buttonboxperm, 0, 25, 5, FALSE, FALSE, 0 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1210 abutton2 = dw_bitmapbutton_new_from_file( "Bottom", 0, FOLDER_ICON_NAME ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1211 dw_box_pack_start( buttonsbox, abutton2, 25, 25, FALSE, FALSE, 0 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1212 dw_signal_connect( abutton2, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(button_callback), NULL ); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1213 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1214 create_button(0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1215 /* make a combobox */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1216 combox = dw_box_new(BOXVERT, 2); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1217 dw_box_pack_start( notebookbox5, combox, 25, 200, TRUE, TRUE, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1218 combobox1 = dw_combobox_new( "fred", 0 ); /* no point in specifying an initial value */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1219 dw_listbox_append( combobox1, "fred" ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1220 dw_box_pack_start( combox, combobox1, 200, 20, TRUE, FALSE, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1221 /* |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1222 dw_window_set_text( combobox, "initial value"); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1223 */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1224 dw_signal_connect( combobox1, DW_SIGNAL_LIST_SELECT, DW_SIGNAL_FUNC(combobox_select_event_callback), NULL ); |
602
489a684af1bb
Add some more test
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
600
diff
changeset
|
1225 #if 0 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1226 /* add LOTS of items */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1227 fprintf(stderr,"before appending 100 items to combobox using dw_listbox_append()\n"); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1228 for( i = 0; i < 100; i++ ) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1229 { |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1230 sprintf( buf, "item %d", i); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1231 dw_listbox_append( combobox1, buf ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1232 } |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1233 fprintf(stderr,"after appending 100 items to combobox\n"); |
602
489a684af1bb
Add some more test
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
600
diff
changeset
|
1234 #endif |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1235 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1236 combobox2 = dw_combobox_new( "joe", 0 ); /* no point in specifying an initial value */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1237 dw_box_pack_start( combox, combobox2, 200, 20, TRUE, FALSE, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1238 /* |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1239 dw_window_set_text( combobox, "initial value"); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1240 */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1241 dw_signal_connect( combobox2, DW_SIGNAL_LIST_SELECT, DW_SIGNAL_FUNC(combobox_select_event_callback), NULL ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1242 /* add LOTS of items */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1243 fprintf(stderr,"before appending 500 items to combobox using dw_listbox_list_append()\n"); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1244 text = (char **)malloc(500*sizeof(char *)); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1245 for( i = 0; i < 500; i++ ) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1246 { |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1247 text[i] = (char *)malloc( 50 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1248 sprintf( text[i], "item %d", i); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1249 } |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1250 dw_listbox_list_append( combobox2, text, 500 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1251 fprintf(stderr,"after appending 500 items to combobox\n"); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1252 for( i = 0; i < 500; i++ ) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1253 { |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1254 free(text[i]); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1255 } |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1256 free(text); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1257 /* now insert a couple of items */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1258 dw_listbox_insert( combobox2, "inserted item 2", 2 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1259 dw_listbox_insert( combobox2, "inserted item 5", 5 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1260 /* make a spinbutton */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1261 spinbutton = dw_spinbutton_new( "", 0 ); /* no point in specifying text */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1262 dw_box_pack_start( combox, spinbutton, 200, 20, TRUE, FALSE, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1263 dw_spinbutton_set_limits( spinbutton, 100, 1 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1264 dw_spinbutton_set_pos( spinbutton, 30 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1265 dw_signal_connect( spinbutton, DW_SIGNAL_VALUE_CHANGED, DW_SIGNAL_FUNC(spinbutton_valuechanged_callback), NULL ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1266 /* make a slider */ |
1190
76262040ed5f
Added DW_PERCENT_INDETERMINATE which can be passed to dw_percent_set_pos() to
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1186
diff
changeset
|
1267 slider = dw_slider_new( FALSE, 11, 0 ); /* no point in specifying text */ |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1268 dw_box_pack_start( combox, slider, 200, 20, TRUE, FALSE, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1269 dw_signal_connect( slider, DW_SIGNAL_VALUE_CHANGED, DW_SIGNAL_FUNC(slider_valuechanged_callback), NULL ); |
1190
76262040ed5f
Added DW_PERCENT_INDETERMINATE which can be passed to dw_percent_set_pos() to
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1186
diff
changeset
|
1270 /* make a percent */ |
76262040ed5f
Added DW_PERCENT_INDETERMINATE which can be passed to dw_percent_set_pos() to
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1186
diff
changeset
|
1271 percent = dw_percent_new( 0 ); |
76262040ed5f
Added DW_PERCENT_INDETERMINATE which can be passed to dw_percent_set_pos() to
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1186
diff
changeset
|
1272 dw_box_pack_start( combox, percent, 200, 20, TRUE, FALSE, 0); |
503
f3ed8dda02f8
Added dw_filesystem_change_*() and testcase code from Mark in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
487
diff
changeset
|
1273 } |
f3ed8dda02f8
Added dw_filesystem_change_*() and testcase code from Mark in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
487
diff
changeset
|
1274 |
f3ed8dda02f8
Added dw_filesystem_change_*() and testcase code from Mark in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
487
diff
changeset
|
1275 void create_button( int redraw) |
f3ed8dda02f8
Added dw_filesystem_change_*() and testcase code from Mark in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
487
diff
changeset
|
1276 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1277 HWND abutton1; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1278 filetoolbarbox = dw_box_new( BOXVERT, 0 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1279 dw_box_pack_start( buttonboxperm, filetoolbarbox, 0, 0, TRUE, TRUE, 0 ); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1280 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1281 abutton1 = dw_bitmapbutton_new_from_file( "Should be under Top button", 0, "junk" ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1282 dw_box_pack_start( filetoolbarbox, abutton1, 25, 25, FALSE, FALSE, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1283 dw_signal_connect( abutton1, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(change_color_red_callback), NULL ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1284 dw_box_pack_start( filetoolbarbox, 0, 25, 5, FALSE, FALSE, 0 ); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1285 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1286 abutton1 = dw_bitmapbutton_new_from_file( "Should be under Top button", 0, "junk" ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1287 dw_box_pack_start( filetoolbarbox, abutton1, 25, 25, FALSE, FALSE, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1288 dw_signal_connect( abutton1, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(change_color_yellow_callback), NULL ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1289 dw_box_pack_start( filetoolbarbox, 0, 25, 5, FALSE, FALSE, 0 ); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1290 |
1090
b905fd8e7fd1
Use _tempnam() on Windows instead of tmpnam() for dw_*_from_data() functions.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1077
diff
changeset
|
1291 abutton1 = dw_bitmapbutton_new_from_data( "A button from data", 0, folder_ico, 1718 ); |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1292 dw_box_pack_start( filetoolbarbox, abutton1, 25, 25, FALSE, FALSE, 0); |
1190
76262040ed5f
Added DW_PERCENT_INDETERMINATE which can be passed to dw_percent_set_pos() to
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1186
diff
changeset
|
1293 dw_signal_connect( abutton1, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(percent_button_box_callback), NULL ); |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1294 dw_box_pack_start( filetoolbarbox, 0, 25, 5, FALSE, FALSE, 0 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1295 if ( redraw ) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1296 { |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1297 dw_window_redraw( filetoolbarbox ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1298 dw_window_redraw( mainwindow ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1299 } |
503
f3ed8dda02f8
Added dw_filesystem_change_*() and testcase code from Mark in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
487
diff
changeset
|
1300 } |
f3ed8dda02f8
Added dw_filesystem_change_*() and testcase code from Mark in dwtest.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
487
diff
changeset
|
1301 |
515
c3c5d8e36aa3
Implemented MDI Window in Window code on GTK 2.x.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
514
diff
changeset
|
1302 void mdi_add(void) |
c3c5d8e36aa3
Implemented MDI Window in Window code on GTK 2.x.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
514
diff
changeset
|
1303 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1304 HWND mdibox, mdi, mdi1w, mdi1box, ef, mdi2w, mdi2box, bb; |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1305 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1306 /* create a box to pack into the notebook page */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1307 mdibox = dw_box_new(DW_HORZ, 0); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1308 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1309 dw_box_pack_start(notebookbox6, mdibox, 500, 200, TRUE, TRUE, 1); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1310 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1311 /* now a mdi under this box */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1312 mdi = dw_mdi_new(333); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1313 dw_box_pack_start(mdibox, mdi, 500, 200, TRUE, TRUE, 2); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1314 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1315 mdi1w = dw_window_new(mdi, "MDI1", flStyle | DW_FCF_SIZEBORDER | DW_FCF_MINMAX); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1316 mdi1box = dw_box_new(DW_HORZ, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1317 dw_box_pack_start(mdi1w, mdi1box, 0, 0, TRUE, TRUE, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1318 ef = dw_entryfield_new("", 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1319 dw_box_pack_start(mdi1box, ef, 100, 20, FALSE, FALSE, 4); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1320 dw_window_set_size(mdi1w, 200, 100); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1321 dw_window_show(mdi1w); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1322 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1323 mdi2w = dw_window_new(mdi, "MDI2", flStyle | DW_FCF_SIZEBORDER | DW_FCF_MINMAX); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1324 mdi2box = dw_box_new(DW_HORZ, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1325 dw_box_pack_start(mdi2w, mdi2box, 0, 0, TRUE, TRUE, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1326 ef = dw_entryfield_new( "", 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1327 dw_box_pack_start(mdi2box, ef, 150, 30, FALSE, FALSE, 4); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1328 bb = dw_button_new("Browse", 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1329 dw_box_pack_start(mdi2box, bb, 60, 30, FALSE, FALSE, 4); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1330 dw_window_set_size(mdi2w, 200, 200); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1331 dw_window_show(mdi2w); |
620
9876b75d7115
Added menu tests, including checked and disabled menu items.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
606
diff
changeset
|
1332 } |
9876b75d7115
Added menu tests, including checked and disabled menu items.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
606
diff
changeset
|
1333 |
9876b75d7115
Added menu tests, including checked and disabled menu items.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
606
diff
changeset
|
1334 void menu_add(void) |
9876b75d7115
Added menu tests, including checked and disabled menu items.
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
606
diff
changeset
|
1335 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1336 HMENUI menuitem,menu; |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1337 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1338 mainmenubar = dw_menubar_new( mainwindow ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1339 /* add menus to the menubar */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1340 menu = dw_menu_new( 0 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1341 menuitem = dw_menu_append_item( menu, "~Quit", 1019, 0, TRUE, FALSE, 0 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1342 dw_signal_connect( menuitem, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(exit_callback), (void *)mainwindow); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1343 /* |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1344 * Add the "File" menu to the menubar... |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1345 */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1346 dw_menu_append_item( mainmenubar, "~File", 1010, 0, TRUE, FALSE, menu ); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1347 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1348 changeable_menu = dw_menu_new( 0 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1349 checkable_menuitem = dw_menu_append_item( changeable_menu, "~Checkable Menu Item", CHECKABLE_MENUITEMID, 0, TRUE, TRUE, 0 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1350 dw_signal_connect( checkable_menuitem, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(menu_callback), (void *)"checkable"); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1351 noncheckable_menuitem = dw_menu_append_item( changeable_menu, "~Non-checkable Menu Item", NONCHECKABLE_MENUITEMID, 0, TRUE, FALSE, 0 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1352 dw_signal_connect( noncheckable_menuitem, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(menu_callback), (void *)"non-checkable"); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1353 menuitem = dw_menu_append_item( changeable_menu, "~Disabled menu Item", 2003, DW_MIS_DISABLED|DW_MIS_CHECKED, TRUE, TRUE, 0 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1354 /* seperator */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1355 dw_menu_append_item( changeable_menu, DW_MENU_SEPARATOR, 3999, 0, TRUE, FALSE, 0 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1356 menuitem = dw_menu_append_item( changeable_menu, "~Menu Items Disabled", 2009, 0, TRUE, TRUE, 0 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1357 dw_signal_connect( menuitem, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(menutoggle_callback), (void *)NULL); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1358 /* |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1359 * Add the "Menu" menu to the menubar... |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1360 */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1361 dw_menu_append_item( mainmenubar, "~Menu", 1020, 0, TRUE, FALSE, changeable_menu ); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1362 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1363 menu = dw_menu_new( 0 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1364 menuitem = dw_menu_append_item( menu, "~About", 1091, 0, TRUE, FALSE, 0 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1365 dw_signal_connect( menuitem, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(helpabout_callback), (void *)mainwindow); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1366 /* |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1367 * Add the "Help" menu to the menubar... |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1368 */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1369 dw_menu_append_item( mainmenubar, "~Help", 1090, 0, TRUE, FALSE, menu ); |
515
c3c5d8e36aa3
Implemented MDI Window in Window code on GTK 2.x.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
514
diff
changeset
|
1370 } |
c3c5d8e36aa3
Implemented MDI Window in Window code on GTK 2.x.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
514
diff
changeset
|
1371 |
774
bf3e9892146f
Add new notebook page to test scrollbox widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
746
diff
changeset
|
1372 int DWSIGNAL scrollbox_button_callback(HWND window, void *data) |
bf3e9892146f
Add new notebook page to test scrollbox widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
746
diff
changeset
|
1373 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1374 int pos, range; |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1375 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1376 pos = dw_scrollbox_get_pos( scrollbox, DW_VERT ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1377 range = dw_scrollbox_get_range( scrollbox, DW_VERT ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1378 fprintf( stderr, "Pos %d Range %d\n", pos, range ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1379 return 0; |
774
bf3e9892146f
Add new notebook page to test scrollbox widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
746
diff
changeset
|
1380 } |
bf3e9892146f
Add new notebook page to test scrollbox widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
746
diff
changeset
|
1381 |
bf3e9892146f
Add new notebook page to test scrollbox widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
746
diff
changeset
|
1382 void scrollbox_add(void) |
bf3e9892146f
Add new notebook page to test scrollbox widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
746
diff
changeset
|
1383 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1384 HWND tmpbox,abutton1; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1385 char buf[100]; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1386 int i; |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1387 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1388 /* create a box to pack into the notebook page */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1389 scrollbox = dw_scrollbox_new(DW_VERT, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1390 dw_box_pack_start(notebookbox8, scrollbox, 0, 0, TRUE, TRUE, 1); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1391 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1392 abutton1 = dw_button_new( "Show Adjustments", 0 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1393 dw_box_pack_start( scrollbox, abutton1, 100, 30, FALSE, FALSE, 0 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1394 dw_signal_connect( abutton1, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(scrollbox_button_callback), NULL ); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1395 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1396 for ( i = 0; i < MAX_WIDGETS; i++ ) |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1397 { |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1398 tmpbox = dw_box_new( DW_HORZ, 0 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1399 dw_box_pack_start( scrollbox, tmpbox, 0, 24, TRUE, FALSE, 2); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1400 sprintf( buf, "Label %d", i ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1401 labelarray[i] = dw_text_new( buf , 0 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1402 dw_box_pack_start( tmpbox, labelarray[i], 0, 20, TRUE, FALSE, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1403 sprintf( buf, "Entry %d", i ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1404 entryarray[i] = dw_entryfield_new( buf , i ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1405 dw_box_pack_start( tmpbox, entryarray[i], 0, 20, TRUE, FALSE, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1406 } |
774
bf3e9892146f
Add new notebook page to test scrollbox widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
746
diff
changeset
|
1407 } |
bf3e9892146f
Add new notebook page to test scrollbox widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
746
diff
changeset
|
1408 |
1200
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1409 /* Section for thread/event test */ |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1410 HWND threadmle, startbutton; |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1411 HMTX mutex; |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1412 HEV workevent, controlevent; |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1413 int finished = FALSE; |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1414 int ready = 0; |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1415 #define BUF_SIZE 1024 |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1416 void DWSIGNAL run_thread(void *data); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1417 void DWSIGNAL control_thread(void *data); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1418 |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1419 void update_mle(char *text, int lock) |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1420 { |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1421 static unsigned int pos = 0; |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1422 |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1423 /* Protect pos from being changed by different threads */ |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1424 if(lock) |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1425 dw_mutex_lock(mutex); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1426 pos = dw_mle_import(threadmle, text, pos); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1427 dw_mle_set_cursor(threadmle, pos); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1428 if(lock) |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1429 dw_mutex_unlock(mutex); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1430 } |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1431 |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1432 int DWSIGNAL start_threads_button_callback(HWND window, void *data) |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1433 { |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1434 dw_window_disable(startbutton); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1435 dw_mutex_lock(mutex); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1436 controlevent = dw_event_new(); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1437 dw_event_reset(workevent); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1438 finished = FALSE; |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1439 ready = 0; |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1440 update_mle("Starting thread 1\r\n", FALSE); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1441 dw_thread_new(DW_SIGNAL_FUNC(run_thread), DW_INT_TO_POINTER(1), 10000); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1442 update_mle("Starting thread 2\r\n", FALSE); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1443 dw_thread_new(DW_SIGNAL_FUNC(run_thread), DW_INT_TO_POINTER(2), 10000); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1444 update_mle("Starting thread 3\r\n", FALSE); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1445 dw_thread_new(DW_SIGNAL_FUNC(run_thread), DW_INT_TO_POINTER(3), 10000); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1446 update_mle("Starting thread 4\r\n", FALSE); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1447 dw_thread_new(DW_SIGNAL_FUNC(run_thread), DW_INT_TO_POINTER(4), 10000); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1448 update_mle("Starting control thread\r\n", FALSE); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1449 dw_thread_new(DW_SIGNAL_FUNC(control_thread), DW_INT_TO_POINTER(0), 10000); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1450 dw_mutex_unlock(mutex); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1451 return 0; |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1452 } |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1453 |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1454 void thread_add(void) |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1455 { |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1456 HWND tmpbox; |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1457 |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1458 /* create a box to pack into the notebook page */ |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1459 tmpbox = dw_box_new(DW_VERT, 0); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1460 dw_box_pack_start(notebookbox9, tmpbox, 0, 0, TRUE, TRUE, 1); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1461 |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1462 startbutton = dw_button_new( "Start Threads", 0 ); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1463 dw_box_pack_start( tmpbox, startbutton, 100, 30, FALSE, FALSE, 0 ); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1464 dw_signal_connect( startbutton, DW_SIGNAL_CLICKED, DW_SIGNAL_FUNC(start_threads_button_callback), NULL ); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1465 |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1466 /* Create the base threading components */ |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1467 threadmle = dw_mle_new(0); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1468 dw_box_pack_start(tmpbox, threadmle, 1, 1, TRUE, TRUE, 0); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1469 mutex = dw_mutex_new(); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1470 workevent = dw_event_new(); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1471 } |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1472 |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1473 void DWSIGNAL run_thread(void *data) |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1474 { |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1475 int threadnum = DW_POINTER_TO_INT(data); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1476 char buf[BUF_SIZE]; |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1477 |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1478 sprintf(buf, "Thread %d started.\r\n", threadnum); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1479 update_mle(buf, TRUE); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1480 |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1481 /* Increment the ready count while protected by mutex */ |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1482 dw_mutex_lock(mutex); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1483 ready++; |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1484 /* If all 4 threads have incrememted the ready count... |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1485 * Post the control event semaphore so things will get started. |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1486 */ |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1487 if(ready == 4) |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1488 dw_event_post(controlevent); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1489 dw_mutex_unlock(mutex); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1490 |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1491 while(!finished) |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1492 { |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1493 int result = dw_event_wait(workevent, 2000); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1494 |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1495 if(result == DW_ERROR_TIMEOUT) |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1496 { |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1497 sprintf(buf, "Thread %d timeout waiting for event.\r\n", threadnum); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1498 update_mle(buf, TRUE); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1499 } |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1500 else if(result == DW_ERROR_NONE) |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1501 { |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1502 sprintf(buf, "Thread %d doing some work.\r\n", threadnum); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1503 update_mle(buf, TRUE); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1504 /* Pretend to do some work */ |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1505 dw_main_sleep(1000 * threadnum); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1506 |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1507 /* Increment the ready count while protected by mutex */ |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1508 dw_mutex_lock(mutex); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1509 ready++; |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1510 sprintf(buf, "Thread %d work done. ready=%d", threadnum, ready); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1511 /* If all 4 threads have incrememted the ready count... |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1512 * Post the control event semaphore so things will get started. |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1513 */ |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1514 if(ready == 4) |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1515 { |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1516 dw_event_post(controlevent); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1517 strcat(buf, " Control posted."); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1518 } |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1519 dw_mutex_unlock(mutex); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1520 strcat(buf, "\r\n"); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1521 update_mle(buf, TRUE); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1522 } |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1523 else |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1524 { |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1525 sprintf(buf, "Thread %d error %d.\r\n", threadnum, result); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1526 update_mle(buf, TRUE); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1527 dw_main_sleep(10000); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1528 } |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1529 } |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1530 sprintf(buf, "Thread %d finished.\r\n", threadnum); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1531 update_mle(buf, TRUE); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1532 } |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1533 |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1534 void DWSIGNAL control_thread(void *data) |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1535 { |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1536 int inprogress = 5; |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1537 char buf[BUF_SIZE]; |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1538 |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1539 while(inprogress) |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1540 { |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1541 int result = dw_event_wait(controlevent, 2000); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1542 |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1543 if(result == DW_ERROR_TIMEOUT) |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1544 { |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1545 update_mle("Control thread timeout waiting for event.\r\n", TRUE); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1546 } |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1547 else if(result == DW_ERROR_NONE) |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1548 { |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1549 /* Reset the control event */ |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1550 dw_event_reset(controlevent); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1551 ready = 0; |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1552 sprintf(buf,"Control thread starting worker threads. Inprogress=%d\r\n", inprogress); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1553 update_mle(buf, TRUE); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1554 /* Start the work threads */ |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1555 dw_event_post(workevent); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1556 dw_main_sleep(100); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1557 /* Reset the work event */ |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1558 dw_event_reset(workevent); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1559 inprogress--; |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1560 } |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1561 else |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1562 { |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1563 sprintf(buf, "Control thread error %d.\r\n", result); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1564 update_mle(buf, TRUE); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1565 dw_main_sleep(10000); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1566 } |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1567 } |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1568 /* Tell the other threads we are done */ |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1569 finished = TRUE; |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1570 dw_event_post(workevent); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1571 /* Close the control event */ |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1572 dw_event_close(&controlevent); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1573 update_mle("Control thread finished.\r\n", TRUE); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1574 dw_window_enable(startbutton); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1575 } |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1576 |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1577 |
191
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
1578 /* |
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
1579 * Let's demonstrate the functionality of this library. :) |
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
1580 */ |
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
1581 int main(int argc, char *argv[]) |
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
1582 { |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1583 ULONG notebookpage1; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1584 ULONG notebookpage2; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1585 ULONG notebookpage3; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1586 ULONG notebookpage4; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1587 ULONG notebookpage5; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1588 ULONG notebookpage6; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1589 ULONG notebookpage7; |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1590 ULONG notebookpage8; |
1200
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1591 ULONG notebookpage9; |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1592 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1593 dw_init(TRUE, argc, argv); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1594 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1595 mainwindow = dw_window_new( HWND_DESKTOP, "dwindows test", flStyle | DW_FCF_SIZEBORDER | DW_FCF_MINMAX); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1596 dw_window_set_icon(mainwindow, fileicon); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1597 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1598 notebookbox = dw_box_new( BOXVERT, 5 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1599 dw_box_pack_start( mainwindow, notebookbox, 0, 0, TRUE, TRUE, 0); |
1220
67ff39b9577c
Initial implementation of dw_taskbar_* for the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1213
diff
changeset
|
1600 |
67ff39b9577c
Initial implementation of dw_taskbar_* for the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1213
diff
changeset
|
1601 foldericon = dw_icon_load_from_file( FOLDER_ICON_NAME ); |
67ff39b9577c
Initial implementation of dw_taskbar_* for the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1213
diff
changeset
|
1602 fileicon = dw_icon_load_from_file( FILE_ICON_NAME ); |
67ff39b9577c
Initial implementation of dw_taskbar_* for the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1213
diff
changeset
|
1603 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1604 /* MUST pack a box into the mainwindow BEFORE adding menus */ |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1605 menu_add(); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1606 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1607 notebook = dw_notebook_new( 1, TRUE ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1608 dw_box_pack_start( notebookbox, notebook, 100, 100, TRUE, TRUE, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1609 dw_signal_connect(notebook, DW_SIGNAL_SWITCH_PAGE, DW_SIGNAL_FUNC(switch_page_cb), NULL); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1610 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1611 notebookbox1 = dw_box_new( BOXVERT, 5 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1612 notebookpage1 = dw_notebook_page_new( notebook, 0, TRUE ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1613 dw_notebook_pack( notebook, notebookpage1, notebookbox1 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1614 dw_notebook_page_set_text( notebook, notebookpage1, "buttons and entry"); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1615 archive_add(); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1616 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1617 notebookbox2 = dw_box_new( BOXVERT, 5 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1618 notebookpage2 = dw_notebook_page_new( notebook, 1, FALSE ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1619 dw_notebook_pack( notebook, notebookpage2, notebookbox2 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1620 dw_notebook_page_set_text( notebook, notebookpage2, "render"); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1621 text_add(); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1622 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1623 notebookbox3 = dw_box_new( BOXVERT, 5 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1624 notebookpage3 = dw_notebook_page_new( notebook, 1, FALSE ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1625 dw_notebook_pack( notebook, notebookpage3, notebookbox3 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1626 dw_notebook_page_set_text( notebook, notebookpage3, "tree"); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1627 tree_add(); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1628 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1629 notebookbox4 = dw_box_new( BOXVERT, 5 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1630 notebookpage4 = dw_notebook_page_new( notebook, 1, FALSE ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1631 dw_notebook_pack( notebook, notebookpage4, notebookbox4 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1632 dw_notebook_page_set_text( notebook, notebookpage4, "container"); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1633 container_add(); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1634 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1635 notebookbox5 = dw_box_new( BOXVERT, 5 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1636 notebookpage5 = dw_notebook_page_new( notebook, 1, FALSE ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1637 dw_notebook_pack( notebook, notebookpage5, notebookbox5 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1638 dw_notebook_page_set_text( notebook, notebookpage5, "buttons"); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1639 buttons_add(); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1640 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1641 notebookbox6 = dw_box_new( BOXVERT, 5 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1642 notebookpage6 = dw_notebook_page_new( notebook, 1, FALSE ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1643 dw_notebook_pack( notebook, notebookpage6, notebookbox6 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1644 dw_notebook_page_set_text( notebook, notebookpage6, "mdi"); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1645 mdi_add(); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1646 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1647 notebookbox7 = dw_box_new( BOXVERT, 6 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1648 notebookpage7 = dw_notebook_page_new( notebook, 1, FALSE ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1649 dw_notebook_pack( notebook, notebookpage7, notebookbox7 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1650 dw_notebook_page_set_text( notebook, notebookpage7, "html"); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1651 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1652 rawhtml = dw_html_new(1001); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1653 dw_box_pack_start( notebookbox7, rawhtml, 0, 100, TRUE, FALSE, 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1654 dw_html_raw(rawhtml, "<html><body><center><h1>dwtest</h1></center></body></html>"); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1655 html = dw_html_new(1002); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1656 dw_box_pack_start( notebookbox7, html, 0, 100, TRUE, TRUE, 0); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1657 dw_html_url(html, "http://dwindows.netlabs.org"); |
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1658 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1659 notebookbox8 = dw_box_new( BOXVERT, 7 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1660 notebookpage8 = dw_notebook_page_new( notebook, 1, FALSE ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1661 dw_notebook_pack( notebook, notebookpage8, notebookbox8 ); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1662 dw_notebook_page_set_text( notebook, notebookpage8, "scrollbox"); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1663 scrollbox_add(); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1664 |
1200
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1665 notebookbox9 = dw_box_new( BOXVERT, 8 ); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1666 notebookpage9 = dw_notebook_page_new( notebook, 1, FALSE ); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1667 dw_notebook_pack( notebook, notebookpage9, notebookbox9 ); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1668 dw_notebook_page_set_text( notebook, notebookpage9, "thread/event"); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1669 thread_add(); |
88b3f27542b0
Added thread/event tab to the test program.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1190
diff
changeset
|
1670 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1671 dw_signal_connect(mainwindow, DW_SIGNAL_DELETE, DW_SIGNAL_FUNC(exit_callback), (void *)mainwindow); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1672 timerid = dw_timer_connect(2000, DW_SIGNAL_FUNC(timer_callback), 0); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1673 dw_window_set_size(mainwindow, 640, 520); |
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1674 dw_window_show(mainwindow); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1675 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1676 dw_main(); |
1049
b3674ea2909f
Put http://dwindows.netlabs.org back in as test site for HTML widget
mhessling@81767d24-ef19-dc11-ae90-00e081727c95
parents:
1038
diff
changeset
|
1677 |
954
cfb12bf3bb06
Fixes for some more coordinate system issues on the Mac.
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
905
diff
changeset
|
1678 return 0; |
191
634625c3239d
Fixes for dw_color_xxxx_set() to accept OS/2 style colors, and fixed a
bsmith@81767d24-ef19-dc11-ae90-00e081727c95
parents:
diff
changeset
|
1679 } |