1 #include <aros/oldprograms.h>
3 /* Defines for memo gadget position and size */
14 #define DATE_NOTICE_TYPE_Y 2
16 #define MEMO_TEXT_Y 14
18 #include <intuition/intuition.h>
20 struct TextAttr my_font
=
22 "topaz.font", /* Font Name */
23 TOPAZ_EIGHTY
, /* Font Height */
24 FS_NORMAL
, /* Style */
25 FPF_ROMFONT
/* Preferences */
28 /* Values for a 6-letter box: */
42 /* Borders for a 6-letter 3d box: */
43 struct Border border6a_tl
=
45 0, 0, /* LeftEdge, TopEdge */
46 0, 0, JAM1
, /* FrontPen, BackPen, DrawMode */
49 NULL
/* *NextBorder */
51 struct Border border6a_br
=
53 0, 0, /* LeftEdge, TopEdge */
54 0, 0, JAM1
, /* FrontPen, BackPen, DrawMode */
57 &border6a_tl
/* *NextBorder */
59 struct Border border6b_tl
=
61 0, 0, /* LeftEdge, TopEdge */
62 0, 0, JAM1
, /* FrontPen, BackPen, DrawMode */
65 NULL
/* *NextBorder */
67 struct Border border6b_br
=
69 0, 0, /* LeftEdge, TopEdge */
70 0, 0, JAM1
, /* FrontPen, BackPen, DrawMode */
73 &border6b_tl
/* *NextBorder */
76 /* Values for a 60-letter box: */
86 /* A border for a 60-letter box: */
87 struct Border border_text60
=
89 0, 0, /* LeftEdge, TopEdge */
90 1, 2, JAM1
, /* FrontPen, BackPen, DrawMode */
93 NULL
/* *NextBorder */
96 /* Details for box surrounding memo gadgets */
97 SHORT points_big_box
[]=
105 struct Border border_big_box
=
107 -4, -3, /* LeftEdge, TopEdge */
108 1, 2, JAM1
, /* FrontPen, BackPen, DrawMode */
110 points_big_box
, /* *XY */
111 &border_text60
/* *NextBorder */
114 /* Gadgets in window :- data names ID
115 1. " Add " g_add + t_add 6
116 2. "Delete" g_del + t_del 7
117 3. " Edit " g_edi + t_edi 8
118 4. "Check " g_chk + t_chk 9
119 5. "Shrink" g_shr + t_shr 10
120 6. " Help " g_hlp + t_hlp 11
121 7. " |< " (Beginning of list) g_beg + t_beg 12
122 8. " << " (Backwards one block) g_bkb + t_bkb 13
123 9. " < " (Backwards one item) g_bki + t_bki 14
124 10. " > " (Forwards one item) g_fwi + t_fwi 15
125 11. " >> " (Forwards one block) g_fwb + t_fwb 16
126 12. " >| " (End of list) g_eol + t_eol 17
127 plus 6 gadgets for display/selection of memos. (0-5)
129 Data for each gadget headed by *Gnn* marker eg *G01* or *G11* */
131 /* *G01***************************************************************** */
132 /* * Information for the gadget " Add " * */
133 /* ********************************************************************* */
135 struct IntuiText t_add
=
136 { 1, 2, JAM1
, 7,4, &my_font
, " Add ", NULL
};
140 NULL
, /* *NextGadget */
141 40, 182, 61, 15, /* LeftEdge, TopEdge, Width, Height */
142 GADGHIMAGE
, /* Flags */
143 RELVERIFY
, /* Activation */
144 BOOLGADGET
, /* GadgetType */
145 (APTR
)&border6a_br
, /* GadgetRender */
146 (APTR
)&border6b_br
, /* SelectRender */
147 &t_add
, /* *GadgetText */
148 0, /* MutualExclude */
149 NULL
, /* SpecialInfo */
153 /* *G02***************************************************************** */
154 /* * Information for the gadget "Delete" * */
155 /* ********************************************************************* */
157 struct IntuiText t_del
=
158 { 1, 2, JAM1
, 7,4, &my_font
, "Delete", NULL
};
162 &g_add
, /* *NextGadget */
163 140, 182, 61, 15, /* LeftEdge, TopEdge, Width, Height */
164 GADGHIMAGE
, /* Flags */
165 RELVERIFY
, /* Activation */
166 BOOLGADGET
, /* GadgetType */
167 (APTR
)&border6a_br
, /* GadgetRender */
168 (APTR
)&border6b_br
, /* SelectRender */
169 &t_del
, /* *GadgetText */
170 0, /* MutualExclude */
171 NULL
, /* SpecialInfo */
175 /* *G03***************************************************************** */
176 /* * Information for the gadget " Edit " * */
177 /* ********************************************************************* */
179 struct IntuiText t_edi
=
181 1, 2, /* FrontPen, BackPen */
183 7,4, /* LeftEdge, TopEdge */
184 &my_font
, /* *ITextFont, (Topaz, 80) */
185 " Edit ", /* *IText */
191 &g_del
, /* *NextGadget */
192 240, 182, 61, 15, /* LeftEdge, TopEdge, Width, Height */
193 GADGHIMAGE
, /* Flags */
194 RELVERIFY
, /* Activation */
195 BOOLGADGET
, /* GadgetType */
196 (APTR
)&border6a_br
, /* GadgetRender */
197 (APTR
)&border6b_br
, /* SelectRender */
198 &t_edi
, /* *GadgetText */
199 0, /* MutualExclude */
200 NULL
, /* SpecialInfo */
204 /* *G04***************************************************************** */
205 /* * Information for the gadget "Check " * */
206 /* ********************************************************************* */
208 struct IntuiText t_chk
=
210 1, 2, /* FrontPen, BackPen */
212 7,4, /* LeftEdge, TopEdge */
213 &my_font
, /* *ITextFont, (Topaz, 80) */
214 "Check ", /* *IText */
220 &g_edi
, /* *NextGadget */
221 340, 182, 61, 15, /* LeftEdge, TopEdge, Width, Height */
222 GADGHIMAGE
, /* Flags */
223 RELVERIFY
, /* Activation */
224 BOOLGADGET
, /* GadgetType */
225 (APTR
)&border6a_br
, /* GadgetRender */
226 (APTR
)&border6b_br
, /* SelectRender */
227 &t_chk
, /* *GadgetText */
228 0, /* MutualExclude */
229 NULL
, /* SpecialInfo */
233 /* *G05***************************************************************** */
234 /* * Information for the gadget "Shrink" * */
235 /* ********************************************************************* */
237 struct IntuiText t_shr
=
239 1, 2, /* FrontPen, BackPen */
241 7,4, /* LeftEdge, TopEdge */
242 &my_font
, /* *ITextFont, (Topaz, 80) */
243 "Shrink", /* *IText */
249 &g_chk
, /* *NextGadget */
250 440, 182, 61, 15, /* LeftEdge, TopEdge, Width, Height */
251 GADGHIMAGE
, /* Flags */
252 RELVERIFY
, /* Activation */
253 BOOLGADGET
, /* GadgetType */
254 (APTR
)&border6a_br
, /* GadgetRender */
255 (APTR
)&border6b_br
, /* SelectRender */
256 &t_shr
, /* *GadgetText */
257 0, /* MutualExclude */
258 NULL
, /* SpecialInfo */
262 /* *G06***************************************************************** */
263 /* * Information for the gadget " Help " * */
264 /* ********************************************************************* */
266 struct IntuiText t_hlp
=
268 1, 2, /* FrontPen, BackPen */
270 7,4, /* LeftEdge, TopEdge */
271 &my_font
, /* *ITextFont, (Topaz, 80) */
272 " Help ", /* *IText */
278 &g_shr
, /* *NextGadget */
279 540, 182, 61, 15, /* LeftEdge, TopEdge, Width, Height */
280 GADGHCOMP
, /* Flags */
281 RELVERIFY
|TOGGLESELECT
, /* Activation */
282 BOOLGADGET
, /* GadgetType */
283 (APTR
)&border6a_br
, /* GadgetRender */
284 (APTR
)&border6b_br
, /* SelectRender */
285 &t_hlp
, /* *GadgetText */
286 0, /* MutualExclude */
287 NULL
, /* SpecialInfo */
291 /* *G07***************************************************************** */
292 /* * Information for the gadget " |< " * */
293 /* ********************************************************************* */
295 struct IntuiText t_beg
=
297 1, 2, /* FrontPen, BackPen */
299 7,4, /* LeftEdge, TopEdge */
300 &my_font
, /* *ITextFont, (Topaz, 80) */
307 &g_hlp
, /* *NextGadget */
308 40, 166, 61, 15, /* LeftEdge, TopEdge, Width, Height */
309 GADGHIMAGE
, /* Flags */
310 RELVERIFY
, /* Activation */
311 BOOLGADGET
, /* GadgetType */
312 (APTR
)&border6a_br
, /* GadgetRender */
313 (APTR
)&border6b_br
, /* SelectRender */
314 &t_beg
, /* *GadgetText */
315 0, /* MutualExclude */
316 NULL
, /* SpecialInfo */
320 /* *G08***************************************************************** */
321 /* * Information for the gadget " << " * */
322 /* ********************************************************************* */
324 struct IntuiText t_bkb
=
326 1, 2, /* FrontPen, BackPen */
328 7,4, /* LeftEdge, TopEdge */
329 &my_font
, /* *ITextFont, (Topaz, 80) */
336 &g_beg
, /* *NextGadget */
337 140, 166, 61, 15, /* LeftEdge, TopEdge, Width, Height */
338 GADGHIMAGE
, /* Flags */
339 RELVERIFY
, /* Activation */
340 BOOLGADGET
, /* GadgetType */
341 (APTR
)&border6a_br
, /* GadgetRender */
342 (APTR
)&border6b_br
, /* SelectRender */
343 &t_bkb
, /* *GadgetText */
344 0, /* MutualExclude */
345 NULL
, /* SpecialInfo */
349 /* *G09***************************************************************** */
350 /* * Information for the gadget " < " * */
351 /* ********************************************************************* */
353 struct IntuiText t_bki
=
355 1, 2, /* FrontPen, BackPen */
357 7,4, /* LeftEdge, TopEdge */
358 &my_font
, /* *ITextFont, (Topaz, 80) */
365 &g_bkb
, /* *NextGadget */
366 240, 166, 61, 15, /* LeftEdge, TopEdge, Width, Height */
367 GADGHIMAGE
, /* Flags */
368 RELVERIFY
, /* Activation */
369 BOOLGADGET
, /* GadgetType */
370 (APTR
)&border6a_br
, /* GadgetRender */
371 (APTR
)&border6b_br
, /* SelectRender */
372 &t_bki
, /* *GadgetText */
373 0, /* MutualExclude */
374 NULL
, /* SpecialInfo */
378 /* *G10***************************************************************** */
379 /* * Information for the gadget " > " * */
380 /* ********************************************************************* */
382 struct IntuiText t_fwi
=
383 { 1, 2, JAM1
, 7,4, &my_font
, " > ", NULL
};
387 &g_bki
, /* *NextGadget */
388 340, 166, 61, 15, /* LeftEdge, TopEdge, Width, Height */
389 GADGHIMAGE
, /* Flags */
390 RELVERIFY
, /* Activation */
391 BOOLGADGET
, /* GadgetType */
392 (APTR
)&border6a_br
, /* GadgetRender */
393 (APTR
)&border6b_br
, /* SelectRender */
394 &t_fwi
, /* *GadgetText */
395 0, /* MutualExclude */
396 NULL
, /* SpecialInfo */
400 /* *G11***************************************************************** */
401 /* * Information for the gadget " >> " * */
402 /* ********************************************************************* */
404 struct IntuiText t_fwb
=
405 { 1, 2, JAM1
, 7,4, &my_font
, " >> ", NULL
};
409 &g_fwi
, /* *NextGadget */
410 440, 166, 61, 15, /* LeftEdge, TopEdge, Width, Height */
411 GADGHIMAGE
, /* Flags */
412 RELVERIFY
, /* Activation */
413 BOOLGADGET
, /* GadgetType */
414 (APTR
)&border6a_br
, /* GadgetRender */
415 (APTR
)&border6b_br
, /* SelectRender */
416 &t_fwb
, /* *GadgetText */
417 0, /* MutualExclude */
418 NULL
, /* SpecialInfo */
422 /* *G12***************************************************************** */
423 /* * Information for the gadget " >| " * */
424 /* ********************************************************************* */
426 struct IntuiText t_eol
=
427 { 1, 2, JAM1
, 7,4, &my_font
, " >| ", NULL
};
431 &g_fwb
, /* *NextGadget */
432 540, 166, 61, 15, /* LeftEdge, TopEdge, Width, Height */
433 GADGHIMAGE
, /* Flags */
434 RELVERIFY
, /* Activation */
435 BOOLGADGET
, /* GadgetType */
436 (APTR
)&border6a_br
, /* GadgetRender */
437 (APTR
)&border6b_br
, /* SelectRender */
438 &t_eol
, /* *GadgetText */
439 0, /* MutualExclude */
440 NULL
, /* SpecialInfo */
445 struct IntuiText mem_t_line
[6] =
447 { 1,0,JAM2
,5,14,&my_font
,NULL
,NULL
},
448 { 1,0,JAM2
,5,14,&my_font
,NULL
,NULL
},
449 { 1,0,JAM2
,5,14,&my_font
,NULL
,NULL
},
450 { 1,0,JAM2
,5,14,&my_font
,NULL
,NULL
},
451 { 1,0,JAM2
,5,14,&my_font
,NULL
,NULL
},
452 { 1,0,JAM2
,5,14,&my_font
,NULL
,NULL
}
455 struct IntuiText m_gad_type
[6] =
457 { 1,0,JAM2
,350,2,&my_font
,NULL
,&mem_t_line
[0] },
458 { 1,0,JAM2
,350,2,&my_font
,NULL
,&mem_t_line
[1] },
459 { 1,0,JAM2
,350,2,&my_font
,NULL
,&mem_t_line
[2] },
460 { 1,0,JAM2
,350,2,&my_font
,NULL
,&mem_t_line
[3] },
461 { 1,0,JAM2
,350,2,&my_font
,NULL
,&mem_t_line
[4] },
462 { 1,0,JAM2
,350,2,&my_font
,NULL
,&mem_t_line
[5] }
465 struct IntuiText m_gad_notice
[6] =
467 { 1,0,JAM2
,250,2,&my_font
,NULL
,&m_gad_type
[0] },
468 { 1,0,JAM2
,250,2,&my_font
,NULL
,&m_gad_type
[1] },
469 { 1,0,JAM2
,250,2,&my_font
,NULL
,&m_gad_type
[2] },
470 { 1,0,JAM2
,250,2,&my_font
,NULL
,&m_gad_type
[3] },
471 { 1,0,JAM2
,250,2,&my_font
,NULL
,&m_gad_type
[4] },
472 { 1,0,JAM2
,250,2,&my_font
,NULL
,&m_gad_type
[5] }
475 struct IntuiText m_gad_date
[6] =
477 { 1,0,JAM2
,75,2,&my_font
,NULL
,&m_gad_notice
[0] },
478 { 1,0,JAM2
,75,2,&my_font
,NULL
,&m_gad_notice
[1] },
479 { 1,0,JAM2
,75,2,&my_font
,NULL
,&m_gad_notice
[2] },
480 { 1,0,JAM2
,75,2,&my_font
,NULL
,&m_gad_notice
[3] },
481 { 1,0,JAM2
,75,2,&my_font
,NULL
,&m_gad_notice
[4] },
482 { 1,0,JAM2
,75,2,&my_font
,NULL
,&m_gad_notice
[5] }
486 char blank_date_str
[7] = " ";
487 char blank_notice_str
[3] = " ";
488 char blank_type_str
[2] = " ";
489 char blank_memo_str
[61] =
491 struct IntuiText blank_details
[4] =
493 { 1,0,JAM2
,DATE_X
,DATE_NOTICE_TYPE_Y
,&my_font
,blank_date_str
,&blank_details
[1] },
494 { 1,0,JAM2
,NOTICE_X
,DATE_NOTICE_TYPE_Y
,&my_font
,blank_notice_str
,&blank_details
[2] },
495 { 1,0,JAM2
,TYPE_X
,DATE_NOTICE_TYPE_Y
,&my_font
,blank_type_str
,&blank_details
[3] },
496 { 1,0,JAM2
,MEMO_TEXT_X
,MEMO_TEXT_Y
,&my_font
,blank_memo_str
,NULL
}
500 struct Gadget gadget_display
[6]=
503 &gadget_display
[1], /* *NextGadget */
504 M_GAD_X
, M_GAD0_Y
, 600, 23,
505 GADGHNONE
, /* Flags */
506 RELVERIFY
, /* Activation */
507 BOOLGADGET
, /* GadgetType */
508 (APTR
) &border_big_box
, /* GadgetRender */
509 NULL
, /* SelectRender */
510 NULL
, /* *GadgetText */
511 0, /* MutualExclude */
512 NULL
, /* SpecialInfo */
517 &gadget_display
[2], /* *NextGadget */
518 M_GAD_X
, M_GAD1_Y
, 600, 23,
519 GADGHNONE
, /* Flags */
520 RELVERIFY
, /* Activation */
521 BOOLGADGET
, /* GadgetType */
522 (APTR
) &border_text60
, /* GadgetRender */
523 NULL
, /* SelectRender */
524 NULL
, /* *GadgetText */
525 0, /* MutualExclude */
526 NULL
, /* SpecialInfo */
531 &gadget_display
[3], /* *NextGadget */
532 M_GAD_X
, M_GAD2_Y
, 600, 23,
533 GADGHNONE
, /* Flags */
534 RELVERIFY
, /* Activation */
535 BOOLGADGET
, /* GadgetType */
536 (APTR
) &border_text60
, /* GadgetRender */
537 NULL
, /* SelectRender */
538 NULL
, /* *GadgetText */
539 0, /* MutualExclude */
540 NULL
, /* SpecialInfo */
545 &gadget_display
[4], /* *NextGadget */
546 M_GAD_X
, M_GAD3_Y
, 600, 23,
547 GADGHNONE
, /* Flags */
548 RELVERIFY
, /* Activation */
549 BOOLGADGET
, /* GadgetType */
550 (APTR
) &border_text60
, /* GadgetRender */
551 NULL
, /* SelectRender */
552 NULL
, /* *GadgetText */
553 0, /* MutualExclude */
554 NULL
, /* SpecialInfo */
559 &gadget_display
[5], /* *NextGadget */
560 M_GAD_X
, M_GAD4_Y
, 600, 23,
561 GADGHNONE
, /* Flags */
562 RELVERIFY
, /* Activation */
563 BOOLGADGET
, /* GadgetType */
564 (APTR
) &border_text60
, /* GadgetRender */
565 NULL
, /* SelectRender */
566 NULL
, /* *GadgetText */
567 0, /* MutualExclude */
568 NULL
, /* SpecialInfo */
573 &g_eol
, /* *NextGadget */
574 M_GAD_X
, M_GAD5_Y
, 600, 23,
575 GADGHNONE
, /* Flags */
576 RELVERIFY
, /* Activation */
577 BOOLGADGET
, /* GadgetType */
578 (APTR
) &border_text60
, /* GadgetRender */
579 NULL
, /* SelectRender */
580 NULL
, /* *GadgetText */
581 0, /* MutualExclude */
582 NULL
, /* SpecialInfo */
589 /* *********************************************************************
590 * Structure for the main window now in function MainWindow() in mm2.c
591 * ********************************************************************* */
593 char *Help_Intro
[]= {
597 " Click on gadgets to display specific help information. ",
599 " Click on HELP again to return to normal operation.",