home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 371.lha / MagazineManager_v2.01 / MagMan.H < prev    next >
Text File  |  1990-05-05  |  11KB  |  315 lines

  1. /*
  2.     Header for MAGGREP.C
  3. */
  4.  
  5. /* KEYWORDS GADGET */
  6.  
  7. static UBYTE KeywordsSIBuff[216];
  8. static struct StringInfo KeywordsSInfo = {
  9.     KeywordsSIBuff,    /* buffer where text will be edited */
  10.     NULL,    /* optional undo buffer */
  11.     0,    /* character position in buffer */
  12.     216,    /* maximum number of characters to allow */
  13.     0,    /* first displayed character buffer position */
  14.     0,0,0,0,0,    /* Intuition initialized and maintained variables */
  15.     0,    /* Rastport of gadget */
  16.     0,    /* initial value for integer gadgets */
  17.     NULL    /* alternate keymap (fill in if you set the flag) */
  18. };
  19.  
  20. static SHORT BorderVectors2[] = {
  21.     0,0,
  22.     401,0,
  23.     401,9,
  24.     0,9,
  25.     0,0
  26. };
  27. static struct Border Border2 = {
  28.     -1,-1,    /* XY origin relative to container TopLeft */
  29.     3,0,JAM1,    /* front pen, back pen and drawmode */
  30.     5,    /* number of XY vectors */
  31.     BorderVectors2,    /* pointer to XY vectors */
  32.     NULL    /* next border in list */
  33. };
  34.  
  35. static struct IntuiText IText2 = {
  36.     3,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  37.     130,-11,    /* XY origin relative to container TopLeft */
  38.     NULL,    /* font pointer or NULL for default */
  39.     "Magazine Keywords",    /* pointer to text */
  40.     NULL    /* next IntuiText structure */
  41. };
  42.  
  43. static struct Gadget Keywords = {
  44.     NULL,    /* next gadget */
  45.     27,54,    /* origin XY of hit box relative to window TopLeft */
  46.     400,8,    /* hit box width and height */
  47.     NULL,    /* gadget flags */
  48.     RELVERIFY,    /* activation flags */
  49.     STRGADGET,    /* gadget type flags */
  50.     (APTR)&Border2,    /* gadget border or image to be rendered */
  51.     NULL,    /* alternate imagery for selection */
  52.     &IText2,    /* first IntuiText structure */
  53.     NULL,    /* gadget mutual-exclude long word */
  54.     (APTR)&KeywordsSInfo,    /* SpecialInfo structure */
  55.     3,    /* user-definable data */
  56.     NULL    /* pointer to user-definable data */
  57. };
  58.  
  59. /* ISSUE GADGET */
  60.  
  61. static UBYTE IssueSIBuff[20];
  62. static struct StringInfo IssueSInfo = {
  63.     IssueSIBuff,    /* buffer where text will be edited */
  64.     NULL,    /* optional undo buffer */
  65.     0,    /* character position in buffer */
  66.     20,    /* maximum number of characters to allow */
  67.     0,    /* first displayed character buffer position */
  68.     0,0,0,0,0,    /* Intuition initialized and maintained variables */
  69.     0,    /* Rastport of gadget */
  70.     0,    /* initial value for integer gadgets */
  71.     NULL    /* alternate keymap (fill in if you set the flag) */
  72. };
  73.  
  74. static SHORT BorderVectors4[] = {
  75.     0,0,
  76.     161,0,
  77.     161,9,
  78.     0,9,
  79.     0,0
  80. };
  81. static struct Border Border4 = {
  82.     -1,-1,    /* XY origin relative to container TopLeft */
  83.     3,0,JAM1,    /* front pen, back pen and drawmode */
  84.     5,    /* number of XY vectors */
  85.     BorderVectors4,    /* pointer to XY vectors */
  86.     NULL    /* next border in list */
  87. };
  88.  
  89. static struct IntuiText IText4 = {
  90.     3,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  91.     23,-10,    /* XY origin relative to container TopLeft */
  92.     NULL,    /* font pointer or NULL for default */
  93.     "Magazine Issue",    /* pointer to text */
  94.     NULL    /* next IntuiText structure */
  95. };
  96.  
  97. static struct Gadget Issue = {
  98.     &Keywords,    /* next gadget */
  99.     255,25,    /* origin XY of hit box relative to window TopLeft */
  100.     160,8,    /* hit box width and height */
  101.     NULL,    /* gadget flags */
  102.     RELVERIFY,    /* activation flags */
  103.     STRGADGET,    /* gadget type flags */
  104.     (APTR)&Border4,    /* gadget border or image to be rendered */
  105.     NULL,    /* alternate imagery for selection */
  106.     &IText4,    /* first IntuiText structure */
  107.     NULL,    /* gadget mutual-exclude long word */
  108.     (APTR)&IssueSInfo,    /* SpecialInfo structure */
  109.     2,    /* user-definable data */
  110.     NULL    /* pointer to user-definable data */
  111. };
  112.  
  113. /* TITLE GADGET */
  114.  
  115. static UBYTE TitleSIBuff[20];
  116. static struct StringInfo TitleSInfo = {
  117.     TitleSIBuff,    /* buffer where text will be edited */
  118.     NULL,    /* optional undo buffer */
  119.     0,    /* character position in buffer */
  120.     20,    /* maximum number of characters to allow */
  121.     0,    /* first displayed character buffer position */
  122.     0,0,0,0,0,    /* Intuition initialized and maintained variables */
  123.     0,    /* Rastport of gadget */
  124.     0,    /* initial value for integer gadgets */
  125.     NULL    /* alternate keymap (fill in if you set the flag) */
  126. };
  127.  
  128. static SHORT BorderVectors3[] = {
  129.     0,0,
  130.     161,0,
  131.     161,9,
  132.     0,9,
  133.     0,0
  134. };
  135. static struct Border Border3 = {
  136.     -1,-1,    /* XY origin relative to container TopLeft */
  137.     3,0,JAM1,    /* front pen, back pen and drawmode */
  138.     5,    /* number of XY vectors */
  139.     BorderVectors3,    /* pointer to XY vectors */
  140.     NULL    /* next border in list */
  141. };
  142.  
  143. static struct IntuiText IText3 = {
  144.     3,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  145.     23,-10,    /* XY origin relative to container TopLeft */
  146.     NULL,    /* font pointer or NULL for default */
  147.     "Magazine Title",    /* pointer to text */
  148.     NULL    /* next IntuiText structure */
  149. };
  150.  
  151. static struct Gadget Title = {
  152.     &Issue,    /* next gadget */
  153.     35,25,    /* origin XY of hit box relative to window TopLeft */
  154.     160,8,    /* hit box width and height */
  155.     NULL,    /* gadget flags */
  156.     RELVERIFY,    /* activation flags */
  157.     STRGADGET,    /* gadget type flags */
  158.     (APTR)&Border3,    /* gadget border or image to be rendered */
  159.     NULL,    /* alternate imagery for selection */
  160.     &IText3,    /* first IntuiText structure */
  161.     NULL,    /* gadget mutual-exclude long word */
  162.     (APTR)&TitleSInfo,    /* SpecialInfo structure */
  163.     1,    /* user-definable data */
  164.     NULL    /* pointer to user-definable data */
  165. };
  166.  
  167. /* FIND GADGET */
  168.  
  169. static UBYTE FindSIBuff[31];
  170. static struct StringInfo FindSInfo = {
  171.     FindSIBuff,    /* buffer where text will be edited */
  172.     NULL,    /* optional undo buffer */
  173.     0,    /* character position in buffer */
  174.     31,    /* maximum number of characters to allow */
  175.     0,    /* first displayed character buffer position */
  176.     0,0,0,0,0,    /* Intuition initialized and maintained variables */
  177.     0,    /* Rastport of gadget */
  178.     0,    /* initial value for integer gadgets */
  179.     NULL    /* alternate keymap (fill in if you set the flag) */
  180. };
  181.  
  182. static SHORT BorderVectors1[] = {
  183.     0,0,
  184.     249,0,
  185.     249,9,
  186.     0,9,
  187.     0,0
  188. };
  189. static struct Border Border1 = {
  190.     -1,-1,    /* XY origin relative to container TopLeft */
  191.     3,0,JAM1,    /* front pen, back pen and drawmode */
  192.     5,    /* number of XY vectors */
  193.     BorderVectors1,    /* pointer to XY vectors */
  194.     NULL    /* next border in list */
  195. };
  196.  
  197. static struct IntuiText IText1 = {
  198.     1,0,JAM2,    /* front and back text pens, drawmode and fill byte */
  199.     -58,1,    /* XY origin relative to container TopLeft */
  200.     NULL,    /* font pointer or NULL for default */
  201.     "Find:",    /* pointer to text */
  202.     NULL    /* next IntuiText structure */
  203. };
  204.  
  205. static struct Gadget Find = {
  206.     &Title,    /* next gadget */
  207.     179,74,    /* origin XY of hit box relative to window TopLeft */
  208.     248,9,    /* hit box width and height */
  209.     NULL,    /* gadget flags */
  210.     RELVERIFY,    /* activation flags */
  211.     STRGADGET,    /* gadget type flags */
  212.     (APTR)&Border1,    /* gadget border or image to be rendered */
  213.     NULL,    /* alternate imagery for selection */
  214.     &IText1,    /* first IntuiText structure */
  215.     NULL,    /* gadget mutual-exclude long word */
  216.     (APTR)&FindSInfo,    /* SpecialInfo structure */
  217.     0,    /* user-definable data */
  218.     NULL    /* pointer to user-definable data */
  219. };
  220.  
  221. #define GadgetList1 Find
  222.  
  223. /* MENUS */
  224.  
  225. static struct IntuiText IText5 = {
  226.     3,1,COMPLEMENT,
  227.     0,0,
  228.     NULL,
  229.     "Find An Item",
  230.     NULL
  231. };
  232. static struct MenuItem MenuItem3 = {
  233.     NULL,
  234.     0,16,
  235.     152,8,
  236.     ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,
  237.     0,
  238.     (APTR)&IText5,
  239.     NULL,
  240.     'F',
  241.     NULL,
  242.     MENUNULL
  243. };
  244.     
  245. static struct IntuiText IText6 = {
  246.     3,1,COMPLEMENT,    /* front and back text pens, drawmode and fill byte */
  247.     0,0,    /* XY origin relative to container TopLeft */
  248.     NULL,    /* font pointer or NULL for default */
  249.     "Save This Item",    /* pointer to text */
  250.     NULL    /* next IntuiText structure */
  251. };
  252.  
  253. static struct MenuItem MenuItem2 = {
  254.     &MenuItem3,    /* next MenuItem structure */
  255.     0,8,    /* XY of Item hitbox relative to TopLeft of parent hitbox */
  256.     152,8,    /* hit box width and height */
  257.     ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,    /* Item flags */
  258.     0,    /* each bit mutually-excludes a same-level Item */
  259.     (APTR)&IText6,    /* Item render  (IntuiText or Image or NULL) */
  260.     NULL,    /* Select render */
  261.     'S',    /* alternate command-key */
  262.     NULL,    /* SubItem list */
  263.     MENUNULL    /* filled in by Intuition for drag selections */
  264. };
  265.  
  266. static struct IntuiText IText7 = {
  267.     3,1,COMPLEMENT,    /* front and back text pens, drawmode and fill byte */
  268.     0,0,    /* XY origin relative to container TopLeft */
  269.     NULL,    /* font pointer or NULL for default */
  270.     "Add An Item",    /* pointer to text */
  271.     NULL    /* next IntuiText structure */
  272. };
  273.  
  274. static struct MenuItem MenuItem1 = {
  275.     &MenuItem2,    /* next MenuItem structure */
  276.     0,0,    /* XY of Item hitbox relative to TopLeft of parent hitbox */
  277.     152,8,    /* hit box width and height */
  278.     ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,    /* Item flags */
  279.     0,    /* each bit mutually-excludes a same-level Item */
  280.     (APTR)&IText7,    /* Item render  (IntuiText or Image or NULL) */
  281.     NULL,    /* Select render */
  282.     'A',    /* alternate command-key */
  283.     NULL,    /* SubItem list */
  284.     MENUNULL    /* filled in by Intuition for drag selections */
  285. };
  286.  
  287. static struct Menu Menu1 = {
  288.     NULL,    /* next Menu structure */
  289.     0,0,    /* XY origin of Menu hit box relative to screen TopLeft */
  290.     120,0,    /* Menu hit box width and height */
  291.     MENUENABLED,    /* Menu flags */
  292.     "MagMan Options",    /* text of Menu name */
  293.     &MenuItem1    /* MenuItem linked list pointer */
  294. };
  295.  
  296. #define MenuList1 Menu1
  297.  
  298. static struct NewWindow NewWindowStructure1 = {
  299.     1,12,    /* window XY origin relative to TopLeft of screen */
  300.     471,96,    /* window width and height */
  301.     0,1,    /* detail and block pens */
  302.     GADGETUP+MENUPICK+VANILLAKEY+CLOSEWINDOW,    /* IDCMP flags */
  303.     WINDOWDRAG+WINDOWDEPTH+WINDOWCLOSE+ACTIVATE,    /* other window flags */
  304.     &Find,    /* first gadget in gadget list */
  305.     NULL,    /* custom CHECKMARK imagery */
  306.     NULL,    /* window title */
  307.     NULL,    /* custom screen pointer */
  308.     NULL,    /* custom bitmap */
  309.     470,75,    /* minimum width and height */
  310.     470,75,    /* maximum width and height */
  311.     WBENCHSCREEN    /* destination screen type */
  312. };
  313.  
  314. /* end of PowerWindows source generation */
  315.