Arbortext Command Language > Functions by Alphabetical Listing > oid_set_icon
  
oid_set_icon
oid_set_icon (oid, icon[, index])
This function sets the display icon that appears to the left of the specified oid. The icons appear in the Document Map and also appear in the Edit window. However, whether the icons appear in the Edit window is dependent on the settings of the set showiconsfulltags, set showiconspartialtags, and set showiconsnotags commands.
Specify the icon by specifying one of the supported icon names or by specifying a path and file name to a .bmp. If an invalid display icon is set, the built-in icon None will be displayed.
Specify a .bmp file using either a full or relative path. If you use a relative path, the graphicspath is searched. You can save icons in .bmp files in the Arbortext-path\custom\graphics directory. Icon graphics should have the BMP transparency set to pink. If the .bmp file is not found, then the behavior is as though no file was specified. The number of unique icons specified using a .bmp file are limited to 200. If this limit is reached, additional specified .bmp files behave as though no file was specified. If the .bmp is not found, the built-in icon None will be displayed.
You can use the icon names listed in the following table, which are case sensitive.
Available icon names
Name
Icon
Default use
Attribute
This is an image of a yellow-filled start tag and a magnifying glass
Indicates that an element has attributes assigned to it.
BadAttribute
This is an image of a yellow-filled start tag and a magnifying glass with an A in it on top of the start tag, with a red line through both.
Indicates that an element has attributes assigned to it and at least one of those attributes is not legal for the current document type definition.
BadElement
This is an image of a grayed box with lines in it with a red cross through it.
Indicates an element whose element name is not legal for the current document type definition.
CheckedOut
This is an image of a yellow padlock.
Indicates a document object accessed by a Repository Adapter is locked or checked out by the current user.
Comment
This is an image of a yellow speech bubble
Indicates a comment element.
Contracted
This is an image of a plus sign in a square.
Indicates that the element's contents are collapsed and hidden from view.
DataMarkedSection
This is an image of a blue check mark in a square.
Indicates that an SGML element is part of a data Marked Section
DocObject
This is an image of three-dimensional block.
Indicates a document object accessed by a Repository Adapter that is neither locked nor checked out.
Document
This is an image of a portrait page with the top-right corner turned down.
Indicates a document.
Element
This is an image of a rectangle with lines in it.
Indicates an SGML or XML element.
Empty
This is an image of a gray rectangle.
Indicates an element with no content.
End
This is an image of a gray left-pointing arrow.
Indicates an end tag.
Equation
This is an image of a square root sign with an alpha symbol in it.
Indicates an equation element.
Expanded
This is an image of a minus sign in a square.
Indicates that the element's contents are expanded for viewing.
FileEntity
This is an image of a yellow file cabinet.
Indicates a referenced file entity.
Graphic
This is an image of a yellow triangle, a blue square, and a gray circle.
Indicates a graphic element.
GrayCheckedOut
This is an image of a gray key.
Indicates a document object accessed from a Repository Adapter that is locked or checked out by the current user but is unavailable.
GrayDocObject
This is an image of a gray, three-dimensional box.
Indicates a document object accessed from a Repository Adapter that is neither locked nor checked out by the current user and is unavailable.
GrayLocked
This is an image of a gray lock.
Indicates a document object accessed from a Repository Adapter that is locked or checked out by another user and is unavailable.
IgnoreMarkedSection
This is an image of a yellow check mark.
Indicates that an SGML element is part of an ignored Marked Section
Locked
This is an image of a yellow lock.
Indicates a document object accessed by a Repository Adapter is locked or checked out by another user.
Missing
This is an image of a question mark in a yellow box.
Indicates where a required element is missing.
None
No icon displayed.
ReadOnly
This is an image of a gray octagon with a yellow pencil over the top of it with a black line through the pencil.
Indicates a element that is not editable.
Table
This is an image of a grid with a blue header.
Indicates a table element.
An element can have one or two icons associated with it. The index parameter may be set to 1 or 2 to set the first or second icon, respectively. If index is omitted, then the first icon is set.
If the specified oid is invalid or index is something other than 1 or 2, the function returns a zero (0).
Otherwise, this function returns a one (1). If you specify an invalid icontype, the element is given an icon of None and the function still returns a one (1).
The following example sets the icon for the oid to the left of the cursor to the Locked icon.
$ret = oid_set_icon(oid_current_tag(),"Locked")
Related Topics
oid_get_icon function
Document Map icons