IconMarker
Deprecated. Do not use in new code.
Description: | Creates the question mark and exclamation mark graphics, used to indicate questionable and manual data in a widget. This module places a set of icons on the screen centered over a given rectangular region. The icon displayed is cycled with each passage of the period, measured in seconds |
Returns: | Nothing |
Usage: | Steady State only. |
Function Groups: | Graphics |
Related to: | GetXformRefBox | Scale | TagIconMarker |
Format: | IconMarker(Left, Bottom, Right, Top, Period, Mode, SizeX, SizeY, IconArray) |
Parameters: |
Left, Bottom, Right and Top | ||||||||||||||
Are numeric expressions providing the bounds of the graphic to mark. The symbol will appear in the center of this area. | ||||||||||||||
Period | ||||||||||||||
A numeric expression setting the period (in seconds) at which the symbol is changed | ||||||||||||||
Mode | ||||||||||||||
A numeric expression indicating the symbol to display according to the following table
|
SizeX |
A numeric expression providing the horizontal extent of the symbols to display |
SizeY |
A numeric expression providing the vertical extent of the symbols to display. |
IconArray |
The array of images to display. This must be a variable - use of the "Invalid" keyword or a constant here will cause the module to fail. The value of this variable is discarded for mode values less than 5. |
Examples:
To load an image into IconArray for use with mode 5, you might use code similar to the following. The image should be 12 x 12 pixels.
CIcon = 0; IconArray[CIcon] = PickValid(MakeBitmap("BitmapName.bmp", 1), \IMStandardArrays[3][0]); { Color 1 is set as transparent }
To use IconMarker in a tag widget, you must check the value of the tag's questionable and manual data parameters. The code may be similar to the following.
(example taken from the TopBar widget. Note that in this example, the vertical position of the icon changes with size of the TopBar.)
Call(Variable((PickValid(\Questionable, 0) || Valid(\ManualValue))?("IconMarker"):(Invalid)), GetXFormRefBox(Self(), 0), GetXFormRefBox(Self(), 1), GetXFormRefBox(Self(), 2), Scale(SVal, SMin, SMax, GetXFormRefBox(Self(), 1), GetXFormRefBox(Self(), 3)), 1, ((PickValid(\Questionable, 0))?(1):(0)) + ((Valid(\ManualValue))?(2):(0)), 12, 12, MarkList);
(MarkList is a variable declared in the widget as a holder for the markings.)