home *** CD-ROM | disk | FTP | other *** search
- Library Name:
- aaronsiconlib #62
-
- Author:
- Aaron Koolen, Vision Software, 15 Day Street, Newton, Auckland, NZ
-
- OverView:
- Not only has Aaron kindly fixed up passing of argumens in our
- cliargslib but has also donated this library which similar to
- the Reflective Images version allows access to information
- from the programs workbench icon.
-
- Commands:
- GetIconInfo: boolean.w=GetIconInfo(icon#,iconname$)
- IconTool$: tool$=IconTool$(icon#,toolname$)
- IconSubTool$: boolean.w=IconSubTool$(toolname$,subtool$)
- IconType: type.w=IconType(icon#)
- IconStack: stackSize.l=IconStack(icon#)
- IconDefTool$: deftool$.w=IconDefTool$(icon#)
-
- Authors Documentation:
-
- AaronsIconLib
- =============
-
- This library is for processing the icon (.info) files. It only provides
- routines for reading the data from icons, not for writing or creating new
- icons, which may be added later. It is most useful when used in conjunction
- with the ArgsLib. You can set the maximum number of allowed icon info's
- in the options. Also to free an IconInfo object, after a GetIconInfo use
- Free IconInfo #
-
-
- Function: GetIconInfo
- ---------------------
- Syntax: boolean.w=GetIconInfo(icon#,iconname$)
-
- This examines a .info file so you can get information about it.
- 'iconname$' is the name of the icon without the .info suffix and icon# is
- the number of the IconInfo object you want to put the data under. It will
- return FALSE (0) if it failed, or TRUE (-1) if it succeeded.
-
- Function: IconTool$
- -------------------
- Syntax: tool$=IconTool$(icon#,toolname$)
-
- Returns the respective data of the tooltype specified by 'toolname$' of
- IconInfo object icon#.
-
- EG
-
- If IconTool$(0,"CX_POPUP")="YES" Then Gosub PopUpWindow
-
-
- Function: IconSubTool$
- ----------------------
- Syntax: boolean.w=IconSubTool$(toolname$,subtool$)
-
- Returns TRUE (-1) or FALSE (0) if the sub tool type 'subtool$' exists
- within the tool 'toolname$'
-
- EG
-
- If IconSubTool$(0,IconTool$(0,"FILETYPE"),"ILBM") Then file type of
- file was ILBM.
-
- A Subtool (My word) is one that resides in a tool type but is separated by
- bars (|). EG
-
- FILETYPE=PaintProgram|ILBM (PaintProgram and ILBM are "Sub Tools")
-
- IconTool$ will return the PaintProgram|ILBM part and you can then use
- IconSubtool$ to see if things like ILBM or PaintProgram exist in that
- string.
-
- NOTE: This does not require the passing if an IconInfo object, it simply
- requires 2 strings, so you can use it for other things too.
-
-
- Function: IconType
- ------------------
- Syntax: type.w=IconType(icon#)
-
- Returns the type of IconInfo object icon#.
-
- EG NPrint IconType(0)
-
- 'type' is one of the list from workbench/workbench.bb2.
-
-
- Function: IconStack
- -------------------
- Syntax: stackSize.l=IconStack(icon#)
-
- Returns the stack sie setting of the icon.
-
-
- Function: IconDefTool$
- ----------------------
- Syntax: deftool$.w=IconDefTool$(icon#)
-
- Returns the default tool of the icon.
-
- EG NPrint IconDefTool$(icon#)
-
- May print something like "blitz2:blitz2" if icon# references a Blitz2 source
- program.
-