The [imageRef] command.

Introduction

The imageRef command lets you create and manipulate image objects in Alpha.

Synopsis

The formal syntax of the [imageRef] command is:
imageRef subcommand ?options?
The possible subcommands are described below. Depending on the subcommand, various options can be additionally specified.

The [create] subcommand

This subcommand creates a new image object. It has the following syntax:
    imageRef create (-data bin|-file str|-name str|-url str|-type ostype)
The [imageRef create] command returns a token used in the other subcommands to uniquely identify the image. One of the options -data, -file, -name, -type or -url must be specified.
Here is the description of the various options: The -name option searches for named images in several places, returning the first image it finds matching the given name. The order of the search is as follows:
  1. Search for an object whose name was set explicitly and currently resides in the image cache.
  2. Search the application's main bundle for a file whose name matches the specified string. When looking for files in the application's bundle, it is better (but not required) to include the filename extension in the name parameter.
  3. Search the Application Kit framework for a shared image with the specified name.

The [delete] subcommand

This subcommand lets you delete an image. The syntax is:
    imageRef delete token
After deletion, the token associated with this image is not valid anymore.

The [list] subcommand

This subcommand returns a list of the existing image tokens. The syntax is:
    imageRef list

The [size] subcommand

This subcommand lets you get or set the size of an image. The syntax is:
    imageRef size token
    imageRef size token width height
The first form of the command returns a two-elements list containing the width and height of the image.
The second form of the command is used to set the width and height of an image.

Named images

The following table is a list of system defined icons which can be used with the -name option :
ActionTemplate
AddTemplate
Advanced
ApplicationIcon
BluetoothTemplate
Bonjour
BookmarksTemplate
Caution
ColorPanel
ColumnViewTemplate
Computer
DotMac
EnterFullScreenTemplate
Everyone
ExitFullScreenTemplate
FlowViewTemplate
Folder
FolderBurnable
FolderSmart
FollowLinkFreestandingTemplate
FontPanel
GoLeftTemplate
GoRightTemplate
HomeTemplate
IChatTheaterTemplate
IconViewTemplate
Info
InvalidDataFreestandingTemplate
LeftFacingTriangleTemplate
ListViewTemplate
LockLockedTemplate
LockUnlockedTemplate
MenuMixedStateTemplate
MenuOnStateTemplate
MobileMe
MultipleDocuments
Network
PathTemplate
PreferencesGeneral
QuickLookTemplate
RefreshFreestandingTemplate
RefreshTemplate
RemoveTemplate
RevealFreestandingTemplate
RightFacingTriangleTemplate
ShareTemplate
SlideshowTemplate
SmartBadgeTemplate
StatusAvailable
StatusNone
StatusPartiallyAvailable
StatusUnavailable
StopProgressFreestandingTemplate
StopProgressTemplate
TrashEmpty
TrashFull
User
UserAccounts
UserGroup
UserGuest
For instance, to create a computer icon, the command is:
    imageRef create -name Computer

The images ending with Template are small, black images intended for use primarily in toolbar controls. These images expect to receive additional processing from the control which contains them and require the presence of a bounding box (which is supplied by the control), they are not as useful for standalone buttons or free-standing toolbar icons.

Icon types

The following table is a list of system defined icons which can be used with the -type option :
Generic Finder iconsCode
Clipboard Icon'CLIP'
Desktop Icon'desk'
Finder Icon'FNDR'
Computer Icon'root'
Font Suitcase Icon'FFIL'
Full Trash Icon'ftrh'
Generic Application Icon'APPL'
Generic CDROM Icon'cddr'
Generic Control Panel Icon'APPC'
Generic Document Icon'docu'
Generic Edition File Icon'edtf'
Generic Extension Icon'INIT'
Generic File Server Icon'srvr'
Generic Font Icon'ffil'
Generic Hard Disk Icon'hdsk'
Generic Removable Media Icon'rmov'
Generic Preferences Icon'pref'
Generic Query Document Icon'qery'
Generic RAM Disk Icon'ramd'
Generic Shared Libary Icon'shlb'
Generic Stationery Icon'sdoc'
Generic Suitcase Icon'suit'
Generic URL Icon'gurl'
International Resources Icon'ifil'
Keyboard Layout Icon'kfil'
Sound File Icon'sfil'
System Suitcase Icon'zsys'
Trash Icon'trsh'
True Type Font Icon'tfil'
Internet locationsCode
Internet Location Generic Icon'ilge'
Internet Location HTTP Icon'ilht'
Internet Location FTP Icon'ilft'
Internet Location File Icon'ilfi'
Internet Location Mail Icon'ilma'
Internet Location News Icon'ilnw'
FoldersCode
Generic Folder Icon'fldr'
Drop Folder Icon'dbox'
Mounted Folder Icon'mntd'
Open Folder Icon'ofld'
Owned Folder Icon'ownd'
Private Folder Icon'prvf'
Shared Folder Icon'shfl'
Users and Groups iconsCode
User Folder Icon'ufld'
Workgroup Folder Icon'wfld'
Guest User Icon'gusr'
User Icon'user'
Owner Icon'susr'
Group Icon'grup'
Special foldersCode
Applications Folder Icon'apps'
Application Support Folder Icon'asup'
Color Sync Folder Icon'prof'
Contextual Menu Items Folder Icon'cmnu'
Documents Folder Icon'docs'
Extensions Folder Icon'extn'
Favorites Folder Icon'favs'
Fonts Folder Icon'font'
Public Folder Icon'pubf'
Recent Documents Folder Icon'rdoc'
System Folder Icon'macs'
Alert iconsCode
Alert Note Icon'note'
Alert Caution Icon'caut'
Alert Stop Icon'stop'
MiscellaneousCode
Apple Logo Icon'capl'
Apple Menu Icon'sapl'
Backward Arrow Icon'baro'
Forward Arrow Icon'faro'
Grid Icon'grid'
Help Icon'help'
Locked Icon'lock'
No Files Icon'nfil'
No Folder Icon'nfld'
No Write Icon'nwrt'
Recent Items Icon'rcnt'
Shortcut Icon'shrt'
Unlocked Icon'ulck'
Connect To Icon'cnct'
Generic Window Icon'gwin'
Question Mark Icon'ques'
Eject Media Icon'ejec'
Burning Icon'burn'
Right Container Arrow Icon'rcar'


Last updated 2019-10-17 13:29:42