home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 138.lha / A.S.G / asg.doc < prev    next >
Text File  |  1986-11-20  |  8KB  |  255 lines

  1.                         Amiga Structure Generator
  2.  
  3.  
  4. ASG is a simple compiler that allows you to define windows, menus, 
  5. gadgets, and requesters in a simple manner.  It allows you to supply
  6. only the information you feel is relevent and it will supply the rest.
  7. You can supply IFF files to use for gadgets and menuitems, or you can use
  8. one of the built in images.  These images are: A box that when selected,
  9. appears with an 'X' in it; A circle, that when selected, appears with a
  10. dot in the center; Four arrows pointing left, right, up, and down; and
  11. a box that will enclose supplied text either plane or with a drop shadow.
  12. This compiler generates structure definitions only, the code to use them
  13. is left to the user.  
  14.  
  15. General Definition.
  16. An item is defined by typing the item type followed by a name, e.g.
  17.         requester       myreq
  18. the name will be the name used in the structure definition with an 
  19. apropriate prefix, in this case the structure name is 'req_myreq'.
  20. the prefixes generated are:
  21.         gad_    for gadgets             req_    for requesters
  22.         bdr_    for borders             im_     for images
  23.         it_     for intuitext           ar_     for data arrays
  24.         ta_     for text attributes     si_     for string info
  25.         pi_     for propinfo            mi_     for menuitems
  26.         mnu_    for menus               scr_    for screens
  27. after the item is named, you supply specifications for how the item
  28. looks and behaves.  When you are finished, type 'end' to terminate that
  29. definition.  Here are some examples:
  30.  
  31. gadget  ok
  32.         text    OK
  33.         style   border
  34. end
  35.  
  36. requester       continue
  37.         text    Press 'OK' to continue
  38.         center
  39.         gadget  ok
  40. end
  41.  
  42. menu    Project
  43.         text    Load
  44.         text    Save
  45.         submenu
  46.                 text    save IFF
  47.                 text    save Bitmap
  48.         end
  49.         text Quit
  50. end
  51.  
  52. Menus are defined in order, that is, the first menu defined is on the
  53. far left, the next one defined to its right, etc. Also, all other menus
  54. are linked together with the first one at the head of the list, so
  55. SetMenuStrip() is only called with the first defined menu.
  56.  
  57. Specification Commands.
  58. You have already seen some of the specifications that can be used,
  59. here are the rest:
  60.  
  61. These can be used in gadgets, requesters, and menus:
  62.  
  63. text <text terminated by a newline>
  64.         This is any printable text, including spaces and tabs.
  65.  
  66. flags <list of flags seperated by a space or a comma>
  67.         Flags can be given in lower case, and the different types of
  68.         flags can be mixed, the compiler will sort them out and put them
  69.         in the correct field.  Also, the compiler is smart about what flags
  70.         to supply, so you don't have to list all that are needed.
  71.  
  72. iffimage <IFF file name>
  73.         This can be any IFF format file, such as the brush files generated
  74.         by DPAINT.  The compiler will tell you if it is to big to fit.
  75.  
  76. iffaltimage <IFF file name>
  77.         This is the same as above, exept will be displayed when the gadget
  78.         or menu item is selected.
  79.  
  80. background <decimal number>
  81.         This sets the BPen to the given number.
  82.  
  83. forground <decimal number>
  84.         This sets FPen to the given number.
  85.  
  86. borderpen <decimal number>
  87.         This is the pen number used when a border is drawn.
  88.  
  89. xypos <decimal number> , <decimal number>
  90.         This is used to specify an x,y offset from the upper left corner
  91.         of a window or requester to position a gadget.
  92.  
  93. Gadgets only:
  94.  
  95. style <style name>
  96.         There are 7 styles:
  97.         textimage - prints the given text to the left of the given image
  98.         imagetext - prints the given text to the right of the given image.
  99.         toveri - prints the text centered over the image.
  100.         iovert - print the text centered under the image.
  101.         border - puts a simple border around the text.
  102.         dsborder - puts a border with a drop shadow around the text.
  103.         simple - leaves the text or image alone.
  104.         The text refered to above is supplied with a text command.
  105.         The image refered to can be either an IFF file or a stock item.
  106.  
  107. stock <stock image type>
  108.         Used to specify one of 6 stock images:
  109.         box - An empty square box, has as an alt image a box with an 'X'.
  110.         button - An empty circle, has a circle with a dot as an alt image.
  111.         uparrow - An arrow pointing up.
  112.         downarrow - An arrow pointing down.
  113.         rightarrow - An arrow pointing right.
  114.         leftarrow - An arrow pointing left.
  115.         All stock images are 16 pixels wide by 9 pixels high.
  116.  
  117. boolean
  118.         Defines this as a boolean gadget.
  119.         This is the default.
  120.  
  121. string <length>
  122.         Defines this as a string gadget of given length.
  123.  
  124. proportional
  125.         Defines this as a proportional gadget.
  126.  
  127. horizsize <decimal number>
  128.         Horizontal size of a proportional gadget.
  129.  
  130. vertsize <decimal number>
  131.         Vertical size of a proportional gadget.
  132.  
  133. horizdisp <decimal number>
  134.         Amount displayed horizontally for prop gadgets.
  135.  
  136. vertdisp <decimal number>
  137.         Amount displayed vertically for prop gadgets.
  138.  
  139. horiztotal <decimal number>
  140.         Total horizontal amount for prop gadgets.
  141.  
  142. verttotal <decimal number>
  143.         Total vertical amount for prop gadgets.
  144.  
  145. shadowpen <decimal number>
  146.         Set the pen number used to draw a drop shadow if used.
  147.  
  148. id <decimal number>
  149.         Sets gadget ID.
  150.  
  151. Menus only:
  152.  
  153. submenu
  154.         Following items (either text or images) are a sub menu of the
  155.         item preveous to the submenu decleration.  The list of submenu
  156.         items is terminated by an 'end' command.
  157.  
  158. exclude
  159.         Sets the mutual exclude flag for the next menu item only.
  160.  
  161. Requesters only:
  162.  
  163. midleft
  164.         Sets justification to between center and the left edge.
  165.  
  166. midright
  167.         Sets justification to between center and the right edge.
  168.  
  169. left
  170.         Sets left justification.  This is the default.
  171.  
  172. right
  173.         Sets right justification.
  174.  
  175. center
  176.         Center jusifies.
  177.  
  178. noreqborder
  179.         Turns off the default border drawn around the requester.
  180.  
  181. down [<decimal number>]
  182.         Will move the current point down the specified number or the max
  183.         height of the objects placed on the current line.  Starts a new 
  184.         line.
  185.  
  186. over <decimal number>
  187.         Move the current point over by the specified amount.
  188.  
  189. Windows only:
  190.  
  191. vsize <decimal number>
  192.         Sets the height of the window.
  193.  
  194. hsize <decimal number>
  195.         Sets the width of the window.
  196.  
  197. closegad
  198.         Supplies a close gadget (also sets apropriate IDCMP flag)
  199.  
  200. movegad
  201.         Supplies a move gadget (does not set IDCMP flag)
  202.  
  203. sizegad
  204.         Supplies a size gadget (does not set IDCMP flag)
  205.  
  206. depthgad
  207.         Supplies a depth gadget (does not set IDCMP flag)
  208.  
  209. borderless
  210.         defines window as borderless.
  211.  
  212. notitle
  213.         Window will not have a title.
  214.  
  215. title <title text>
  216.         Sets window title to text, default is window name.
  217.  
  218. minvsize <decimal number>
  219.         Sets the smallest height.
  220.  
  221. maxvsize <decimal number>
  222.         Sets the largest height.
  223.  
  224. minhsize <decimal number>
  225.         Sets the smallest width.
  226.  
  227. maxhsize <decimal number>
  228.         Sets the largest width.
  229.  
  230. Additionally, if you are using several different files in your program,
  231. and you are using any of the stock images in any of them, all but one
  232. must have an external decleration so only one set of data is generated.
  233. the syntax is:
  234. external <list of stock images>
  235.  
  236. The defaults are reasonable and logical, for example:
  237.  
  238. gadget  ok
  239.         text    OK
  240. end
  241.  
  242. Will generate a gadget with the word 'OK' surrounded by a border with both
  243. the text and border color set to pen 1 and the background as pen 0.
  244. If the gadget is used in a requester, then the REQGADGET flag is set.
  245. It's position is dependant on where is is defined in either a requester
  246. or a window definition.  Other flags are set as apropriate.
  247.  
  248. For more examples, see the acompanying spec file and the header file
  249. generated by it.
  250.  
  251. NOTE: All spec files must have the extention '.asg'.  They will generate
  252.       files with the same name, but with a '.h' extention.
  253.       Invocation is: asg <filename><cr> With the .asg left off the filename.
  254.  
  255.