home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 350.lha / IRA / helpwin.h < prev    next >
C/C++ Source or Header  |  1990-03-04  |  9KB  |  267 lines

  1. /*
  2.  * helpwin.h : Intuition structures needed for the help(), about() & fileio
  3.  *             functions in abouthelp.c. Created with PowerWindows 2.0 by
  4.  *             Joel Swank 1/5/89
  5.  */
  6.  
  7. extern struct TextAttr TOPAZ80;
  8.  
  9. SHORT BorderVectorsHelp[] = {
  10.     0,0,
  11.     80,0,
  12.     80,17,
  13.     0,17,
  14.     0,0
  15. };
  16. struct Border BorderHelp = {
  17.     -2,-1,    /* XY origin relative to container TopLeft */
  18.     3,0,JAM1,    /* front pen, back pen and drawmode */
  19.     5,    /* number of XY vectors */
  20.     BorderVectorsHelp,    /* pointer to XY vectors */
  21.     NULL    /* next border in list */
  22. };
  23.  
  24.  
  25. struct TextAttr TOPAZ60 = {
  26.     (STRPTR)"topaz.font",
  27.     TOPAZ_SIXTY,0,0
  28. };
  29.  
  30. struct IntuiText ITextHelp = {
  31.     3,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  32.     20,4,    /* XY origin relative to container TopLeft */
  33.     &TOPAZ60,    /* font pointer or NULL for default */
  34.     (UBYTE *)" OK",    /* pointer to text */
  35.     NULL    /* next IntuiText structure */
  36. };
  37.  
  38. struct Gadget HelpDone_Gad = {
  39.     NULL,    /* next gadget */
  40.     283,157,    /* origin XY of hit box relative to window TopLeft */
  41.     77,16,    /* hit box width and height */
  42.     NULL,    /* gadget flags */
  43.     RELVERIFY,    /* activation flags */
  44.     BOOLGADGET,    /* gadget type flags */
  45.     (APTR)&BorderHelp,    /* gadget border or image to be rendered */
  46.     NULL,    /* alternate imagery for selection */
  47.     &ITextHelp,    /* first IntuiText structure */
  48.     NULL,    /* gadget mutual-exclude long word */
  49.     NULL,    /* SpecialInfo structure */
  50.     NULL,    /* user-definable data */
  51.     NULL    /* pointer to user-definable data */
  52. };
  53.  
  54. #define GadgetListHelp HelpDone_Gad
  55.  
  56. struct NewWindow NewWindowStructureHelp = {
  57.     0,10,    /* window XY origin relative to TopLeft of screen */
  58.     640,185,    /* window width and height */
  59.     0,1,    /* detail and block pens */
  60.     GADGETUP,    /* IDCMP flags */
  61.     WINDOWDRAG+WINDOWDEPTH,    /* other window flags */
  62.     &HelpDone_Gad,    /* first gadget in gadget list */
  63.     NULL,    /* custom CHECKMARK imagery */
  64.     (UBYTE *)"IRA Calculator Help",    /* window title */
  65.     NULL,    /* custom screen pointer */
  66.     NULL,    /* custom bitmap */
  67.     5,5,    /* minimum width and height */
  68.     640,200,    /* maximum width and height */
  69.     WBENCHSCREEN    /* destination screen type */
  70. };
  71.  
  72. /*
  73.  *    Data describing the requester text
  74.  *
  75.  */
  76.  
  77. struct IntuiText oktxt = {
  78.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  79.     5,3,    /* XY origin relative to container TopLeft */
  80.     &TOPAZ80,    /* font pointer or NULL for default */
  81.     (UBYTE *)"OK",    /* pointer to text */
  82.     NULL    /* next IntuiText structure */
  83. };
  84.  
  85. struct IntuiText opfailtxt = {
  86.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  87.     14,16,    /* XY origin relative to container TopLeft */
  88.     &TOPAZ80,    /* font pointer or NULL for default */
  89.     (UBYTE *)"Open Failed",    /* pointer to text */
  90.     NULL    /* next IntuiText structure */
  91. };
  92.  
  93. struct IntuiText messagetxt = {
  94.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  95.     14,16,    /* XY origin relative to container TopLeft */
  96.     &TOPAZ80,    /* font pointer or NULL for default */
  97.     (UBYTE *) NULL,  /* filled in at run time */
  98.     NULL    /* next IntuiText structure */
  99. };
  100.  
  101.  
  102. struct IntuiText winfailtxt = {
  103.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  104.     14,16,    /* XY origin relative to container TopLeft */
  105.     &TOPAZ80,    /* font pointer or NULL for default */
  106.     (UBYTE *)"Window failed to open",    /* pointer to text */
  107.     NULL    /* next IntuiText structure */
  108. };
  109.  
  110.  
  111. struct IntuiText cantxt = {
  112.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  113.     5,3,    /* XY origin relative to container TopLeft */
  114.     &TOPAZ80,    /* font pointer or NULL for default */
  115.     (UBYTE *)"CANCEL",    /* pointer to text */
  116.     NULL    /* next IntuiText structure */
  117. };
  118.  
  119. struct IntuiText retrytxt = {
  120.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  121.     5,3,    /* XY origin relative to container TopLeft */
  122.     &TOPAZ80,    /* font pointer or NULL for default */
  123.     (UBYTE *)"RETRY",    /* pointer to text */
  124.     NULL    /* next IntuiText structure */
  125. };
  126.  
  127. struct IntuiText aboutmsg4 = {
  128.     6,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  129.     14,40,    /* XY origin relative to container TopLeft */
  130.     &TOPAZ80,    /* font pointer or NULL for default */
  131.     (UBYTE *) "     September 27, 1989",    /* pointer to text */
  132.     NULL    /* next IntuiText structure */
  133. };
  134.  
  135. struct IntuiText aboutmsg3 = {
  136.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  137.     14,30,    /* XY origin relative to container TopLeft */
  138.     &TOPAZ80,    /* font pointer or NULL for default */
  139.     (UBYTE *)  "        by Joel Swank",    /* pointer to text */
  140.     &aboutmsg4 /* next IntuiText structure */
  141. };
  142.  
  143. struct IntuiText aboutmsg2 = {
  144.     6,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  145.     14,20,    /* XY origin relative to container TopLeft */
  146.     &TOPAZ80,    /* font pointer or NULL for default */
  147.     (UBYTE *) "          Version 2",
  148.     &aboutmsg3    /* next IntuiText structure */
  149. };
  150.  
  151. struct IntuiText aboutmsg = {
  152.     6,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  153.     14,10,    /* XY origin relative to container TopLeft */
  154.     &TOPAZ80,    /* font pointer or NULL for default */
  155.     (UBYTE *)"      IRA Calculator",    /* pointer to text */
  156.     &aboutmsg2    /* next IntuiText structure */
  157. };
  158.  
  159. struct IntuiText fiofailtxt = {
  160.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  161.     14,16,    /* XY origin relative to container TopLeft */
  162.     &TOPAZ80,    /* font pointer or NULL for default */
  163.     (UBYTE *)"FileIO failed to open",    /* pointer to text */
  164.     NULL    /* next IntuiText structure */
  165. };
  166.  
  167. struct IntuiText prerrtxt2 = {
  168.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  169.     14,32,    /* XY origin relative to container TopLeft */
  170.     &TOPAZ80,    /* font pointer or NULL for default */
  171.     (UBYTE *) NULL,    /* filled in from sys_errlist */
  172.     NULL    /* next IntuiText structure */
  173. };
  174.  
  175. struct IntuiText prerrtxt = {
  176.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  177.     14,16,    /* XY origin relative to container TopLeft */
  178.     &TOPAZ80,    /* font pointer or NULL for default */
  179.     (UBYTE *) "Error Encountered During Printing:",
  180.     &prerrtxt2    /* next IntuiText structure */
  181. };
  182.  
  183.  
  184. struct IntuiText infailtxt2 = {
  185.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  186.     14,28,    /* XY origin relative to container TopLeft */
  187.     &TOPAZ80,    /* font pointer or NULL for default */
  188.     (UBYTE *)NULL,
  189.     NULL    /* next IntuiText structure */
  190. };
  191.  
  192. struct IntuiText infailtxt = {
  193.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  194.     14,16,    /* XY origin relative to container TopLeft */
  195.     &TOPAZ80,    /* font pointer or NULL for default */
  196.     (UBYTE *)"Unable to open file:",    /* pointer to text */
  197.     &infailtxt2 /* next IntuiText structure */
  198. };
  199.  
  200. struct IntuiText lockfailtxt = {
  201.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  202.     14,16,    /* XY origin relative to container TopLeft */
  203.     &TOPAZ80,    /* font pointer or NULL for default */
  204.     (UBYTE *)"Unable to access file",    /* pointer to text */
  205.     NULL    /* next IntuiText structure */
  206. };
  207.  
  208.  
  209. struct IntuiText prfailtxt = {
  210.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  211.     14,16,    /* XY origin relative to container TopLeft */
  212.     &TOPAZ80,    /* font pointer or NULL for default */
  213.     (UBYTE *)"Printer failed to open",    /* pointer to text */
  214.     NULL    /* next IntuiText structure */
  215. };
  216.  
  217. struct IntuiText badfiletxt = {
  218.     2,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  219.     14,16,    /* XY origin relative to container TopLeft */
  220.     &TOPAZ80,    /* font pointer or NULL for default */
  221.     (UBYTE *)" Bad File format",    /* pointer to text */
  222.     &infailtxt2    /* next IntuiText structure */
  223. };
  224.  
  225. /*
  226.       FileIO window definition
  227. */
  228.  
  229.  
  230. struct NewWindow NewWindowStructure3 = {
  231.     0,0,
  232.     316,150,
  233.     0,1,
  234.     NULL,
  235.     WINDOWDRAG+WINDOWDEPTH,
  236.     NULL,
  237.     NULL,
  238.     (UBYTE *)"  Select  File Name",
  239.     NULL,
  240.     NULL,
  241.     5,5,
  242.     640,200,
  243.     WBENCHSCREEN
  244. };
  245.  
  246.  
  247. /*    Text for Help Screen    */
  248.  
  249. char *HelpText[40] = {
  250. "",
  251. "",
  252. "",
  253. "                             IRA Calculator",
  254. "",
  255. "    The IRA calculator allows easy calculation of future values of",
  256. "investment. You enter 4 values into the string gadgets. 'Balance' is",
  257. "the beginning investment value. 'Interest' is the annual percentage rate",
  258. "earned by the investment. 'Deposit' is the ammount of new capital added",
  259. "to the investment each year. 'Years' is the number of years to accumulate",
  260. "the investment. When all data is correct, click the 'Calculate' gadget.",
  261. "The new balance will be put back into the 'Balance' gadget. You can",
  262. "do many years in one calculation, or just do 1 year at a time, changing",
  263. "the data each time. The Menu provides save and load items to store the ",
  264. "data in a file.",
  265. NULL };
  266.  
  267.