home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 1: Collection A / 17Bit_Collection_A.iso / files / 223.dms / 223.adf / Source / star3.c < prev    next >
C/C++ Source or Header  |  1988-07-25  |  32KB  |  1,082 lines

  1. /*=========================================================================
  2.   Star3.c -- This module contains requester gadget definitions for the
  3.    Parameters requester used in the Star Chart program.
  4.   
  5.   The gadgets and intuitexts in this module were build using the EGad 
  6.   Gadget Editor developed by the Programmer's network. (see later comments)
  7.  
  8.   Credits for Star Chart:
  9.        Robert L. Hill of the Orange County, CA. Amiga Friends User Group
  10.                       wrote the original version of StarChart in AmigaBasic
  11.                       The star data and many of the main functions of this
  12.                       version are derived from that program.
  13.  
  14.        Ray R. Larson  wrote the c version 1.0 of StarChart, 'intuitionizing'
  15.                       and enhancing the speed and functions of the original.
  16.  
  17.   Copyright (c) 1986 by Ray R. Larson
  18.   
  19.   This program may be freely distributed and copied, but may not be sold
  20.   without the permission of the author. If you modify or enhance it, 
  21.   please include the above credits (and please send me a copy!).
  22.  
  23. Ray R. Larson
  24. 6425 Central Ave. #304
  25. El Cerrito, CA 94530
  26.  
  27. BitNet  LARSON@UCBCMSA
  28. =========================================================================*/
  29.  
  30. /**********************************************************************
  31.  *                    Gadget Structure Definitions
  32.  * 
  33.  * The following structures were defined using the Gadget Editor created 
  34.  * by the Programmer's Network.
  35.  * The credits for the Gadget Editor are:
  36.  * 
  37.  *     John Draper    - Initial design, coordination, and integration.
  38.  *     Ray Larson     - Images and Intuitext. 
  39.  *     Brent Southard - Saving and restoring gadgets in binary form.
  40.  *     Dave Milligan  - Gadget Editor Main menu.
  41.  * 
  42.  * 
  43.  **********************************************************************/
  44.  
  45. /*  The header files needed for gadget definitions  */ 
  46. #include <intuition/intuition.h> 
  47. #include <intuition/intuitionbase.h> 
  48. #include <libraries/dosextens.h> 
  49. #include <graphics/gfxbase.h> 
  50. #include <graphics/gfx.h> 
  51. #include <graphics/display.h> 
  52.  
  53. #include <graphics/text.h> 
  54. #include <ctype.h> 
  55.  
  56. /*  Definitions for Gadget ID numbers               */ 
  57. #define  LONGDEGGAD   0
  58. #define  LONGMINGAD   1
  59. #define  LATDEGGAD   2
  60. #define  YEARGAD   3
  61. #define  MONGAD   4
  62. #define  DAYGAD   5
  63. #define  HOURGAD   6
  64. #define  MINGAD   7
  65. #define  SECGAD   8
  66. #define  NORTHGAD   9
  67. #define  SOUTHGAD   10
  68. #define  CANGAD   11
  69. #define  OKGAD   12
  70.  
  71. /**********************************************************************
  72.  *  Text attribute structures used in rendering IntuiTexts
  73.  **********************************************************************/
  74.  
  75.  
  76. char def_font[] ="topaz.font";
  77.  
  78. struct TextAttr TxtAt_Plain = {    (UBYTE *)def_font, 8,
  79.         FS_NORMAL, FPF_ROMFONT};
  80.  
  81. struct TextAttr TxtAt_BIU = {(UBYTE *)def_font, 8, 
  82.         FSF_BOLD | FSF_ITALIC | FSF_UNDERLINED, FPF_ROMFONT};
  83.  
  84. struct TextAttr TxtAt_BU = {(UBYTE *)def_font, 8, 
  85.         FSF_BOLD | FSF_UNDERLINED, FPF_ROMFONT};
  86.  
  87. struct TextAttr TxtAt_BI = {(UBYTE *)def_font, 8, 
  88.        FSF_BOLD | FSF_ITALIC, FPF_ROMFONT};
  89.  
  90. struct TextAttr TxtAt_B ={(UBYTE *)def_font, 8, 
  91.        FSF_BOLD, FPF_ROMFONT};
  92.  
  93. struct TextAttr TxtAt_IU ={(UBYTE *)def_font, 8,
  94.        FSF_ITALIC | FSF_UNDERLINED, FPF_ROMFONT};
  95.  
  96. struct TextAttr TxtAt_I ={(UBYTE *)def_font, 8, 
  97.        FSF_ITALIC, FPF_ROMFONT};
  98.  
  99. struct TextAttr TxtAt_U ={(UBYTE *)def_font, 8, 
  100.        FSF_UNDERLINED, FPF_ROMFONT};
  101.  
  102.  
  103. /**********************************************************************
  104.  *  Border Definitions for ok gadget
  105.  **********************************************************************/
  106.  
  107. SHORT ok_Pairs_2[] = {
  108.   0,     0,   
  109.   70,     0,   
  110.   70,     12,   
  111.   0,     12,   
  112.   0,     0    
  113. };
  114. struct Border ok_bord_2 = {
  115.   -1,  -1,       /* LeftEdge, TopEdge */
  116.   1,  3,  JAM2,  /* FrontPen, BackPen, DrawMode*/
  117.   5,             /* Count of XY pairs */  
  118.   (SHORT *)&ok_Pairs_2, /* XY pairs */
  119.   NULL           /* Next Border */
  120. };
  121.  
  122.  
  123. /**********************************************************************
  124.  *  IntuiTexts for the ok gadget.
  125.  **********************************************************************/
  126.  
  127. struct IntuiText ok_Text_0 = {
  128.    3, 1,     /* FrontPen, BackPen */
  129.    JAM2,       /* DrawMode */
  130.    2, 2,     /* LeftEdge, TopEdge */
  131.    &TxtAt_B, /* ITextFont Pointer */ 
  132.    /* The IText */
  133.    (UBYTE *)"   OK   ",
  134.    NULL
  135.  };
  136.  
  137.  
  138.  
  139. /**********************************************************************
  140.  *  Gadget Structure definition for the ok gadget.
  141.  **********************************************************************/
  142.  
  143. struct Gadget ok = {
  144.   NULL,     /* NextGadget pointer */
  145.   260, 175,    /* LeftEdge, TopEdge  */
  146.   70, 12,    /* Width, Height      */
  147.   /* Gadget Flags */
  148.   GADGHCOMP,
  149.   /* Activation Flags */
  150.   RELVERIFY | GADGIMMEDIATE,
  151.   /* GadgetType */
  152.   BOOLGADGET | REQGADGET,
  153.   (APTR)&ok_bord_2,  /*  GadgetRender */
  154.   NULL,    /* SelectRender */
  155.   &ok_Text_0,    /* GadgetText */
  156.   0x0,    /* MutualExclude */
  157.   NULL,   /* SpecialInfo */
  158.   OKGAD,    /* GadgetID         */
  159.   0x1     /* UserData Pointer */
  160. };
  161.  
  162.  
  163. /**********************************************************************
  164.  *  Border Definitions for can gadget
  165.  **********************************************************************/
  166.  
  167. SHORT can_Pairs_2[] = {
  168.   0,     0,   
  169.   70,     0,   
  170.   70,     12,   
  171.   0,     12,   
  172.   0,     0    
  173. };
  174. struct Border can_bord_2 = {
  175.   -1,  -1,       /* LeftEdge, TopEdge */
  176.   1,  3,  JAM2,  /* FrontPen, BackPen, DrawMode*/
  177.   5,             /* Count of XY pairs */  
  178.   (SHORT *)&can_Pairs_2, /* XY pairs */
  179.   NULL           /* Next Border */
  180. };
  181.  
  182.  
  183. /**********************************************************************
  184.  *  IntuiTexts for the can gadget.
  185.  **********************************************************************/
  186.  
  187. struct IntuiText can_Text_0 = {
  188.    3, 1,     /* FrontPen, BackPen */
  189.    JAM2,       /* DrawMode */
  190.    2, 2,     /* LeftEdge, TopEdge */
  191.    &TxtAt_B, /* ITextFont Pointer */ 
  192.    /* The IText */
  193.    (UBYTE *)" CANCEL ",
  194.    NULL
  195.  };
  196.  
  197.  
  198.  
  199. /**********************************************************************
  200.  *  Gadget Structure definition for the can gadget.
  201.  **********************************************************************/
  202.  
  203. struct Gadget can = {
  204.  &ok,     /* NextGadget pointer */
  205.   41, 175,    /* LeftEdge, TopEdge  */
  206.   70, 12,    /* Width, Height      */
  207.   /* Gadget Flags */
  208.   GADGHCOMP,
  209.   /* Activation Flags */
  210.   RELVERIFY | GADGIMMEDIATE | ENDGADGET,
  211.   /* GadgetType */
  212.   BOOLGADGET | REQGADGET,
  213.   (APTR)&can_bord_2,   /*  GadgetRender */
  214.   NULL,    /* SelectRender */
  215.    &can_Text_0,  /* GadgetText */
  216.   0x0,    /* MutualExclude */
  217.   NULL,   /* SpecialInfo */
  218.   CANGAD,    /* GadgetID         */
  219.   0x1     /* UserData Pointer */
  220. };
  221.  
  222.  
  223. /**********************************************************************
  224.  *  Border Definitions for south gadget
  225.  **********************************************************************/
  226.  
  227. SHORT south_Pairs_3[] = {
  228.   0,     0,   
  229.   64,     0,   
  230.   64,     12,   
  231.   0,     12,   
  232.   0,     0    
  233. };
  234. struct Border south_bord_3 = {
  235.   -1,  -1,       /* LeftEdge, TopEdge */
  236.   1,  3,  JAM2,  /* FrontPen, BackPen, DrawMode*/
  237.   5,             /* Count of XY pairs */  
  238.   (SHORT *)&south_Pairs_3, /* XY pairs */
  239.   NULL           /* Next Border */
  240. };
  241.  
  242.  
  243. /**********************************************************************
  244.  *  IntuiTexts for the south gadget.
  245.  **********************************************************************/
  246.  
  247. struct IntuiText south_Text_0 = {
  248.    1, 0,     /* FrontPen, BackPen */
  249.    JAM2,       /* DrawMode */
  250.    11, 1,     /* LeftEdge, TopEdge */
  251.    &TxtAt_B, /* ITextFont Pointer */ 
  252.    /* The IText */
  253.    (UBYTE *)"South",
  254.    NULL
  255.  };
  256.  
  257.  
  258.  
  259. /**********************************************************************
  260.  *  Gadget Structure definition for the south gadget.
  261.  **********************************************************************/
  262.  
  263. struct Gadget south = {
  264.  &can,     /* NextGadget pointer */
  265.   208, 155,    /* LeftEdge, TopEdge  */
  266.   64, 12,    /* Width, Height      */
  267.   /* Gadget Flags */
  268.   GADGHNONE,
  269.   /* Activation Flags */
  270.   RELVERIFY | GADGIMMEDIATE,
  271.   /* GadgetType */
  272.   BOOLGADGET | REQGADGET,
  273.   (APTR)&south_bord_3,   /*  GadgetRender */
  274.   NULL,    /* SelectRender */
  275.    &south_Text_0,  /* GadgetText */
  276.   0x0,    /* MutualExclude */
  277.   NULL,   /* SpecialInfo */
  278.   SOUTHGAD,    /* GadgetID         */
  279.   0x1     /* UserData Pointer */
  280. };
  281.  
  282.  
  283. /**********************************************************************
  284.  *  Border Definitions for north gadget
  285.  **********************************************************************/
  286.  
  287. SHORT north_Pairs_4[] = {
  288.   0,     0,   
  289.   60,     0,   
  290.   60,     12,   
  291.   0,     12,   
  292.   0,     0    
  293. };
  294. struct Border north_bord_4 = {
  295.   -1,  -1,       /* LeftEdge, TopEdge */
  296.   1,  3,  JAM2,  /* FrontPen, BackPen, DrawMode*/
  297.   5,             /* Count of XY pairs */  
  298.   (SHORT *)&north_Pairs_4, /* XY pairs */
  299.   NULL           /* Next Border */
  300. };
  301.  
  302.  
  303. /**********************************************************************
  304.  *  IntuiTexts for the north gadget.
  305.  **********************************************************************/
  306.  
  307. struct IntuiText north_Text_1 = {
  308.    1, 0,     /* FrontPen, BackPen */
  309.    JAM2,       /* DrawMode */
  310.    9, 1,     /* LeftEdge, TopEdge */
  311.    &TxtAt_B, /* ITextFont Pointer */ 
  312.    /* The IText */
  313.    (UBYTE *)"North",
  314.    NULL
  315.  };
  316.  
  317.  
  318. struct IntuiText north_Text_0 = {
  319.    2, 1,     /* FrontPen, BackPen */
  320.    JAM2,       /* DrawMode */
  321.    40, -13,     /* LeftEdge, TopEdge */
  322.    &TxtAt_BU, /* ITextFont Pointer */ 
  323.    /* The IText */
  324.    (UBYTE *)"  Horizon  ",
  325.    &north_Text_1    /* NextText */
  326.  };
  327.  
  328.  
  329.  
  330. /**********************************************************************
  331.  *  Gadget Structure definition for the north gadget.
  332.  **********************************************************************/
  333.  
  334. struct Gadget north = {
  335.  &south,     /* NextGadget pointer */
  336.   96, 155,    /* LeftEdge, TopEdge  */
  337.   60, 12,    /* Width, Height      */
  338.   /* Gadget Flags */
  339.    GADGHNONE,
  340.   /* Activation Flags */
  341.   RELVERIFY | GADGIMMEDIATE,
  342.   /* GadgetType */
  343.   BOOLGADGET | REQGADGET,
  344.   (APTR)&north_bord_4,   /*  GadgetRender */
  345.   NULL,    /* SelectRender */
  346.    &north_Text_0,  /* GadgetText */
  347.   0x0,    /* MutualExclude */
  348.   NULL,   /* SpecialInfo */
  349.   NORTHGAD,    /* GadgetID         */
  350.   0x1     /* UserData Pointer */
  351. };
  352.  
  353.  
  354. /**********************************************************************
  355.  *  Border Definitions for sec gadget
  356.  **********************************************************************/
  357.  
  358. SHORT sec_Pairs_5[] = {
  359.   0,     0,   
  360.   39,     0,   
  361.   39,     9,   
  362.   0,     9,   
  363.   0,     0    
  364. };
  365. struct Border sec_bord_5 = {
  366.   -1,  -1,       /* LeftEdge, TopEdge */
  367.   1,  3,  JAM2,  /* FrontPen, BackPen, DrawMode*/
  368.   5,             /* Count of XY pairs */  
  369.   (SHORT *)&sec_Pairs_5, /* XY pairs */
  370.   NULL           /* Next Border */
  371. };
  372.  
  373.  
  374. /**********************************************************************
  375.  *  IntuiTexts for the sec gadget.
  376.  **********************************************************************/
  377.  
  378. struct IntuiText sec_Text_0 = {
  379.    1, 0,     /* FrontPen, BackPen */
  380.    JAM2,       /* DrawMode */
  381.    -8, -10,     /* LeftEdge, TopEdge */
  382.    &TxtAt_I, /* ITextFont Pointer */ 
  383.    /* The IText */
  384.    (UBYTE *)"Seconds",
  385.    NULL
  386.  };
  387.  
  388.  
  389.  
  390. /**********************************************************************
  391.  *  String information for the sec string gadget.
  392.  **********************************************************************/
  393.  
  394. UBYTE sec_sbuf_1[6] = "0";
  395. UBYTE sec_ubuf_1[6];
  396.  
  397. struct StringInfo sec_txstr_1 = {
  398.   sec_sbuf_1, sec_ubuf_1, /* Buffer, UndoBuffer  */
  399.   0, 3, 0,  /* BufferPos, MaxChars, DispPos   */
  400.   0, 0,      /* UndoPos, NumChars              */
  401.   4, 263, 125,  /* DispCount, CLeft, CTop         */
  402.   0x0, 0,   /* LayerPtr, LongInt              */
  403.   0x0        /* AltKeyMap                      */
  404. };
  405.  
  406.  
  407. /**********************************************************************
  408.  *  Gadget Structure definition for the sec gadget.
  409.  **********************************************************************/
  410.  
  411. struct Gadget sec = {
  412.  &north,     /* NextGadget pointer */
  413.   263, 125,    /* LeftEdge, TopEdge  */
  414.   39, 9,    /* Width, Height      */
  415.   /* Gadget Flags */
  416.   GADGHCOMP,
  417.   /* Activation Flags */
  418.   RELVERIFY | GADGIMMEDIATE | LONGINT | STRINGCENTER,
  419.   /* GadgetType */
  420.   STRGADGET | REQGADGET,
  421.   (APTR)&sec_bord_5,   /*  GadgetRender */
  422.   NULL,    /* SelectRender */
  423.    &sec_Text_0,  /* GadgetText */
  424.   0x0,    /* MutualExclude */
  425.   (APTR)&sec_txstr_1,   /* SpecialInfo */
  426.   SECGAD,    /* GadgetID         */
  427.   0x1     /* UserData Pointer */
  428. };
  429.  
  430.  
  431. /**********************************************************************
  432.  *  Border Definitions for min gadget
  433.  **********************************************************************/
  434.  
  435. SHORT min_Pairs_6[] = {
  436.   0,     0,   
  437.   38,     0,   
  438.   38,     9,   
  439.   0,     9,   
  440.   0,     0    
  441. };
  442. struct Border min_bord_6 = {
  443.   -1,  -1,       /* LeftEdge, TopEdge */
  444.   1,  3,  JAM2,  /* FrontPen, BackPen, DrawMode*/
  445.   5,             /* Count of XY pairs */  
  446.   (SHORT *)&min_Pairs_6, /* XY pairs */
  447.   NULL           /* Next Border */
  448. };
  449.  
  450.  
  451. /**********************************************************************
  452.  *  IntuiTexts for the min gadget.
  453.  **********************************************************************/
  454.  
  455. struct IntuiText min_Text_0 = {
  456.    1, 0,     /* FrontPen, BackPen */
  457.    JAM2,       /* DrawMode */
  458.    -9, -10,     /* LeftEdge, TopEdge */
  459.    &TxtAt_I, /* ITextFont Pointer */ 
  460.    /* The IText */
  461.    (UBYTE *)"Minutes",
  462.    NULL
  463.  };
  464.  
  465.  
  466.  
  467. /**********************************************************************
  468.  *  String information for the min string gadget.
  469.  **********************************************************************/
  470.  
  471. UBYTE min_sbuf_2[6] = "0";
  472. UBYTE min_ubuf_2[6];
  473.  
  474. struct StringInfo min_txstr_2 = {
  475.   min_sbuf_2, min_ubuf_2, /* Buffer, UndoBuffer  */
  476.   0, 3, 0,  /* BufferPos, MaxChars, DispPos   */
  477.   0, 0,      /* UndoPos, NumChars              */
  478.   4, 162, 125,  /* DispCount, CLeft, CTop         */
  479.   0x0, 0,   /* LayerPtr, LongInt              */
  480.   0x0        /* AltKeyMap                      */
  481. };
  482.  
  483.  
  484. /**********************************************************************
  485.  *  Gadget Structure definition for the min gadget.
  486.  **********************************************************************/
  487.  
  488. struct Gadget min = {
  489.  &sec,     /* NextGadget pointer */
  490.   162, 125,    /* LeftEdge, TopEdge  */
  491.   38, 9,    /* Width, Height      */
  492.   /* Gadget Flags */
  493.   GADGHCOMP,
  494.   /* Activation Flags */
  495.   RELVERIFY | GADGIMMEDIATE | LONGINT | STRINGCENTER,
  496.   /* GadgetType */
  497.   STRGADGET | REQGADGET,
  498.   (APTR)&min_bord_6,   /*  GadgetRender */
  499.   NULL,    /* SelectRender */
  500.    &min_Text_0,  /* GadgetText */
  501.   0x0,    /* MutualExclude */
  502.   (APTR)&min_txstr_2,   /* SpecialInfo */
  503.   MINGAD,    /* GadgetID         */
  504.   0x1     /* UserData Pointer */
  505. };
  506.  
  507.  
  508. /**********************************************************************
  509.  *  Border Definitions for hour gadget
  510.  **********************************************************************/
  511.  
  512. SHORT hour_Pairs_7[] = {
  513.   0,     0,   
  514.   38,     0,   
  515.   38,     9,   
  516.   0,     9,   
  517.   0,     0    
  518. };
  519. struct Border hour_bord_7 = {
  520.   -1,  -1,       /* LeftEdge, TopEdge */
  521.   1,  3,  JAM2,  /* FrontPen, BackPen, DrawMode*/
  522.   5,             /* Count of XY pairs */  
  523.   (SHORT *)&hour_Pairs_7, /* XY pairs */
  524.   NULL           /* Next Border */
  525. };
  526.  
  527.  
  528. /**********************************************************************
  529.  *  IntuiTexts for the hour gadget.
  530.  **********************************************************************/
  531.  
  532. struct IntuiText hour_Text_0 = {
  533.    1, 0,     /* FrontPen, BackPen */
  534.    JAM2,       /* DrawMode */
  535.    -1, -10,     /* LeftEdge, TopEdge */
  536.    &TxtAt_I, /* ITextFont Pointer */ 
  537.    /* The IText */
  538.    (UBYTE *)"Hours",
  539.    NULL
  540.  };
  541.  
  542.  
  543.  
  544. /**********************************************************************
  545.  *  String information for the hour string gadget.
  546.  **********************************************************************/
  547.  
  548. UBYTE hour_sbuf_3[6] = "0";
  549. UBYTE hour_ubuf_3[6];
  550.  
  551. struct StringInfo hour_txstr_3 = {
  552.   hour_sbuf_3, hour_ubuf_3, /* Buffer, UndoBuffer  */
  553.   0, 3, 0,  /* BufferPos, MaxChars, DispPos   */
  554.   0, 0,      /* UndoPos, NumChars              */
  555.   4, 62, 125,  /* DispCount, CLeft, CTop         */
  556.   0x0, 0,   /* LayerPtr, LongInt              */
  557.   0x0        /* AltKeyMap                      */
  558. };
  559.  
  560.  
  561. /**********************************************************************
  562.  *  Gadget Structure definition for the hour gadget.
  563.  **********************************************************************/
  564.  
  565. struct Gadget hour = {
  566.  &min,     /* NextGadget pointer */
  567.   62, 125,    /* LeftEdge, TopEdge  */
  568.   38, 9,    /* Width, Height      */
  569.   /* Gadget Flags */
  570.   GADGHCOMP,
  571.   /* Activation Flags */
  572.   RELVERIFY | GADGIMMEDIATE | LONGINT | STRINGCENTER,
  573.   /* GadgetType */
  574.   STRGADGET | REQGADGET,
  575.   (APTR)&hour_bord_7,   /*  GadgetRender */
  576.   NULL,    /* SelectRender */
  577.    &hour_Text_0,  /* GadgetText */
  578.   0x0,    /* MutualExclude */
  579.   (APTR)&hour_txstr_3,   /* SpecialInfo */
  580.   HOURGAD,    /* GadgetID         */
  581.   0x1     /* UserData Pointer */
  582. };
  583.  
  584.  
  585. /**********************************************************************
  586.  *  Border Definitions for day gadget
  587.  **********************************************************************/
  588.  
  589. SHORT day_Pairs_8[] = {
  590.   0,     0,   
  591.   42,     0,   
  592.   42,     9,   
  593.   0,     9,   
  594.   0,     0    
  595. };
  596. struct Border day_bord_8 = {
  597.   -1,  -1,       /* LeftEdge, TopEdge */
  598.   1,  3,  JAM2,  /* FrontPen, BackPen, DrawMode*/
  599.   5,             /* Count of XY pairs */  
  600.   (SHORT *)&day_Pairs_8, /* XY pairs */
  601.   NULL           /* Next Border */
  602. };
  603.  
  604.  
  605. /**********************************************************************
  606.  *  IntuiTexts for the day gadget.
  607.  **********************************************************************/
  608.  
  609. struct IntuiText day_Text_0 = {
  610.    1, 0,     /* FrontPen, BackPen */
  611.    JAM2,       /* DrawMode */
  612.    8, -10,     /* LeftEdge, TopEdge */
  613.    &TxtAt_I, /* ITextFont Pointer */ 
  614.    /* The IText */
  615.    (UBYTE *)"Day",
  616.    NULL
  617.  };
  618.  
  619.  
  620.  
  621. /**********************************************************************
  622.  *  String information for the day string gadget.
  623.  **********************************************************************/
  624.  
  625. UBYTE day_sbuf_4[6] = "0";
  626. UBYTE day_ubuf_4[6];
  627.  
  628. struct StringInfo day_txstr_4 = {
  629.   day_sbuf_4, day_ubuf_4, /* Buffer, UndoBuffer  */
  630.   0, 3, 0,  /* BufferPos, MaxChars, DispPos   */
  631.   0, 0,      /* UndoPos, NumChars              */
  632.   5, 259, 97,  /* DispCount, CLeft, CTop         */
  633.   0x0, 0,  /* LayerPtr, LongInt              */
  634.   0x0        /* AltKeyMap                      */
  635. };
  636.  
  637.  
  638. /**********************************************************************
  639.  *  Gadget Structure definition for the day gadget.
  640.  **********************************************************************/
  641.  
  642. struct Gadget day = {
  643.  &hour,     /* NextGadget pointer */
  644.   259, 97,    /* LeftEdge, TopEdge  */
  645.   42, 9,    /* Width, Height      */
  646.   /* Gadget Flags */
  647.   GADGHCOMP,
  648.   /* Activation Flags */
  649.   RELVERIFY | GADGIMMEDIATE | LONGINT | STRINGCENTER,
  650.   /* GadgetType */
  651.   STRGADGET | REQGADGET,
  652.   (APTR)&day_bord_8,   /*  GadgetRender */
  653.   NULL,    /* SelectRender */
  654.    &day_Text_0,  /* GadgetText */
  655.   0x0,    /* MutualExclude */
  656.   (APTR)&day_txstr_4,   /* SpecialInfo */
  657.   DAYGAD,    /* GadgetID         */
  658.   0x1     /* UserData Pointer */
  659. };
  660.  
  661.  
  662. /**********************************************************************
  663.  *  Border Definitions for mon gadget
  664.  **********************************************************************/
  665.  
  666. SHORT mon_Pairs_9[] = {
  667.   0,     0,   
  668.   41,     0,   
  669.   41,     9,   
  670.   0,     9,   
  671.   0,     0    
  672. };
  673. struct Border mon_bord_9 = {
  674.   -1,  -1,       /* LeftEdge, TopEdge */
  675.   1,  3,  JAM2,  /* FrontPen, BackPen, DrawMode*/
  676.   5,             /* Count of XY pairs */  
  677.   (SHORT *)&mon_Pairs_9, /* XY pairs */
  678.   NULL           /* Next Border */
  679. };
  680.  
  681.  
  682. /**********************************************************************
  683.  *  IntuiTexts for the mon gadget.
  684.  **********************************************************************/
  685.  
  686. struct IntuiText mon_Text_0 = {
  687.    1, 0,     /* FrontPen, BackPen */
  688.    JAM2,       /* DrawMode */
  689.    2, -9,     /* LeftEdge, TopEdge */
  690.    &TxtAt_I, /* ITextFont Pointer */ 
  691.    /* The IText */
  692.    (UBYTE *)"Month",
  693.    NULL
  694.  };
  695.  
  696.  
  697.  
  698. /**********************************************************************
  699.  *  String information for the mon string gadget.
  700.  **********************************************************************/
  701.  
  702. UBYTE mon_sbuf_5[6] = "0";
  703. UBYTE mon_ubuf_5[6];
  704.  
  705. struct StringInfo mon_txstr_5 = {
  706.   mon_sbuf_5, mon_ubuf_5, /* Buffer, UndoBuffer  */
  707.   0, 3, 0,  /* BufferPos, MaxChars, DispPos   */
  708.   0, 0,      /* UndoPos, NumChars              */
  709.   5, 154, 97,  /* DispCount, CLeft, CTop         */
  710.   0x0, 0,   /* LayerPtr, LongInt              */
  711.   0x0        /* AltKeyMap                      */
  712. };
  713.  
  714.  
  715. /**********************************************************************
  716.  *  Gadget Structure definition for the mon gadget.
  717.  **********************************************************************/
  718.  
  719. struct Gadget mon = {
  720.  &day,     /* NextGadget pointer */
  721.   154, 97,    /* LeftEdge, TopEdge  */
  722.   41, 9,    /* Width, Height      */
  723.   /* Gadget Flags */
  724.   GADGHCOMP,
  725.   /* Activation Flags */
  726.   RELVERIFY | GADGIMMEDIATE | LONGINT | STRINGCENTER,
  727.   /* GadgetType */
  728.   STRGADGET | REQGADGET,
  729.   (APTR)&mon_bord_9,   /*  GadgetRender */
  730.   NULL,    /* SelectRender */
  731.    &mon_Text_0,  /* GadgetText */
  732.   0x0,    /* MutualExclude */
  733.   (APTR)&mon_txstr_5,   /* SpecialInfo */
  734.   MONGAD,    /* GadgetID         */
  735.   0x1     /* UserData Pointer */
  736. };
  737.  
  738.  
  739. /**********************************************************************
  740.  *  Border Definitions for year gadget
  741.  **********************************************************************/
  742.  
  743. SHORT year_Pairs_10[] = {
  744.   0,     0,   
  745.   42,     0,   
  746.   42,     9,   
  747.   0,     9,   
  748.   0,     0    
  749. };
  750. struct Border year_bord_10 = {
  751.   -1,  -1,       /* LeftEdge, TopEdge */
  752.   1,  3,  JAM2,  /* FrontPen, BackPen, DrawMode*/
  753.   5,             /* Count of XY pairs */  
  754.   (SHORT *)&year_Pairs_10, /* XY pairs */
  755.   NULL           /* Next Border */
  756. };
  757.  
  758.  
  759. /**********************************************************************
  760.  *  IntuiTexts for the year gadget.
  761.  **********************************************************************/
  762.  
  763. struct IntuiText year_Text_1 = {
  764.    1, 0,     /* FrontPen, BackPen */
  765.    JAM2,       /* DrawMode */
  766.    7, -9,     /* LeftEdge, TopEdge */
  767.    &TxtAt_I, /* ITextFont Pointer */ 
  768.    /* The IText */
  769.    (UBYTE *)"Year",
  770.    NULL
  771.  };
  772.  
  773.  
  774. struct IntuiText year_Text_0 = {
  775.    2, 1,     /* FrontPen, BackPen */
  776.    JAM2,       /* DrawMode */
  777.    19, -25,     /* LeftEdge, TopEdge */
  778.    &TxtAt_BU, /* ITextFont Pointer */ 
  779.    /* The IText */
  780.    (UBYTE *)"  Current Date and Time  ",
  781.    &year_Text_1    /* NextText */
  782.  };
  783.  
  784.  
  785.  
  786. /**********************************************************************
  787.  *  String information for the year string gadget.
  788.  **********************************************************************/
  789.  
  790. UBYTE year_sbuf_6[6] = "0";
  791. UBYTE year_ubuf_6[6];
  792.  
  793. struct StringInfo year_txstr_6 = {
  794.   year_sbuf_6, year_ubuf_6, /* Buffer, UndoBuffer  */
  795.   0, 5, 0,  /* BufferPos, MaxChars, DispPos   */
  796.   0, 0,      /* UndoPos, NumChars              */
  797.   5, 58, 97,  /* DispCount, CLeft, CTop         */
  798.   0x0, 0,     /* LayerPtr, LongInt              */
  799.   0x0        /* AltKeyMap                      */
  800. };
  801.  
  802.  
  803. /**********************************************************************
  804.  *  Gadget Structure definition for the year gadget.
  805.  **********************************************************************/
  806.  
  807. struct Gadget year = {
  808.  &mon,     /* NextGadget pointer */
  809.   58, 97,    /* LeftEdge, TopEdge  */
  810.   42, 9,    /* Width, Height      */
  811.   /* Gadget Flags */
  812.   GADGHCOMP,
  813.   /* Activation Flags */
  814.   RELVERIFY | GADGIMMEDIATE | LONGINT | STRINGCENTER,
  815.   /* GadgetType */
  816.   STRGADGET | REQGADGET,
  817.   (APTR)&year_bord_10,   /*  GadgetRender */
  818.   NULL,    /* SelectRender */
  819.    &year_Text_0,  /* GadgetText */
  820.   0x0,    /* MutualExclude */
  821.   (APTR)&year_txstr_6,   /* SpecialInfo */
  822.   YEARGAD,    /* GadgetID         */
  823.   0x1     /* UserData Pointer */
  824. };
  825.  
  826.  
  827. /**********************************************************************
  828.  *  Border Definitions for LatDeg gadget
  829.  **********************************************************************/
  830.  
  831. SHORT LatDeg_Pairs_11[] = {
  832.   0,     0,   
  833.   74,     0,   
  834.   74,     9,   
  835.   0,     9,   
  836.   0,     0    
  837. };
  838. struct Border LatDeg_bord_11 = {
  839.   -1,  -1,       /* LeftEdge, TopEdge */
  840.   1,  3,  JAM2,  /* FrontPen, BackPen, DrawMode*/
  841.   5,             /* Count of XY pairs */  
  842.   (SHORT *)&LatDeg_Pairs_11, /* XY pairs */
  843.   NULL           /* Next Border */
  844. };
  845.  
  846.  
  847. /**********************************************************************
  848.  *  IntuiTexts for the LatDeg gadget.
  849.  **********************************************************************/
  850.  
  851. struct IntuiText LatDeg_Text_1 = {
  852.    1, 0,     /* FrontPen, BackPen */
  853.    JAM2,       /* DrawMode */
  854.    77, 0,     /* LeftEdge, TopEdge */
  855.    &TxtAt_I, /* ITextFont Pointer */ 
  856.    /* The IText */
  857.    (UBYTE *)"Degrees",
  858.    NULL
  859.  };
  860.  
  861.  
  862. struct IntuiText LatDeg_Text_0 = {
  863.    2, 1,     /* FrontPen, BackPen */
  864.    JAM2,       /* DrawMode */
  865.    -50, -12,     /* LeftEdge, TopEdge */
  866.    &TxtAt_BU, /* ITextFont Pointer */ 
  867.    /* The IText */
  868.    (UBYTE *)" Latitude (0 to 90 Deg.) ",
  869.    &LatDeg_Text_1    /* NextText */
  870.  };
  871.  
  872.  
  873.  
  874. /**********************************************************************
  875.  *  String information for the LatDeg string gadget.
  876.  **********************************************************************/
  877.  
  878. UBYTE LatDeg_sbuf_7[6] = "0";
  879. UBYTE LatDeg_ubuf_7[6];
  880.  
  881. struct StringInfo LatDeg_txstr_7 = {
  882.   LatDeg_sbuf_7, LatDeg_ubuf_7, /* Buffer, UndoBuffer  */
  883.   0, 3, 0,  /* BufferPos, MaxChars, DispPos   */
  884.   0, 0,      /* UndoPos, NumChars              */
  885.   9, 127, 52,  /* DispCount, CLeft, CTop         */
  886.   0x0, 0,  /* LayerPtr, LongInt              */
  887.   0x0        /* AltKeyMap                      */
  888. };
  889.  
  890.  
  891. /**********************************************************************
  892.  *  Gadget Structure definition for the LatDeg gadget.
  893.  **********************************************************************/
  894.  
  895. struct Gadget LatDeg = {
  896.  &year,     /* NextGadget pointer */
  897.   127, 52,    /* LeftEdge, TopEdge  */
  898.   74, 9,    /* Width, Height      */
  899.   /* Gadget Flags */
  900.   GADGHCOMP,
  901.   /* Activation Flags */
  902.   RELVERIFY | GADGIMMEDIATE | LONGINT | STRINGCENTER,
  903.   /* GadgetType */
  904.   STRGADGET | REQGADGET,
  905.   (APTR)&LatDeg_bord_11,   /*  GadgetRender */
  906.   NULL,    /* SelectRender */
  907.    &LatDeg_Text_0,  /* GadgetText */
  908.   0x0,    /* MutualExclude */
  909.   (APTR)&LatDeg_txstr_7,   /* SpecialInfo */
  910.   LATDEGGAD,    /* GadgetID         */
  911.   0x1     /* UserData Pointer */
  912. };
  913.  
  914.  
  915. /**********************************************************************
  916.  *  Border Definitions for LongMin gadget
  917.  **********************************************************************/
  918.  
  919. SHORT LongMin_Pairs_12[] = {
  920.   0,     0,   
  921.   53,     0,   
  922.   53,     9,   
  923.   0,     9,   
  924.   0,     0    
  925. };
  926. struct Border LongMin_bord_12 = {
  927.   -1,  -1,       /* LeftEdge, TopEdge */
  928.   1,  3,  JAM2,  /* FrontPen, BackPen, DrawMode*/
  929.   5,             /* Count of XY pairs */  
  930.   (SHORT *)&LongMin_Pairs_12, /* XY pairs */
  931.   NULL           /* Next Border */
  932. };
  933.  
  934.  
  935. /**********************************************************************
  936.  *  IntuiTexts for the LongMin gadget.
  937.  **********************************************************************/
  938.  
  939. struct IntuiText LongMin_Text_0 = {
  940.    1, 0,     /* FrontPen, BackPen */
  941.    JAM2,       /* DrawMode */
  942.    63, 0,     /* LeftEdge, TopEdge */
  943.    &TxtAt_I, /* ITextFont Pointer */ 
  944.    /* The IText */
  945.    (UBYTE *)"Minutes",
  946.    NULL
  947.  };
  948.  
  949.  
  950.  
  951. /**********************************************************************
  952.  *  String information for the LongMin string gadget.
  953.  **********************************************************************/
  954.  
  955. UBYTE LongMin_sbuf_8[6] = "0";
  956. UBYTE LongMin_ubuf_8[6];
  957.  
  958. struct StringInfo LongMin_txstr_8 = {
  959.   LongMin_sbuf_8, LongMin_ubuf_8, /* Buffer, UndoBuffer  */
  960.   0, 3, 0,          /* BufferPos, MaxChars, DispPos   */
  961.   0, 0,             /* UndoPos, NumChars              */
  962.   6, 203, 25,       /* DispCount, CLeft, CTop         */
  963.   0x0, 0,           /* LayerPtr, LongInt              */
  964.   0x0               /* AltKeyMap                      */
  965. };
  966.  
  967.  
  968. /**********************************************************************
  969.  *  Gadget Structure definition for the LongMin gadget.
  970.  **********************************************************************/
  971.  
  972. struct Gadget LongMin = {
  973.  &LatDeg,     /* NextGadget pointer */
  974.   203, 25,    /* LeftEdge, TopEdge  */
  975.   53, 9,    /* Width, Height      */
  976.   /* Gadget Flags */
  977.   GADGHCOMP,
  978.   /* Activation Flags */
  979.   RELVERIFY | GADGIMMEDIATE | LONGINT | STRINGCENTER,
  980.   /* GadgetType */
  981.   STRGADGET | REQGADGET,
  982.   (APTR)&LongMin_bord_12,   /*  GadgetRender */
  983.   NULL,    /* SelectRender */
  984.    &LongMin_Text_0,  /* GadgetText */
  985.   0x0,    /* MutualExclude */
  986.   (APTR)&LongMin_txstr_8,   /* SpecialInfo */
  987.   LONGMINGAD,    /* GadgetID         */
  988.   0x1     /* UserData Pointer */
  989. };
  990.  
  991.  
  992. /**********************************************************************
  993.  *  Border Definitions for LongDeg gadget
  994.  **********************************************************************/
  995.  
  996. SHORT LongDeg_Pairs_13[] = {
  997.   0,     0,   
  998.   53,     0,   
  999.   53,     9,   
  1000.   0,     9,   
  1001.   0,     0    
  1002. };
  1003. struct Border LongDeg_bord_13 = {
  1004.   -1,  -1,       /* LeftEdge, TopEdge */
  1005.   1,  3,  JAM2,  /* FrontPen, BackPen, DrawMode*/
  1006.   5,             /* Count of XY pairs */  
  1007.   (SHORT *)&LongDeg_Pairs_13, /* XY pairs */
  1008.   NULL           /* Next Border */
  1009. };
  1010.  
  1011.  
  1012. /**********************************************************************
  1013.  *  IntuiTexts for the LongDeg gadget.
  1014.  **********************************************************************/
  1015.  
  1016. struct IntuiText LongDeg_Text_1 = {
  1017.    1, 0,     /* FrontPen, BackPen */
  1018.    JAM2,       /* DrawMode */
  1019.    56, 0,     /* LeftEdge, TopEdge */
  1020.    &TxtAt_I, /* ITextFont Pointer */ 
  1021.    /* The IText */
  1022.    (UBYTE *)"Degrees",
  1023.    NULL
  1024.  };
  1025.  
  1026.  
  1027. struct IntuiText LongDeg_Text_0 = {
  1028.    2, 1,     /* FrontPen, BackPen */
  1029.    JAM2,       /* DrawMode */
  1030.    -54, -13,     /* LeftEdge, TopEdge */
  1031.    &TxtAt_BU, /* ITextFont Pointer */ 
  1032.    /* The IText */
  1033.    (UBYTE *)" Longitude (-180 - 180 Deg.: 0 - 60 Min.) ",
  1034.    &LongDeg_Text_1    /* NextText */
  1035.  };
  1036.  
  1037.  
  1038.  
  1039. /**********************************************************************
  1040.  *  String information for the LongDeg string gadget.
  1041.  **********************************************************************/
  1042.  
  1043. UBYTE LongDeg_sbuf_9[6] = "0";
  1044. UBYTE LongDeg_ubuf_9[6];
  1045.  
  1046. struct StringInfo LongDeg_txstr_9 = {
  1047.   LongDeg_sbuf_9, LongDeg_ubuf_9, /* Buffer, UndoBuffer  */
  1048.   0, 5, 0,  /* BufferPos, MaxChars, DispPos   */
  1049.   0, 0,      /* UndoPos, NumChars              */
  1050.   6, 69, 25,  /* DispCount, CLeft, CTop         */
  1051.   0x0, 0,   /* LayerPtr, LongInt              */
  1052.   0x0        /* AltKeyMap                      */
  1053. };
  1054.  
  1055.  
  1056. /**********************************************************************
  1057.  *  Gadget Structure definition for the LongDeg gadget.
  1058.  **********************************************************************/
  1059.  
  1060. struct Gadget LongDeg = {
  1061.  &LongMin,     /* NextGadget pointer */
  1062.   69, 25,    /* LeftEdge, TopEdge  */
  1063.   53, 9,    /* Width, Height      */
  1064.   /* Gadget Flags */
  1065.   GADGHCOMP,
  1066.   /* Activation Flags */
  1067.   RELVERIFY | GADGIMMEDIATE | LONGINT | STRINGCENTER,
  1068.   /* GadgetType */
  1069.   STRGADGET | REQGADGET,
  1070.   (APTR)&LongDeg_bord_13,   /*  GadgetRender */
  1071.   NULL,    /* SelectRender */
  1072.    &LongDeg_Text_0,  /* GadgetText */
  1073.   0x0,    /* MutualExclude */
  1074.   (APTR)&LongDeg_txstr_9,   /* SpecialInfo */
  1075.   LONGDEGGAD,    /* GadgetID         */
  1076.   0x1     /* UserData Pointer */
  1077. };
  1078.  
  1079.  
  1080. struct Gadget *ParamGads = &LongDeg;
  1081.  
  1082.