home *** CD-ROM | disk | FTP | other *** search
- Amiga Structure Generator
-
-
- ASG is a simple compiler that allows you to define windows, menus,
- gadgets, and requesters in a simple manner. It allows you to supply
- only the information you feel is relevent and it will supply the rest.
- You can supply IFF files to use for gadgets and menuitems, or you can use
- one of the built in images. These images are: A box that when selected,
- appears with an 'X' in it; A circle, that when selected, appears with a
- dot in the center; Four arrows pointing left, right, up, and down; and
- a box that will enclose supplied text either plane or with a drop shadow.
- This compiler generates structure definitions only, the code to use them
- is left to the user.
-
- General Definition.
- An item is defined by typing the item type followed by a name, e.g.
- requester myreq
- the name will be the name used in the structure definition with an
- apropriate prefix, in this case the structure name is 'req_myreq'.
- the prefixes generated are:
- gad_ for gadgets req_ for requesters
- bdr_ for borders im_ for images
- it_ for intuitext ar_ for data arrays
- ta_ for text attributes si_ for string info
- pi_ for propinfo mi_ for menuitems
- mnu_ for menus scr_ for screens
- after the item is named, you supply specifications for how the item
- looks and behaves. When you are finished, type 'end' to terminate that
- definition. Here are some examples:
-
- gadget ok
- text OK
- style border
- end
-
- requester continue
- text Press 'OK' to continue
- center
- gadget ok
- end
-
- menu Project
- text Load
- text Save
- submenu
- text save IFF
- text save Bitmap
- end
- text Quit
- end
-
- Menus are defined in order, that is, the first menu defined is on the
- far left, the next one defined to its right, etc. Also, all other menus
- are linked together with the first one at the head of the list, so
- SetMenuStrip() is only called with the first defined menu.
-
- Specification Commands.
- You have already seen some of the specifications that can be used,
- here are the rest:
-
- These can be used in gadgets, requesters, and menus:
-
- text <text terminated by a newline>
- This is any printable text, including spaces and tabs.
-
- flags <list of flags seperated by a space or a comma>
- Flags can be given in lower case, and the different types of
- flags can be mixed, the compiler will sort them out and put them
- in the correct field. Also, the compiler is smart about what flags
- to supply, so you don't have to list all that are needed.
-
- iffimage <IFF file name>
- This can be any IFF format file, such as the brush files generated
- by DPAINT. The compiler will tell you if it is to big to fit.
-
- iffaltimage <IFF file name>
- This is the same as above, exept will be displayed when the gadget
- or menu item is selected.
-
- background <decimal number>
- This sets the BPen to the given number.
-
- forground <decimal number>
- This sets FPen to the given number.
-
- borderpen <decimal number>
- This is the pen number used when a border is drawn.
-
- xypos <decimal number> , <decimal number>
- This is used to specify an x,y offset from the upper left corner
- of a window or requester to position a gadget.
-
- Gadgets only:
-
- style <style name>
- There are 7 styles:
- textimage - prints the given text to the left of the given image
- imagetext - prints the given text to the right of the given image.
- toveri - prints the text centered over the image.
- iovert - print the text centered under the image.
- border - puts a simple border around the text.
- dsborder - puts a border with a drop shadow around the text.
- simple - leaves the text or image alone.
- The text refered to above is supplied with a text command.
- The image refered to can be either an IFF file or a stock item.
-
- stock <stock image type>
- Used to specify one of 6 stock images:
- box - An empty square box, has as an alt image a box with an 'X'.
- button - An empty circle, has a circle with a dot as an alt image.
- uparrow - An arrow pointing up.
- downarrow - An arrow pointing down.
- rightarrow - An arrow pointing right.
- leftarrow - An arrow pointing left.
- All stock images are 16 pixels wide by 9 pixels high.
-
- boolean
- Defines this as a boolean gadget.
- This is the default.
-
- string <length>
- Defines this as a string gadget of given length.
-
- proportional
- Defines this as a proportional gadget.
-
- horizsize <decimal number>
- Horizontal size of a proportional gadget.
-
- vertsize <decimal number>
- Vertical size of a proportional gadget.
-
- horizdisp <decimal number>
- Amount displayed horizontally for prop gadgets.
-
- vertdisp <decimal number>
- Amount displayed vertically for prop gadgets.
-
- horiztotal <decimal number>
- Total horizontal amount for prop gadgets.
-
- verttotal <decimal number>
- Total vertical amount for prop gadgets.
-
- shadowpen <decimal number>
- Set the pen number used to draw a drop shadow if used.
-
- id <decimal number>
- Sets gadget ID.
-
- Menus only:
-
- submenu
- Following items (either text or images) are a sub menu of the
- item preveous to the submenu decleration. The list of submenu
- items is terminated by an 'end' command.
-
- exclude
- Sets the mutual exclude flag for the next menu item only.
-
- Requesters only:
-
- midleft
- Sets justification to between center and the left edge.
-
- midright
- Sets justification to between center and the right edge.
-
- left
- Sets left justification. This is the default.
-
- right
- Sets right justification.
-
- center
- Center jusifies.
-
- noreqborder
- Turns off the default border drawn around the requester.
-
- down [<decimal number>]
- Will move the current point down the specified number or the max
- height of the objects placed on the current line. Starts a new
- line.
-
- over <decimal number>
- Move the current point over by the specified amount.
-
- Windows only:
-
- vsize <decimal number>
- Sets the height of the window.
-
- hsize <decimal number>
- Sets the width of the window.
-
- closegad
- Supplies a close gadget (also sets apropriate IDCMP flag)
-
- movegad
- Supplies a move gadget (does not set IDCMP flag)
-
- sizegad
- Supplies a size gadget (does not set IDCMP flag)
-
- depthgad
- Supplies a depth gadget (does not set IDCMP flag)
-
- borderless
- defines window as borderless.
-
- notitle
- Window will not have a title.
-
- title <title text>
- Sets window title to text, default is window name.
-
- minvsize <decimal number>
- Sets the smallest height.
-
- maxvsize <decimal number>
- Sets the largest height.
-
- minhsize <decimal number>
- Sets the smallest width.
-
- maxhsize <decimal number>
- Sets the largest width.
-
- Additionally, if you are using several different files in your program,
- and you are using any of the stock images in any of them, all but one
- must have an external decleration so only one set of data is generated.
- the syntax is:
- external <list of stock images>
-
- The defaults are reasonable and logical, for example:
-
- gadget ok
- text OK
- end
-
- Will generate a gadget with the word 'OK' surrounded by a border with both
- the text and border color set to pen 1 and the background as pen 0.
- If the gadget is used in a requester, then the REQGADGET flag is set.
- It's position is dependant on where is is defined in either a requester
- or a window definition. Other flags are set as apropriate.
-
- For more examples, see the acompanying spec file and the header file
- generated by it.
-
- NOTE: All spec files must have the extention '.asg'. They will generate
- files with the same name, but with a '.h' extention.
- Invocation is: asg <filename><cr> With the .asg left off the filename.
-
-