don't try to link with ssl when testing for connect (unnecessary)
[AROS-Contrib.git] / fish / memomaster / main_win.c
blob226f82e82530bd46d34c56a3cc40260f4610c252
1 #include <aros/oldprograms.h>
3 /* Defines for memo gadget position and size */
4 #define M_GAD_X 18
5 #define M_GAD0_Y 14
6 #define M_GAD1_Y 38
7 #define M_GAD2_Y 62
8 #define M_GAD3_Y 86
9 #define M_GAD4_Y 110
10 #define M_GAD5_Y 134
11 #define DATE_X 75
12 #define NOTICE_X 250
13 #define TYPE_X 350
14 #define DATE_NOTICE_TYPE_Y 2
15 #define MEMO_TEXT_X 5
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: */
29 SHORT pts6_tl[]=
31 -1, 14,
32 -1, -1,
33 60, -1
35 SHORT pts6_br[]=
37 60, -1,
38 60, 14,
39 -1, 14
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 */
47 3, /* Count */
48 pts6_tl, /* *XY */
49 NULL /* *NextBorder */
51 struct Border border6a_br=
53 0, 0, /* LeftEdge, TopEdge */
54 0, 0, JAM1, /* FrontPen, BackPen, DrawMode */
55 3, /* Count */
56 pts6_br, /* *XY */
57 &border6a_tl /* *NextBorder */
59 struct Border border6b_tl=
61 0, 0, /* LeftEdge, TopEdge */
62 0, 0, JAM1, /* FrontPen, BackPen, DrawMode */
63 3, /* Count */
64 pts6_tl, /* *XY */
65 NULL /* *NextBorder */
67 struct Border border6b_br=
69 0, 0, /* LeftEdge, TopEdge */
70 0, 0, JAM1, /* FrontPen, BackPen, DrawMode */
71 3, /* Count */
72 pts6_br, /* *XY */
73 &border6b_tl /* *NextBorder */
76 /* Values for a 60-letter box: */
77 SHORT points60[]=
79 0, 0,
80 599, 0,
81 599, 22,
82 0, 22,
83 0, 0
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 */
91 5, /* Count */
92 points60, /* *XY */
93 NULL /* *NextBorder */
96 /* Details for box surrounding memo gadgets */
97 SHORT points_big_box[]=
99 0, 0,
100 608, 0,
101 608, 149,
102 0, 149,
103 0, 0
105 struct Border border_big_box=
107 -4, -3, /* LeftEdge, TopEdge */
108 1, 2, JAM1, /* FrontPen, BackPen, DrawMode */
109 5, /* Count */
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 };
138 struct Gadget g_add=
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 */
150 6, /* GadgetID */
151 NULL /* UserData */
153 /* *G02***************************************************************** */
154 /* * Information for the gadget "Delete" * */
155 /* ********************************************************************* */
157 struct IntuiText t_del=
158 { 1, 2, JAM1, 7,4, &my_font, "Delete", NULL };
160 struct Gadget g_del=
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 */
172 7, /* GadgetID */
173 NULL /* UserData */
175 /* *G03***************************************************************** */
176 /* * Information for the gadget " Edit " * */
177 /* ********************************************************************* */
179 struct IntuiText t_edi=
181 1, 2, /* FrontPen, BackPen */
182 JAM1, /* DrawMode */
183 7,4, /* LeftEdge, TopEdge */
184 &my_font, /* *ITextFont, (Topaz, 80) */
185 " Edit ", /* *IText */
186 NULL /* *NextText */
189 struct Gadget g_edi=
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 */
201 8, /* GadgetID */
202 NULL /* UserData */
204 /* *G04***************************************************************** */
205 /* * Information for the gadget "Check " * */
206 /* ********************************************************************* */
208 struct IntuiText t_chk=
210 1, 2, /* FrontPen, BackPen */
211 JAM1, /* DrawMode */
212 7,4, /* LeftEdge, TopEdge */
213 &my_font, /* *ITextFont, (Topaz, 80) */
214 "Check ", /* *IText */
215 NULL /* *NextText */
218 struct Gadget g_chk=
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 */
230 9, /* GadgetID */
231 NULL /* UserData */
233 /* *G05***************************************************************** */
234 /* * Information for the gadget "Shrink" * */
235 /* ********************************************************************* */
237 struct IntuiText t_shr=
239 1, 2, /* FrontPen, BackPen */
240 JAM1, /* DrawMode */
241 7,4, /* LeftEdge, TopEdge */
242 &my_font, /* *ITextFont, (Topaz, 80) */
243 "Shrink", /* *IText */
244 NULL /* *NextText */
247 struct Gadget g_shr=
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 */
259 10, /* GadgetID */
260 NULL /* UserData */
262 /* *G06***************************************************************** */
263 /* * Information for the gadget " Help " * */
264 /* ********************************************************************* */
266 struct IntuiText t_hlp=
268 1, 2, /* FrontPen, BackPen */
269 JAM1, /* DrawMode */
270 7,4, /* LeftEdge, TopEdge */
271 &my_font, /* *ITextFont, (Topaz, 80) */
272 " Help ", /* *IText */
273 NULL /* *NextText */
276 struct Gadget g_hlp=
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 */
288 11, /* GadgetID */
289 NULL /* UserData */
291 /* *G07***************************************************************** */
292 /* * Information for the gadget " |< " * */
293 /* ********************************************************************* */
295 struct IntuiText t_beg=
297 1, 2, /* FrontPen, BackPen */
298 JAM1, /* DrawMode */
299 7,4, /* LeftEdge, TopEdge */
300 &my_font, /* *ITextFont, (Topaz, 80) */
301 " |< ", /* *IText */
302 NULL /* *NextText */
305 struct Gadget g_beg=
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 */
317 12, /* GadgetID */
318 NULL /* UserData */
320 /* *G08***************************************************************** */
321 /* * Information for the gadget " << " * */
322 /* ********************************************************************* */
324 struct IntuiText t_bkb=
326 1, 2, /* FrontPen, BackPen */
327 JAM1, /* DrawMode */
328 7,4, /* LeftEdge, TopEdge */
329 &my_font, /* *ITextFont, (Topaz, 80) */
330 " << ", /* *IText */
331 NULL /* *NextText */
334 struct Gadget g_bkb=
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 */
346 13, /* GadgetID */
347 NULL /* UserData */
349 /* *G09***************************************************************** */
350 /* * Information for the gadget " < " * */
351 /* ********************************************************************* */
353 struct IntuiText t_bki=
355 1, 2, /* FrontPen, BackPen */
356 JAM1, /* DrawMode */
357 7,4, /* LeftEdge, TopEdge */
358 &my_font, /* *ITextFont, (Topaz, 80) */
359 " < ", /* *IText */
360 NULL /* *NextText */
363 struct Gadget g_bki=
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 */
375 14, /* GadgetID */
376 NULL /* UserData */
378 /* *G10***************************************************************** */
379 /* * Information for the gadget " > " * */
380 /* ********************************************************************* */
382 struct IntuiText t_fwi=
383 { 1, 2, JAM1, 7,4, &my_font, " > ", NULL };
385 struct Gadget g_fwi=
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 */
397 15, /* GadgetID */
398 NULL /* UserData */
400 /* *G11***************************************************************** */
401 /* * Information for the gadget " >> " * */
402 /* ********************************************************************* */
404 struct IntuiText t_fwb=
405 { 1, 2, JAM1, 7,4, &my_font, " >> ", NULL };
407 struct Gadget g_fwb=
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 */
419 16, /* GadgetID */
420 NULL /* UserData */
422 /* *G12***************************************************************** */
423 /* * Information for the gadget " >| " * */
424 /* ********************************************************************* */
426 struct IntuiText t_eol=
427 { 1, 2, JAM1, 7,4, &my_font, " >| ", NULL };
429 struct Gadget g_eol=
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 */
441 17, /* GadgetID */
442 NULL /* UserData */
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] =
490 " ";
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 */
513 0, /* GadgetID */
514 NULL /* UserData */
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 */
527 1, /* GadgetID */
528 NULL /* UserData */
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 */
541 2, /* GadgetID */
542 NULL /* UserData */
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 */
555 3, /* GadgetID */
556 NULL /* UserData */
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 */
569 4, /* GadgetID */
570 NULL /* UserData */
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 */
583 5, /* GadgetID */
584 NULL /* UserData */
589 /* *********************************************************************
590 * Structure for the main window now in function MainWindow() in mm2.c
591 * ********************************************************************* */
593 char *Help_Intro[]= {
595 " MemoMaster V2.0",
597 " Click on gadgets to display specific help information. ",
599 " Click on HELP again to return to normal operation.",
601 '\0' };