forked from DrCoolzic/BIG2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBIG2USR2.C
522 lines (483 loc) · 19.1 KB
/
BIG2USR2.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
/*! @file BIG2USR2.C
@brief implementation of functions for userdef objects
@verbatim
BIG = "BIG Is GEM" - A high level GEM library.
Initial Development by Claude ATTARD, Maintenance by Jean LOUIS-GUERIN
Copyright (c) 1993-2014 Claude ATTARD
Copyright (c) 2010-2014 Jean LOUIS-GUERIN
website: http://info-coach.fr/atari/software/projects/big.php
forum: http://www.atari-forum.com/viewtopic.php?f=16&t=27060
The BIG library may be used and distributed without restriction provided that
this copyright statement is not removed from the file and that any derivative
work contains the original copyright notice and the associated disclaimer.
The BIG library is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3 of the License, or (at your option) any
later version.
The BIG library is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
HxCFloppyEmulator; if not, write to the Free Software Foundation, Inc., 51
Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@endverbatim
*/
#include "big2.h"
#include "BIG2USR2.H"
/* #[ Look par d‚faut des fenˆtres BIG : */
Win_user bwin = {MD_TRANS, /* Mode texte MOVER */
BLACK, /* Couleur texte MOVER */
2, /* Style trame MOVER */
BLACK, /* Couleur trame MOVER */
BLACK, /* Couleur texte INFO */
1, /* Style trame VELEV */
BLACK, /* Couleur trame VELEV */
1, /* Style trame HELEV */
BLACK, /* Couleur trame HELEV */
1, /* Style trame VSLIDE */
WHITE, /* Couleur trame VSLIDE */
1, /* Style trame HSLIDE */
WHITE, /* Couleur trame HSLIDE */
WHITE, /* Couleur fond gadgets */
BLACK}; /* Couleur ic“ne gadgets */
/* #] Look par d‚faut des fenˆtres BIG : */
/* #[ fond () Routine dessin racine fenˆtre : */
int cdecl fond (PARMBLK *para)
{
int tab[4], rec[4];
fill_tab (tab, 4,
para->pb_xc, para->pb_yc,
para->pb_wc + para->pb_xc - 1, para->pb_hc + para->pb_yc - 1);
vs_clip (work_display.handle, TRUE, tab); /* Clipper */
vswr_mode (work_display.handle, MD_REPLACE); /* Dessin en mode Remplacement */
vsf_interior (work_display.handle, FIS_HOLLOW); /* Fond blanc */
vsf_color (work_display.handle, WHITE);
vsf_perimeter (work_display.handle, FALSE); /* Ne pas dessiner le p‚rimŠtre */
fill_tab (rec, 4,
para->pb_x, para->pb_y,
para->pb_x + para->pb_w - 1,
para->pb_y + para->pb_h - 1);
v_bar (work_display.handle, rec); /* Tracer le rectangle blanc */
vs_clip (work_display.handle, FALSE, tab); /* D‚clipper */
return ZERO;
}
/* #] fond () Routine dessin racine fenˆtre : */
/* #[ gadget () Routine dessin objets USERDEFs : */
int cdecl gadget (PARMBLK *para)
{
int tab[4], rec[8], color[2], obj, h, dummy;
MFDB nul = {0}, pic, msk;
fill_tab (tab, 4,
para->pb_xc, para->pb_yc,
para->pb_wc + para->pb_xc - 1, para->pb_hc + para->pb_yc - 1);
vs_clip (work_display.handle, TRUE, tab); /* Clipper */
vswr_mode (work_display.handle, MD_REPLACE); /* Dessin en mode Remplacement */
vsf_interior (work_display.handle, FIS_PATTERN); /* Fond tram‚ */
vsf_style (work_display.handle, 8); /* Trame 100 % */
vsf_color (work_display.handle, bwin.cpat_gadgt); /* Couleur fond */
vsf_perimeter (work_display.handle, FALSE); /* Ne pas dessiner le p‚rimŠtre */
fill_tab (rec, 4,
para->pb_x, para->pb_y,
para->pb_x + para->pb_w - 1,
para->pb_y + para->pb_h - 1);
v_bar (work_display.handle, rec); /* Tracer le rectangle */
vswr_mode (work_display.handle, MD_TRANS);
vsf_interior (work_display.handle, FIS_HOLLOW); /* Fond blanc */
vsf_color (work_display.handle, BLACK);
vsf_perimeter (work_display.handle, TRUE); /* Dessiner le p‚rimŠtre */
v_bar (work_display.handle, rec); /* Tracer le rectangle */
vswr_mode (work_display.handle, MD_REPLACE); /* Dessin en mode Remplacement */
vst_height (work_display.handle, work_display.hc, &dummy, &dummy, &dummy, &h); /* BoŒtes caractŠres */
switch (para->pb_obj) /* Selon le gadget */
{ /* Choisir la bonne G_IMAGE */
case BW_SIZERUL :
obj = h > 8 ? GA_SULH : GA_SULM;
break;
case BW_CLOSER :
obj = h > 8 ? GA_CLOH : GA_CLOM;
break;
case BW_SMALLER :
obj = h > 8 ? GA_SMAH : GA_SMAM;
break;
case BW_CYCLER :
obj = h > 8 ? GA_CYCH : GA_CYCM;
break;
case BW_FULLER :
obj = h > 8 ? GA_FULH : GA_FULM;
break;
case BW_SIZERUR :
obj = h > 8 ? GA_SURH : GA_SURM;
break;
case BW_UPARROW :
obj = h > 8 ? GA_AUPH : GA_AUPM;
break;
case BW_DNARROW :
obj = h > 8 ? GA_ADNH : GA_ADNM;
break;
case BW_SIZERDL :
obj = h > 8 ? GA_SDLH : GA_SDLM;
break;
case BW_LFARROW :
obj = h > 8 ? GA_ALFH : GA_ALFM;
break;
case BW_RTARROW :
obj = h > 8 ? GA_ARTH : GA_ARTM;
break;
case BW_SIZERDR :
obj = h > 8 ? GA_SDRH : GA_SDRM;
break;
}
pic.fd_addr = (void *) bi_trindex[GADGETS][obj].ob_spec.iconblk->ib_pdata; /* Adresse datas */
msk.fd_addr = (void *) bi_trindex[GADGETS][obj].ob_spec.iconblk->ib_pmask; /* Adresse masque */
pic.fd_w = msk.fd_w = 16; /* Largeur image */
if (h > 8)
pic.fd_h = msk.fd_h = 16; /* Hauteur image selon r‚solution */
else
pic.fd_h = msk.fd_h = 8;
pic.fd_wdwidth = msk.fd_wdwidth = 1; /* Largeur en mots */
pic.fd_nplanes = msk.fd_nplanes = 1; /* Nbre de plans */
pic.fd_stand = msk.fd_stand = ZERO; /* SystŠme coordonn‚es */
fill_tab (rec, 8, /* Tableau des coordonn‚es */
ZERO, ZERO, pic.fd_w - 1, pic.fd_h - 1,
para->pb_x + 2, para->pb_y + 2,
para->pb_x + pic.fd_w + 1,
para->pb_y + pic.fd_h + 1);
if (para->pb_currstate & SELECTED)
{
rec[4]++;
rec[5]++;
rec[6]++;
rec[7]++;
}
color[0] = WHITE;
color[1] = WHITE;
vrt_cpyfm (work_display.handle, MD_TRANS, rec, &msk, &nul, color);
color[0] = bwin.cicn_gadgt;
vrt_cpyfm (work_display.handle, MD_TRANS, rec, &pic, &nul, color);
vsl_width (work_display.handle, 1);
vsl_ends (work_display.handle, SQUARE, SQUARE);
vsl_type (work_display.handle, SOLID);
vsl_color (work_display.handle, BLACK);
if (para->pb_currstate & SELECTED)
fill_tab (rec, 6, /* Coordonn‚es lignes d'ombre */
para->pb_x + 1, para->pb_y + para->pb_h - 3,
para->pb_x + 1, para->pb_y + 1,
para->pb_x + para->pb_w - 3, para->pb_y + 1);
else
fill_tab (rec, 6, /* Coordonn‚es lignes d'ombre */
para->pb_x + para->pb_w - 2, para->pb_y + 2,
para->pb_x + para->pb_w - 2, para->pb_y + para->pb_h - 2,
para->pb_x + 2, para->pb_y + para->pb_h - 2);
v_pline (work_display.handle, 3, rec); /* Tracer lignes d'ombre */
vs_clip (work_display.handle, FALSE, tab); /* D‚clipper */
return ZERO;
}
/* #] gadget () Routine dessin objets USERDEFs : */
/* #[ titinf () Routine dessin Titre et Info : */
int cdecl titinf (PARMBLK *para)
{
int tab[4], rec[6], x, y, wcell, hcell, dummy, i = ZERO, index = BLANK;
char *texte;
fill_tab (tab, 4,
para->pb_xc, para->pb_yc,
para->pb_wc + para->pb_xc - 1, para->pb_hc + para->pb_yc - 1);
vs_clip (work_display.handle, TRUE, tab); /* Clipper */
do
{
if (win[i].w_fen == para->pb_tree)
index = i;
} while ((NOT (win[i++].w_flags & WFLAST)) && (index == BLANK));
vswr_mode (work_display.handle, MD_REPLACE); /* Dessin en mode Remplacement */
if (para->pb_obj == BW_INFO) /* Si ligne d'info */
{
vsf_interior (work_display.handle, FIS_HOLLOW); /* Fond blanc */
vsf_color (work_display.handle, BLACK); /* Couleur trame et p‚rimŠtre */
vsf_perimeter (work_display.handle, TRUE); /* Dessiner le p‚rimŠtre */
}
else if (para->pb_obj == BW_MOVER) /* Si barre de titre */
{
if (para->pb_tree == win[id_top].w_fen) /* Si fenˆtre 1ø plan */
{
vsf_interior (work_display.handle, FIS_PATTERN); /* Trame */
vsf_style (work_display.handle, bwin.spat_mover); /* Motif de trame */
vsf_color (work_display.handle, bwin.cpat_mover); /* Couleur trame */
vsf_perimeter (work_display.handle, TRUE); /* Dessiner le p‚rimŠtre */
}
else /* Si pas fenˆtre 1ø plan */
{
vsf_interior (work_display.handle, FIS_HOLLOW); /* Fond blanc */
vsf_color (work_display.handle, BLACK); /* Couleur trame et p‚rimŠtre */
vsf_perimeter (work_display.handle, TRUE); /* Dessiner le p‚rimŠtre */
}
}
fill_tab (rec, 4, /* Coordonn‚es rectangle */
para->pb_x, para->pb_y,
para->pb_x + para->pb_w - 1,
para->pb_y + para->pb_h - 1);
v_bar (work_display.handle, rec); /* Tracer rectangle */
if (para->pb_obj == BW_MOVER)
{
texte = (char *)malloc (strlen (win[index].w_title) + 1);
strcpy (texte, win[index].w_title); /* Copier le texte */
}
else
{
texte = (char *)malloc (strlen (win[index].w_infos) + 1);
strcpy (texte, win[index].w_infos); /* Copier le texte */
}
if (strlen (texte))
{
vst_effects (work_display.handle, EFNONE); /* D‚sactiver tous les effets */
if (para->pb_obj == BW_INFO) /* Si ligne d'info */
{
vst_color (work_display.handle, bwin.ctxt_info); /* Couleur texte */
vswr_mode (work_display.handle, MD_REPLACE);
vst_alignment (work_display.handle, HLEFT, VTOP, &dummy, &dummy); /* Caler … gauche */
x = para->pb_x + 8; /* Sauter un caractŠre */
y = para->pb_y + 1; /* Position en y */
}
else /* Si barre de titre */
{
vst_color (work_display.handle, bwin.ctxt_mover); /* Couleur texte */
vswr_mode (work_display.handle, bwin.mtxt_mover); /* Mode ‚criture */
vst_height (work_display.handle, work_display.hc, &dummy, &dummy, &wcell, &hcell);
if (win[index].w_icon > BLANK)
{
if (hcell > 8)
vst_height (work_display.handle, HPETIT, &dummy, &dummy, &wcell, &hcell); /* Taille caractŠres */
else
vst_height (work_display.handle, HMINUS, &dummy, &dummy, &wcell, &hcell); /* Taille caractŠres */
}
if (strlen ((char *)texte) * wcell <= para->pb_w) /* S'il y a la place */
{
vst_alignment (work_display.handle, HCENT, VTOP, &dummy, &dummy); /* Centrer le texte */
x = para->pb_x + (para->pb_w / 2);
}
else /* Si pas la place */
{
texte[para->pb_w / wcell] = '\0'; /* Couper le texte */
vst_alignment (work_display.handle, HLEFT, VTOP, &dummy, &dummy); /* Caler … gauche */
x = para->pb_x;
}
y = para->pb_y + ((para->pb_h - hcell) / 2);
if (para->pb_currstate & SELECTED)
{
x++;
y++;
}
}
v_gtext (work_display.handle, x, y, texte); /* Ecrire le texte */
free (texte); /* Lib‚rer m‚moire texte */
}
if (para->pb_obj == BW_MOVER) /* Si barre de titre */
{
vswr_mode (work_display.handle, MD_REPLACE);
vsl_width (work_display.handle, 1); /* Pr‚parer lignes d'ombre */
vsl_ends (work_display.handle, SQUARE, SQUARE);
vsl_type (work_display.handle, SOLID);
if (para->pb_tree == win[id_top].w_fen) /* Si fenˆtre 1ø plan */
vsl_color (work_display.handle, bwin.cpat_mover);
else
vsl_color (work_display.handle, BLACK);
if (para->pb_currstate & SELECTED)
fill_tab (rec, 6, /* Coordonn‚es lignes d'ombre */
para->pb_x + 1, para->pb_y + para->pb_h - 3,
para->pb_x + 1, para->pb_y + 1,
para->pb_x + para->pb_w - 3, para->pb_y + 1);
else
fill_tab (rec, 6, /* Coordonn‚es lignes d'ombre */
para->pb_x + para->pb_w - 2, para->pb_y + 2,
para->pb_x + para->pb_w - 2, para->pb_y + para->pb_h - 2,
para->pb_x + 2, para->pb_y + para->pb_h - 2);
v_pline (work_display.handle, 3, rec); /* Lignes d'ombre */
}
vs_clip (work_display.handle, FALSE, tab); /* D‚clipper */
return ZERO;
}
/* #] titinf () Routine dessin Titre et Info : */
/* #[ elev () Routine dessin ascenseurs : */
int cdecl elev (PARMBLK *para)
{
int tab[4], rec[4];
fill_tab (tab, 4,
para->pb_xc, para->pb_yc,
para->pb_wc + para->pb_xc - 1, para->pb_hc + para->pb_yc - 1);
vs_clip (work_display.handle, TRUE, tab); /* Clipper */
vswr_mode (work_display.handle, MD_REPLACE); /* Dessin en mode Remplacement */
vsf_interior (work_display.handle, FIS_PATTERN); /* Fond tram‚ */
if (para->pb_obj == BW_VELEV)
{
vsf_style (work_display.handle, bwin.spat_velev); /* Motif trame */
vsf_color (work_display.handle, bwin.cpat_velev); /* Couleur trame */
}
else if (para->pb_obj == BW_HELEV)
{
vsf_style (work_display.handle, bwin.spat_helev); /* Motif trame */
vsf_color (work_display.handle, bwin.cpat_helev); /* Couleur trame */
}
vsf_perimeter (work_display.handle, TRUE); /* Dessiner le p‚rimŠtre */
fill_tab (rec, 4, /* Coordonn‚es rectangle */
para->pb_x, para->pb_y,
para->pb_x + para->pb_w - 1,
para->pb_y + para->pb_h - 1);
v_bar (work_display.handle, rec); /* Tracer rectangle */
vswr_mode (work_display.handle, MD_TRANS);
vsf_interior (work_display.handle, FIS_HOLLOW); /* Fond blanc */
vsf_color (work_display.handle, BLACK);
v_bar (work_display.handle, rec); /* Tracer le rectangle */
vs_clip (work_display.handle, FALSE, tab); /* D‚clipper */
return ZERO;
}
/* #] elev () Routine dessin ascenseurs : */
/* #[ sld () Routine dessin sliders : */
int cdecl sld (PARMBLK *para)
{
int tab[4], rec[8], color[2], h, dummy;
MFDB nul = {0}, pic, msk;
fill_tab (tab, 4,
para->pb_xc, para->pb_yc,
para->pb_wc + para->pb_xc - 1, para->pb_hc + para->pb_yc - 1);
vs_clip (work_display.handle, TRUE, tab); /* Clipper */
vswr_mode (work_display.handle, MD_REPLACE); /* Dessin en mode Remplacement */
if (para->pb_obj == BW_VSLIDE)
{
if (bwin.cpat_vslid == WHITE)
{
vsf_interior (work_display.handle, FIS_HOLLOW); /* Fond blanc */
vsf_color (work_display.handle, BLACK); /* Couleur p‚rimŠtre */
}
else
{
vsf_interior (work_display.handle, FIS_PATTERN); /* Fond tram‚ */
vsf_style (work_display.handle, bwin.spat_vslid); /* Motif trame */
vsf_color (work_display.handle, bwin.cpat_vslid); /* Couleur trame */
}
}
else if (para->pb_obj == BW_HSLIDE)
{
if (bwin.cpat_hslid == WHITE)
{
vsf_interior (work_display.handle, FIS_HOLLOW); /* Fond blanc */
vsf_color (work_display.handle, BLACK); /* Couleur p‚rimŠtre */
}
else
{
vsf_interior (work_display.handle, FIS_PATTERN); /* Fond tram‚ */
vsf_style (work_display.handle, bwin.spat_hslid); /* Motif trame */
vsf_color (work_display.handle, bwin.cpat_hslid); /* Couleur trame */
}
}
vsf_perimeter (work_display.handle, TRUE); /* Dessiner le p‚rimŠtre */
fill_tab (rec, 4, /* Coordonn‚es rectangle */
para->pb_x, para->pb_y,
para->pb_x + para->pb_w - 1,
para->pb_y + para->pb_h - 1);
v_bar (work_display.handle, rec); /* Tracer rectangle */
vswr_mode (work_display.handle, MD_TRANS);
vsf_interior (work_display.handle, FIS_HOLLOW); /* Fond blanc */
vsf_color (work_display.handle, BLACK);
vsf_perimeter (work_display.handle, TRUE); /* Dessiner le p‚rimŠtre */
v_bar (work_display.handle, rec); /* Tracer le rectangle */
vsl_width (work_display.handle, 1);
vsl_ends (work_display.handle, SQUARE, SQUARE);
vsl_type (work_display.handle, SOLID);
if (para->pb_currstate & SELECTED)
fill_tab (rec, 6, /* Coordonn‚es lignes d'ombre */
para->pb_x + 1, para->pb_y + para->pb_h - 3,
para->pb_x + 1, para->pb_y + 1,
para->pb_x + para->pb_w - 3, para->pb_y + 1);
else
fill_tab (rec, 6, /* Coordonn‚es lignes d'ombre */
para->pb_x + para->pb_w - 2, para->pb_y + 2,
para->pb_x + para->pb_w - 2, para->pb_y + para->pb_h - 2,
para->pb_x + 2, para->pb_y + para->pb_h - 2);
v_pline (work_display.handle, 3, rec); /* Tracer lignes d'ombre */
vst_height (work_display.handle, work_display.hc, &dummy, &dummy, &dummy, &h); /* BoŒtes caractŠres */
if (para->pb_obj == BW_VSLIDE) /* Adresse datas */
{
if (h > 8)
{
pic.fd_addr = (void *) bi_trindex[GADGETS][GA_SLVH].ob_spec.iconblk->ib_pdata;
msk.fd_addr = (void *) bi_trindex[GADGETS][GA_SLVH].ob_spec.iconblk->ib_pmask;
}
else
{
pic.fd_addr = (void *) bi_trindex[GADGETS][GA_SLVM].ob_spec.iconblk->ib_pdata;
msk.fd_addr = (void *) bi_trindex[GADGETS][GA_SLVM].ob_spec.iconblk->ib_pmask;
}
}
else
{
if (h > 8)
{
pic.fd_addr = (void *) bi_trindex[GADGETS][GA_SLHH].ob_spec.iconblk->ib_pdata;
msk.fd_addr = (void *) bi_trindex[GADGETS][GA_SLHH].ob_spec.iconblk->ib_pmask;
}
else
{
pic.fd_addr = (void *) bi_trindex[GADGETS][GA_SLHM].ob_spec.iconblk->ib_pdata;
msk.fd_addr = (void *) bi_trindex[GADGETS][GA_SLHM].ob_spec.iconblk->ib_pmask;
}
}
pic.fd_w = msk.fd_w = 16; /* Largeur image */
if (h > 8)
pic.fd_h = msk.fd_h = 16; /* Hauteur image selon r‚solution */
else
pic.fd_h = msk.fd_h = 8;
pic.fd_wdwidth = msk.fd_wdwidth = 1; /* Largeur en motes */
pic.fd_nplanes = msk.fd_nplanes = 1; /* Nbre de plans */
pic.fd_stand = msk.fd_stand = ZERO; /* SystŠme coordonn‚es */
fill_tab (rec, 8, /* Tableau des coordonn‚es */
ZERO, ZERO, pic.fd_w - 1, pic.fd_h - 1,
para->pb_x + (para->pb_w / 2) - (pic.fd_w / 2),
para->pb_y + (para->pb_h / 2) - (pic.fd_h / 2),
para->pb_x + (para->pb_w / 2) - (pic.fd_w / 2) + pic.fd_w - 1,
para->pb_y + (para->pb_h / 2) - (pic.fd_h / 2) + pic.fd_h - 1);
if (para->pb_currstate & SELECTED)
{
rec[4]++;
rec[5]++;
rec[6]++;
rec[7]++;
}
color[0] = WHITE;
color[1] = WHITE;
vrt_cpyfm (work_display.handle, MD_TRANS, rec, &msk, &nul, color);
color[0] = bwin.cicn_gadgt;
vrt_cpyfm (work_display.handle, MD_TRANS, rec, &pic, &nul, color);
vs_clip (work_display.handle, FALSE, tab); /* D‚clipper */
return ZERO;
}
/* #] sld () Routine dessin sliders : */
/* #[ work () Routine dessin zone de travail : */
int cdecl work (PARMBLK *para)
{
int tab[4], rec[4];
fill_tab (tab, 4,
para->pb_xc, para->pb_yc,
para->pb_wc + para->pb_xc - 1, para->pb_hc + para->pb_yc - 1);
vs_clip (work_display.handle, TRUE, tab); /* Clipper */
vswr_mode (work_display.handle, MD_REPLACE); /* Dessin en mode Remplacement */
if (NOT (para->pb_tree[para->pb_obj].ob_state & 0x0F00))
{
vsf_interior (work_display.handle, FIS_HOLLOW); /* Fond couleur 0 */
vsf_color (work_display.handle, WHITE); /* Couleur trame */
}
else
{
vsf_interior (work_display.handle, FIS_PATTERN); /* Trame */
vsf_style (work_display.handle, /* Motif de trame */
((para->pb_tree[para->pb_obj].ob_state & 0xF000) >> 12));
vsf_color (work_display.handle, /* Couleur trame */
((para->pb_tree[para->pb_obj].ob_state & 0x0F00) >> 8));
}
vsf_perimeter (work_display.handle, FALSE); /* Ne pas dessiner le p‚rimŠtre */
fill_tab (rec, 4, /* Coordonn‚es rectangle */
para->pb_x + 1, para->pb_y + 1,
para->pb_x + para->pb_w - 2,
para->pb_y + para->pb_h - 2);
v_bar (work_display.handle, rec); /* Tracer rectangle */
vs_clip (work_display.handle, FALSE, tab); /* D‚clipper */
return ZERO;
}
/* #] work () Routine dessin zone de travail : */