Name
GetIconProperties -- retrieve properties from an Amiga icon (V4.5)
Synopsis
type, tooltypes, deftool$ = GetIconProperties(file$)
Platforms
AmigaOS and compatibles only

Function
This function can be used to examine an Amiga icon in the *.info format. It will return the icon's type, any tooltypes that are defined, as well as the icon's default tool. The default tool is only used for icons that are of the type #AMIGAICON_PROJECT.

The return value type will be one of the following types: #AMIGAICON_DISK, #AMIGAICON_DRAWER, #AMIGAICON_TOOL, or #AMIGAICON_PROJECT.

The return value tooltypes is a table that contains a list of Key-Value pairs. Additionally, the flag Enabled tells you if the specified tooltype is enabled. Disabled tooltype are enclosed by parentheses. If the icon does not define any tooltypes, the second return value will be an empty table.

See SetIconProperties for a more detailed description of Amiga icon types, the default tool, and the tooltypes.

Inputs
file$
the icon to examine
Results
type
type of the icon; will be one of the constants from above
tooltypes
a table containing a list of all tooltypes; each list entry will have the fields Key, Value, and Enabled initialized
deftool$
the default tool set for this icon; only set for icons of type #AMIGAICON_PROJECT
Example
type, tt, deftool$ = GetIconProperties("MyIcon.info")
For k = 0 To ListItems(tt) - 1
   DebugPrint("Item:", k, "Key:", tt[k].key, "Value:", tt[k].value,
              "Enabled:", tt[k].enabled)
Next
The code above dumps all tooltypes of icon "MyIcon.info".

Show TOC