:Revision=22
:html
<<
128.154
Screen-object|Screen
--
The IP-object <!RW>Screen and its subobjects form a user interface (for tester or repairer) that can be freely defined.

<h4>New in Revision 21</h4>
<a href="128.154.10">Screen.Curve</a>
>>

<<
128.154.1
Functions of the Screen-Object|Functions
--
>>
<<
128.154.1.1
Screen.LastButton|LastButton
--
<!DEF>
function <!TW>Screen.LastButton : real;
<!TXT>
Returns the code of the last button pressed.

Buttons defined with <!RW>Screen.Button.Show return their number.
Userdefined buttons return their return code defined in the basic setup.
<!STBL>
<tr bgcolor=f0f0f0><td>Step OK<!>-1<!>
<!>Step Fail<!>-2<!>
<!>Test OK<!>-3<!>
<!>Test Fail<!>-4<!>
<!>PLUS<!>-5<!>
<!>MINUS<!>-6<!>
<!ETBL>

If none of the buttons was pressed since the last call 0 is indicated.
Every press is only returned once.

<!CODE>
repeat
  rButton:=Screen.Lastbutton;
until stepcontinue or (rButton<>0);

case rButton of
  ...
<!TXT>
>>
<<
128.154.1.2
Screen.Width|Width
--
<!DEF>
function <!TW>Screen.Width : real;
<!TXT>
Returns the width of the window area used by the <!RW>Screen object in Pixels.

The return value is only valid, if <!RW>Screen.Show has been called.
>>
<<
128.154.1.3
Screen.Height|Height
--
<!DEF>
function <!TW>Screen.Height : real;
<!TXT>
Returns the height of the window area used by the <!RW>Screen object in Pixels.

The return value is only valid, if <!RW>Screen.Show has been called.
>>

<<
128.154.2
Procedures of the Screen-Object|Procedures
--
>>
<<
128.154.2.1
Screen.Show|Show
--
<!DEF>
procedure <!TW>Screen.Show;
<!TXT>
Opens and shows the user defined screen.
>>
<<
128.154.2.2
Screen.Hide|Hide
--
<!DEF>
procedure <!TW>Screen.Hide;
<!TXT>
Hides the user defined screen. All the settings remain as they are!
>>
<<
128.154.2.3
Screen.ClrScr|ClrScr
--
<!DEF>
procedure <!TW>Screen.ClrScr;
<!TXT>
Hides all the objects and resets them to default value.

The definitions and the fonts are lost.
>>
<<
128.154.2.4
Screen.SetFont|SetFont
--
<!DEF>
procedure <!TW>Screen.SetFont (rSize : real [; sFontName : string]);
<!TXT>
Sets the font of all the elements to the specified size and if specified, to the corresponding True-Type-Font.
>>
<<
128.154.2.5
Screen.Play|Play
--
<!DEF>
procedure <!TW>Screen.Play (sFileName : string);
<!TXT>
Plays the WAV-File with the name <!PW>sFileName. 

If no file type is specified, the '.WAV' is used.

If no directory is specified, the type data directory is used.
<!PW>sFilename can contain directory templates.
>>

<<
128.154.2.7
Screen.SetColor|SetColor
!128.154.9
--
<!DEF>
procedure <!TW>Screen.SetColor (rColor : real);
<!TXT>
Sets the font colour of all elements to the specified colour (0..15 = DOS-colour code, otherwise RGB-triplet$BBGGRR).
>>


<<
128.154.2.8
Screen.SetTab|SetTab
--
<!DEF>
procedure <!TW>Screen.SetTab (rTab : real);
<!TXT>
Set the defined tab in the test window and stopps all automatic tab changes. 1 is the first tab, 2 the second and so on. But attention, if a none visible tab is choosed, then automaticly the first tab will be selected. With 0 the automaticly tab changes are switched on again.


<!STBL>
<tr ><td>Automatic Tab selection<!>0<!>
<!>Tab Test step output<!>1<!>
<!>Tab Executed test steps<!>2<!>
<!>Tab Debugging<!>3<!>
<!>Tab Measurement values<!>4<!>
<!ETBL>
>>

<<
128.154.3
Screen.Bitmap|Bitmap
--
>>
<<
128.154.3.1
Screen.Bitmap.Show|Show
--
<!DEF>
procedure <!TW>Screen.Bitmap.Show (rNr, rX, rY : real; sFileName : string [; rMode, rW, rH : real]);
<!TXT>
Displays the BMP-file <!PW>sFilename as Bitmap <!PW>rNr (1..4) in the position <!PW>rX, <!PW>rY.

If no file type is specified, then '.BMP' is used; if no directory is specified, the type data directory is used. <!PW>sFilename can contain directory templates.

Optionally, <!PW>rMode can select the representation mode:
<!STBL>
<!>0<!>simple (default)<!>
<!>1<!>stretched<!>
<!>2<!>centered<!>
<!>3<!>fitted<!>
<!>4<!>integer fitted<!>
<!>5<!>tiled<!>
<!ETBL>
For all the values except 0, <!PW>rW and <!PW>rH are used as new
width / height. In case of <!PW>rMode=0 they will be ignored, but they still must be specified.

If 128 is added to the <!PW>rMode, one color of the bitmap is displayed transparently. All pixels which have the same color as the left lower pixel of the bitmap will not be displayed. The background shows through there. As a matter of principle, JPG-files should not be transparent when displayed, since the lossy compression of the picture can lead to minimal, normally not visible color shifts. Thus the pixels which had identical colors at the time of the image compression may differ from each other after the file is loaded so not all the pixels will be as transparent as wanted. Such images should be saved as BMP.

<!DEF>
procedure <!TW>Screen.Bitmap.Show (rNr : real);
<!TXT>
Shows the Bitmap <!PW>rNr (1..4) again. It works only if the Bitmap has been previously provided with parameters, otherwise it is ignored.
>>

<<
128.154.3.2
Screen.Bitmap.Hide|Hide
--
<!DEF>
procedure <!TW>Screen.Bitmap.Hide (rNr : real);
<!TXT>
Hide Bitmap <!PW>rNr (1..4).

If <!PW>rNr=0, all the Bitmaps are hidden.
>>

<<
128.154.4
Screen.Label|Label
--
>>
<<
128.154.4.1
Screen.Label.Show|Show
--
<!DEF>
procedure <!TW>Screen.Label.Show (rNr, rX, rY : real; sText : string [; rWidth [, rAlign] : real]);
<!TXT>
Shows the content of <!PW>sText in the label <!PW>rNr (1..50) at the position <!PW>rX, <!PW>rY.

Optionally, the width can be specified and in addition also the alignment of the text.

<!STBL>
<!+>rAlign</b><!><b>Result</b><!>
<!c>0<!>left justified<!>
<!c>1<!>centered<!>
<!c>2 <!>right justified<!>
<!ETBL>

<!DEF>
procedure <!TW>Screen.Label.Show (rNr : real);
<!TXT>
Shows again the label <!PW>rNr (1..50). It works only if the label has been previously provided with parameters, otherwise it is ignored.

<!DEF>
procedure <!TW>Screen.Label.Show (rNr, rVisible : real);
<!TXT>
Makes the label <!PW>rNr visible or invisible depending on <!PW>rVisible.

Works like:
<!CODE>
if rVisible then begin
  Screen.Label.Show (rNr);
end
else begin
  Screen.Label.Hide (rNr);
end;
<!TXT>
>>
<<
128.154.4.2
Screen.Label.Hide|Hide
--
<!DEF>
procedure <!TW>Screen.Label.Hide (rNr : real);
<!TXT>
Hides the label <!PW>rNr (1..50).

If <!PW>rNr=0, then all the labels are hidden.
>>
<<
128.154.4.3
Screen.Label.SetFont|SetFont
--
<!DEF>
procedure <!TW>Screen.Label.SetFont (rNr, rSize : real [; sFontName : string]);
<!TXT>
Sets the font of the label <!PW>rNr (1..50) to the specified size and if specified, to the corresponding True-Type-Font.
>>
<<
128.154.4.7
Screen.Label.SetColor|SetColor
!128.154.9
!128.154.4.7
--
<!DEF>
procedure <!TW>Screen.Label.SetColor (rNr, rColor : real);
<!TXT>
Sets the font color of the label rNr (1..50) to the specified color (0..15 = DOS-color code, otherwise RGB-triplet $BBGGRR).
>>
<<
128.154.4.8
Screen.Label.SetText|SetText
!128.154.4.7
--
<!DEF>
procedure <!TW>Screen.Label.SetText (rNr : real; sNewText : string);
<!TXT>
Sets the caption of the label rNr (1..50) to the specified new text.
>>
<<
128.154.5
Screen.Button|Button
--
>>
<<
128.154.5.1
Screen.Button.Show|Show
--
<!DEF>
procedure <!TW>Screen.Button.Show (rNr, rX, rY : real; sText : string [; rWidth [, rAlign [, rHeight [, FKey]]] : real]);
<!TXT>
Shows the button <!PW>rNr (1..256) with the label <!PW>sText at the position <!PW>rX, <!PW>rY.

The width can be specified optionally and in addition the alignment of the text.

<!STBL>
<!+>rAlign</b><!><b>Result</b><!>
<!c>0<!>left justified<!>
<!c>1<!>centered<!>
<!c>2 <!>right justified<!>
<!ETBL>

The height specification is also optional.

<!DEF>
procedure <!TW>Screen.Button.Show (rNr : real);
<!TXT>
Shows again the button <!PW>rNr (1..256). It works only if the label has been previously provided with parameters, otherwise it is ignored.

<!DEF>
procedure <!TW>Screen.Button.Show (rNr, rVisible : real);
<!TXT>
Makes the label <!PW>rNr visible or invisible depending on <!PW>rVisible.

Works like:
<!CODE>
if rVisible then begin
  Screen.Button.Show (rNr);
end
else begin
  Screen.Button.Hide (rNr);
end;
<!TXT>
>>
<<
128.154.5.2
Screen.Button.Hide|Hide
--
<!DEF>
procedure <!TW>Screen.Button.Hide (rNr : real);
<!TXT>
Hide the button <!PW>rNr (1..256).

If <!PW>rNr=0, then all the buttons are hidden.
>>
<<
128.154.5.3
Screen.Button.SetFont|SetFont
--
<!DEF>
procedure <!TW>Screen.Button.SetFont (rNr, rSize : real [; sFontName : string]);
<!TXT>
Sets the font of the button <!PW>rNr (1..256) to the specified size and if specified, to the corresponding True-Type-Font.
>>
<<
128.154.5.4
Screen.Button.SetColor|SetColor
!128.154.9
--
<!DEF>
procedure <!TW>Screen.Button.SetColor (rNr, rColor [, rBackCol [, rOpacity]] : real);
<!TXT>
Sets the font color of the button <!PW>rNr (1..256) to the specified color <!PW>rColor .

If specified, the background color of the button is set to <!PW>rBackCol.

 <!PW>rOpacity (0..100) allows the color selected with <!PW>rBackCol to be mixed with the normal background color of the button. 0 means that only the normal background color appears, 100 means only the color selected with <!PW>rBackCol appears. Default is 100.
>>
<<
128.154.5.5
Screen.Button.Enable|Enable
--
<!DEF>
procedure <!TW>Screen.Button.Enable (rNr, rEnabled : real);
<!TXT>
Makes the button <!PW>rNr (1..256) active or inactive, depending of <!PW>rEnabled (true/false).

Does not change the visibility of the button!
>>
<<
128.154.5.6
Screen.Button.Activate|Activate
--
<!DEF>
procedure <!TW>Screen.Button.Activate (rNr : real);
<!TXT>
Sets the focus to the button <!PW>rNr (1..256). The button can now be 'pressed' with the space bar or the return key.

Nothing happens, if the button is disabled or invisible.
>>

<<
128.154.6
Screen.ProgBar|ProgBar
--
>>
<<
128.154.6.1
Screen.ProgBar.Show|Show
--
<!DEF>
procedure <!TW>Screen.ProgBar.Show (rNr, rX, rY, rWidth, rHeight : real);
<!TXT>
Shows the progressbar <!PW>rNr (1..5) at the position <!PW>rX, <!PW>rY, width is <!PW>rWidth, height is <!PW>rHeight.

<!DEF>
procedure <!TW>Screen.ProgBar.Show (rNr : real);
<!TXT>
Shows the progressbar <!PW>rNr (1..5) again. It works only if the progressbar has been previously provided with parameters, otherwise it is ignored.
>>
<<
128.154.6.2
Screen.ProgBar.Hide|Hide
--
<!DEF>
procedure <!TW>Screen.ProgBar.Hide (rNr : real);
<!TXT>
Hide the progressbar <!PW>rNr (1..5).

If <!PW>rNr=0, then all progressbars are hidden.
>>
<<
128.154.6.3
Screen.ProgBar.Set|Set
--
<!DEF>
procedure <!TW>Screen.ProgBar.Set (rNr, rPos : real);
<!TXT>
Sets the progressbar <!PW>rNr to position <!PW>rPos (0..100).
>>

<<
128.154.7
Screen.Edit|Edit
--
>>
<<
128.154.7.1
Screen.Edit.Show|Show
--
<!DEF>
procedure <!TW>Screen.Edit.Show (rNr, rX, rY [, rWidth [, rHeight]] : real);
<!TXT>
Shows the input field <!PW>rNr (1..20) at the position <!PW>rX, <!PW>rY.

The width and the height can be specified optionally.

<!DEF>
procedure <!TW>Screen.Edit.Show (rNr : real);
<!TXT>
Shows the input field <!PW>rNr (1..20) again. It works only if the input field has been previously provided with parameters, otherwise it is ignored.
>>

<<
128.154.7.2
Screen.Edit.Hide|Hide
--
<!DEF>
procedure <!TW>Screen.Edit.Hide (rNr : real);
<!TXT>
Hide input field <!PW>rNr (1..20).

If <!PW>rNr=0, then all the fields are hidden.
>>
<<
128.154.7.3
Screen.Edit.Setup|Setup
--
<!DEF>
procedure <!TW>Screen.Edit.Setup (rNr, rMaxLen : real: sChars : string; rFlags : real);
<!TXT>
Defines the options for the input field <!PW>rNr (1..20).

 <!PW>rMaxLen :
Maximum length of the input (0=no limitations)

 <!PW>sChars :
Permitted charcaters in the input.
Mention all the characters individually ('1234567890ABCDEF') or abbreviate the sequences with '..' ('0..9A..F'). '' = all characters.

 <!PW>rFlags :
Combination of the following bit values:
<!STBL>
<!+>Value<!+>Meaning<!>
<!c>1<!>Transform lower case into upper case<!>
<!c>2<!>Hide characters (*** for password input)<!>
<!c>4<!>ReadOnly - the modification of the content is not possible<br>
the background is grey instead of white<!>
>>
<<
128.154.7.4
Screen.Edit.SetFont|SetFont
--
<!DEF>
procedure <!TW>Screen.Edit.SetFont (rNr, rSize : real [; sFontName : string]);
<!TXT>
Sets the font of the input field <!PW>rNr (1..20) to the specified size and, if specified, to the corresponding True-Type-Font.
>>
<<
128.154.7.5
Screen.Edit.SetText|SetText
--
<!DEF>
procedure <!TW>Screen.Edit.SetText (rNr : real; sText : string);
<!TXT>
Defines the content of the input field <!PW>rNr (1..20).

<!REM>
Attention: 
Characters which are not included in the allowed charactersfor user  input can be also set!
<!TXT>
>>
<<
128.154.7.6
Screen.Edit.GetText|GetText
--
<!DEF>
function <!TW>Screen.Edit.GetText (rNr : real) : string;
<!TXT>
Gets the content of the input field <!PW>rNr (1..20).
>>
<<
128.154.7.7
Screen.Edit.Activate|Activate
--
<!DEF>
procedure <!TW>Screen.Edit.Activate (rNr : real);
<!TXT>
Sets the focus to the input field rNr (1..20).
>>
<<
128.154.7.8
Screen.Edit.Enable|Enable
--
<!DEF>
procedure <!TW>Screen.Edit.Enable (rNr, rEnabled : real);
<!TXT>
Makes the input field button <!PW>rNr active or inactive depending on <!PW>rEnabled (<!RW>true/<!RW>false).

Does not change the visibility of the field!

For inactive input fields (<!PW>rEnabled=<!RW>false) the content is shown with the inactive font color (grey).
>>
<<
128.154.8
Screen.Frame|Frame
--
>>
<<
128.154.8.1
Screen.Frame.Show|Show
!128.154.9
--
<!DEF>
procedure <!TW>Screen.Frame.Show (rNr, rState [, rColor [, rX, rY, rW, rH [, rStyle [, rInner]]]] : real );
<!TXT>
Shows or hides a frame.

 <!PW>rNr - Number of the frame (1..50)

 <!PW>rState - status of the frame 0=off, 1=on, 2=flashing

 <!PW>rColor - color of the frame (DOS-color codes 0=black..15=white) or color in RGB format ($BBGGRR)

 <!PW>rX, <!PW>rY- position of the left upper corner in pixels
 <!PW>rW, <!PW>rH - width, height in pixels

 <!PW>rStyle - Style of the frame :
<!STBL>
<!>0<!>rectangle<br><!REM>reduced flickering of the background when flashing<!TXT><!>
<!>1<!>square<!>
<!>2<!>rounded rectangle<!>
<!>3<!>rounded square<!>
<!>4<!>ellipse<!>
<!>5<!>circle<!>
<!ETBL>

 <!PW>rInner - color of the interior
<!STBL>
<!c>-2<!>the interior is transparent<!>
<!c>-1<!>the interior is filled with the color of the frame; if the color of the frame is changed, the color of the interior changes as well<!>
<!c>&gt;=0<!>color code of the interior <!>
<!ETBL>

Examples
<!CODE>
// show the filled circle in orange
Screen.Frame.Show (1, 1, $0080FF, 100, 100, 20, 20, 4, -1);

// hide frame
Screen.Frame.Show (1, 0);

// let the frame flash and set the color to DOS-yellow
Screen.Frame.Show (1, 2, 14);
<!TXT>
>>
<<
128.154.8.2
Screen.Frame.Hide|Hide
--
<!DEF>
procedure <!TW>Screen.Frame.Hide (rNr: real);
<!TXT>
Hides the frame <!PW>rNr (1..50).

If <!PW>rNr=0, then all the frames are hidden.
>>
<<
128.154.9
Color codes (RGB-triplet and DOS)|Color codes
--
The Screen-IP-Objects use standard colors as RGB-triplet.
The assigned value is interpreted as 24 Bit integer value.
The least significant byte gives the intensity of red, the medium byte the intensity of green and the most significant byte gives the intensity of blue. Anytime in the gradation of 255=full intensity until 0=no more ratio of this color.

The most convenient way to write colors as RGB-triplet is to write them as Hex-numbers, because this way single bytes can be easily recognised :

<!STBL>
<!+>RGB Code</b></td><td colspan=2>Farbe<!>
<!c><tt>$<font color=#0000aa>00</font><font color=#00aa00>00</font><font color=#aa0000>00</font></tt></td><td bgcolor=#000000><font color=#000000>testtest</font><!>black (neither blue, nor green nor red)<!>
<!c><tt>$<font color=#0000aa>FF</font><font color=#00aa00>FF</font><font color=#aa0000>FF</font></tt></td><td bgcolor=#ffffff><font color=#ffffff>testtest</font><!>white (all colors with full intensity)<!>
<!c><tt>$<font color=#0000aa>FF</font><font color=#00aa00>00</font><font color=#aa0000>00</font></tt></td><td bgcolor=#0000ff><font color=#0000ff>testtest</font><!>pure blue<!>
<!c><tt>$<font color=#0000aa>00</font><font color=#00aa00>FF</font><font color=#aa0000>00</font></tt></td><td bgcolor=#00ff00><font color=#00ff00>testtest</font><!>pure green<!>
<!c><tt>$<font color=#0000aa>00</font><font color=#00aa00>00</font><font color=#aa0000>FF</font></tt></td><td bgcolor=#ff0000><font color=#ff0000>testtest</font><!>pure red<!>
<!c><tt>$<font color=#0000aa>80</font><font color=#00aa00>80</font><font color=#aa0000>80</font></tt></td><td bgcolor=#808080><font color=#808080>testtest</font><!>grea<!>
<!c><tt>$<font color=#0000aa>80</font><font color=#00aa00>FF</font><font color=#aa0000>FF</font></tt></td><td bgcolor=#ffff80><font color=#ffff80>testtest</font><!>light yellow<!>
<!c><tt>$<font color=#0000aa>FF</font><font color=#00aa00>80</font><font color=#aa0000>80</font></tt></td><td bgcolor=#8080ff><font color=#8080ff>testtest</font><!>light blue<!>
<!ETBL>

Exceptions are codes $000001 to $00000F (1 to 15)- the program interprets these color values as DOS-color codes, i.e. instead of the very dark red tones the following colors are generated:

<!STBL>
<tr bgcolor=f0f0f0 align=center><td colspan=2>Colorcode</td><td rowspan=2>DOS-<br>Color</td><td rowspan=2>created<br>color triplet</td><td rowspan=2>Color<!>
<tr align=center><td>Hex<!>Dez<!>
<tr align=center><td>$0<!>0</td><td align=left>black<!><tt>$<font color=#0000aa>00</font><font color=#00aa00>00</font><font color=#aa0000>00</font></tt></td><td bgcolor=#000000><font color=#000000>testtest</font><!>
<tr align=center><td>$1<!>1</td><td align=left>blue<!><tt>$<font color=#0000aa>B0</font><font color=#00aa00>00</font><font color=#aa0000>00</font></tt></td><td bgcolor=#0000B0><font color=#0000B0>testtest</font><!>
<tr align=center><td>$2<!>2</td><td align=left>green<!><tt>$<font color=#0000aa>00</font><font color=#00aa00>B0</font><font color=#aa0000>00</font></tt></td><td bgcolor=#00B000><font color=#00B000>testtest</font><!>
<tr align=center><td>$3<!>3</td><td align=left>cyan<!><tt>$<font color=#0000aa>B0</font><font color=#00aa00>B0</font><font color=#aa0000>00</font></tt></td><td bgcolor=#00B0B0><font color=#00B0B0>testtest</font><!>
<tr align=center><td>$4<!>4</td><td align=left>red<!><tt>$<font color=#0000aa>00</font><font color=#00aa00>00</font><font color=#aa0000>B0</font></tt></td><td bgcolor=#B00000><font color=#B00000>testtest</font><!>
<tr align=center><td>$5<!>5</td><td align=left>magenta<!><tt>$<font color=#0000aa>B0</font><font color=#00aa00>00</font><font color=#aa0000>B0</font></tt></td><td bgcolor=#B000B0><font color=#B000B0>testtest</font><!>
<tr align=center><td>$6<!>6</td><td align=left>brown<!><tt>$<font color=#0000aa>00</font><font color=#00aa00>90</font><font color=#aa0000>C0</font></tt></td><td bgcolor=#C09000><font color=#C09000>testtest</font><!>
<tr align=center><td>$7<!>7</td><td align=left>light grey<!><tt>$<font color=#0000aa>C0</font><font color=#00aa00>C0</font><font color=#aa0000>C0</font></tt></td><td bgcolor=#C0C0C0><font color=#C0C0C0>testtest</font><!>
<tr align=center><td>$8<!>8</td><td align=left>grey<!><tt>$<font color=#0000aa>60</font><font color=#00aa00>60</font><font color=#aa0000>60</font></tt></td><td bgcolor=#606060><font color=#606060>testtest</font><!>
<tr align=center><td>$9<!>9</td><td align=left>light blue<!><tt>$<font color=#0000aa>FF</font><font color=#00aa00>60</font><font color=#aa0000>60</font></tt></td><td bgcolor=#6060FF><font color=#6060FF>testtest</font><!>
<tr align=center><td>$A<!>10</td><td align=left>light green<!><tt>$<font color=#0000aa>60</font><font color=#00aa00>FF</font><font color=#aa0000>60</font></tt></td><td bgcolor=#60FF60><font color=#60FF60>testtest</font><!>
<tr align=center><td>$B<!>11</td><td align=left>light cyan<!><tt>$<font color=#0000aa>FF</font><font color=#00aa00>FF</font><font color=#aa0000>60</font></tt></td><td bgcolor=#60FFFF><font color=#60FFFF>testtest</font><!>
<tr align=center><td>$C<!>12</td><td align=left>light red<!><tt>$<font color=#0000aa>60</font><font color=#00aa00>60</font><font color=#aa0000>FF</font></tt></td><td bgcolor=#FF6060><font color=#FF6060>testtest</font><!>
<tr align=center><td>$D<!>13</td><td align=left>light magenta<!><tt>$<font color=#0000aa>FF</font><font color=#00aa00>60</font><font color=#aa0000>FF</font></tt></td><td bgcolor=#FF60FF><font color=#FF60FF>testtest</font><!>
<tr align=center><td>$E<!>14</td><td align=left>yellow<!><tt>$<font color=#0000aa>60</font><font color=#00aa00>FF</font><font color=#aa0000>FF</font></tt></td><td bgcolor=#FFFF60><font color=#FFFF60>testtest</font><!>
<tr align=center><td>$F<!>15</td><td align=left>white<!><tt>$<font color=#0000aa>FF</font><font color=#00aa00>FF</font><font color=#aa0000>FF</font></tt></td><td bgcolor=#FFFFFF><font color=#FFFFFF>testtest</font><!>
<!ETBL>

The RGB-triplet syntax is similar to the HTML-syntax for RGB-colors, but here, the blue and the red byte are swapped: $<font color=#0000aa>12</font><font color=#00aa00>34</font><font color=#aa0000>56</font> is equivalent to #<font color=#aa0000>56</font><font color=#00aa00>34</font><font color=#0000aa>12</font> !)
>>
<<
128.154.10
Screen.Curve|Curve
--
>>
<<
128.154.10.1
Screen.Curve.Show|Show
--
<!DEF>
procedure <!TW>Screen.Curve.Show (rNr, rCurveSet, rX, rY, rWidth, rHeight : real);
<!TXT>
Shows the Curve Display <!PW>rNr (has to be 1) with the curve set<!PW>rCurveSet (has to be 1) at the coordinates <!PW>rX, <!PW>rY and the size <!PW>rWidth, <!PW>rHeight.

The curve display works just like the curve monitor, just without the interactive handling and inside the display area of the IP Screen Object.

To display a curve set call first this function and then Curve.Setup to create or change the curve. Any change in the curve set wil be reflected in the curve display.

For performance reasons, show the curve display (as well as the curve monitor) only when necessary..
>>
<<
128.154.10.2
Screen.Curve.Hide|Hide
--
<!DEF>
procedure <!TW>Screen.Curve.Hide (rNr : real);
<!TXT>
Hide the curve display <!PW>rNr (1..1).

if <!PW>rNr=0, all curve displays will be hidden.
>>

<<
128.154.11
Screen.Dialog|Dialog
--
The dialog functionality has been enhanced. The properties of the dialog window can be modified by sub functions. The old procedure <!RW>Screen.Dialog is still working and acts now like a combined version of several  <!RW>Screen.Dialog.xxx calls.

<!DEF>
procedure <!TW>Screen.Dialog (rArt : real; sTitle, sText [, sText ... ] : string)
<!TXT>
Displays a window dialog box with an OK-button with <!PW>sTitle as caption and the string(s) <!PW>sText as message lines.

<!PW>rArt controls the type of dialog:
<!STBL>
<!>0<!>no icon<!>
<!>1<!>Information<!>
<!>2<!>Warning<!>
<!>3<!>Question<!>
<!>4<!>Error<!>
<!ETBL>

The dialog box is visible (and the step is stopped) until the OK-button is pressed. The dialog is <!SW>modal.

The <!RW>Screen.Dialog procedure is <i>similar</i> to this code:
<!CODE>
Screen.Dialog.Reset;
Screen.Dialog.SetText (sDialogTitle, sText, ...);
Screen.Dialog.SetBitmap (':'+Str(rArt));
Screen.Dialog.Show (true);
<!TXT>

In reality the short form call produces a completelly independant window.
The properties of the free definable dialog will not be changed.

It's even possible to have two dialogs on the screen in the same moment:
<!CODE>
Screen.Dialog.Reset;
Screen.Dialog.Button ('');
Screen.Dialog.SetText ('Dialog 1', 'Not modal');
Screen.Dialog.Show (false, 2, 0, 0);    // show first dialog not modal

Screen.Dialog (0, 'Dialog 2', 'Modal'); // show second dialog modal

Screen.Dialog.Hide;                     // hide first dialog
<!TXT>
>>

<<
128.154.11.1
Screen.Dialog.Reset|Reset
--
<!DEF>
procedure <!TW>Screen.Dialog.Reset;
<!TXT>
Resets all dialog properties to their default values.

A visible non modal dialog will be hidden.

Works like the following code:
<!CODE>
  Screen.Dialog.Hide;
  Screen.Dialog.SetColor (0, 0);
  Screen.Dialog.Button   ('OK', 1, 0, 75, true);
  Screen.Dialog.SetFont  (8, 'MS Sans Serif', 0, '');
  Screen.Dialog.Bitmap   ('');
  Screen.Dialog.SetText  ('', '');
<!TXT>
>>
        
<<
128.154.11.2
Screen.Dialog.SetColor|SetColor
--
<!DEF>
procedure <!TW>Screen.Dialog.SetColor (rColor [, rOpacity] : real);
<!TXT>
 <!PW>rColor is a <a href="128.154.9">Color Code</a> and defines the background color.

 <!PW>rOpacity controls, how the color is mixed with the normal background color. 0 means always use the normal background color; 100 means, alway use the color defined by <!PW>rColor.

The procedure does not affect a visible dialog.
>>

<<
128.154.11.3
Screen.Dialog.SetText|SetText
--
<!DEF>
procedure <!TW>Screen.Dialog.SetText (sTitle, sText [, sText ...] : string);
<!TXT>
Defines dialog title and text. The first string will be the dialog title and the folowing strings will form the text of the dialog.

The procedure does not affect a visible dialog.
>>

<<
128.154.11.4
Screen.Dialog.SetFont|SetFont
--
<!DEF>
procedure <!TW>Screen.Dialog.SetFont (rSize : real [; sName : string [; rColor : real [; sStyle : string]]]);
<!TXT>
Defines the font to be used for the text and the buttons. The font of the dialog title can't be changed.

 <!PW>rSize select the size in pixels. If 0 if given, the size will not be changed.

 <!PW>sName selects the name of the font face. If '' is given, the font face will not be changed.

 <!PW>rColor is a (<a href="128.154.9">color code</a>) and selects the color of the font. -1 is the default font color and -2 means no change.

 <!PW>sStyle selects the style. The following characters affect the style:

<!STBL>
<!+>character<!+>function<!+>example<!>
<!c>-<!>no change (use alone)<!c><font size=-2 color=#707070>(as before)</font><!>
<!c><font size=-2 color=#707070>(empty string)</font><!>Normal text<!c>Example<!>
<!c>B<!>Bold<!c><b>Example</b><!>
<!c>U<!>Underline<!c><u>Example</u><!>
<!c>I<!>Italic<!c><i>Example</i><!>
<!c>S<!>Strike Through<!c><s>Example</s><!>
<!ETBL>

The characters in <!PW>sStyle may be combined:
<!CODE>
'UB' - <u><b>Underlined + Bold</b></u>
'BI' - <i><b>Bold + Italic</b></i>
'BIUS' - <i><b><u><s>Bold, Italic, Underlined, Strike Through</s></u></b></i>
<!TXT>

The procedure does not affect a visible dialog.
>>

<<
128.154.11.5
Screen.Dialog.Bitmap|Bitmap
--
<!DEF>
procedure <!TW>Screen.Dialog.Bitmap (sFile : string);
<!TXT>
Selects a bitmap for the dalog

 <!PW>sFile is either the name of  bitmap file or one of the following special values:

<!STBL>
<!+>sFile<!+>Result<!>
<!c><font size=-2 color=#707070>(empty string)</font><!>no bitmap<!>
<!c>:0<!>no bitmap<!>
<!c>:1<!>Standard icon Information<!>
<!c>:2<!>Standard icon Warning<!>
<!c>:3<!>Standard icon Question<!>
<!c>:4<!>Standard icon Error<!>
<!ETBL>

A bitmap (if defined) will always be shown in the upper left corner.
>>

<<
128.154.11.6
Screen.Dialog.Button|Button
--
<!DEF>
procedure <!TW>Screen.Dialog.Button (sButtons : string [; rDefault [, rCancel [, rMinWidth [, rSameWidth]]] : real]);
<!TXT>
Defined the buttons of the dialog.

 <!PW>sButtons gives the captions of the buttons, separated by "|". <!PW>sButtons can be empty, in this case the dialog will have no buttons (unless it is a modal dialog - a modal dialog will at least get an 'OK' button)

 <!PW>rDefault defines which button is preselected. The first button is 1, the second 2 and so on. Even if no button is defined the value has to be at least 1. Default is 1.

 <!PW>rCancel defines which button can be pressed with the ESC-key. The first button is 1, the second 2 and so on. If no button should react on the ESC key, specify 0.

 <!PW>rMinWidth defines the minumim width of the buttons in pixel (Default: 75)

 <!PW>rSameWidth selects if all buttons should have the same witdh (<!RW>TRUE) or not (<!RW>FALSE)

The procedure does not affect a visible dialog.
>>

<<
128.154.11.7
Screen.Dialog.Show|Show
--
<!DEF>
procedure <!TW>Screen.Dialog.Show (rModal [, rMode [, rLeft, rTop]] : real);
<!TXT>
Creates a dialog window with the selects properties and displays it.

If a dialog window has been already visible, it will be hidden.

If <!PW>rModal is<!RW>TRUE, the interpreter stops, until a button has been pressed and the dialog will be hidden. If no button has been defined, it will add an 'OK' button in this case.

If <!PW>rModal is <!RW>FALSE, the procedure will return immediately. The dialog remains visible until any button will be pressed oder it is hidden with <!RW>Screen.Dialog.Hide.

 <!PW>rMode selects the position of the dialog
<!STBL>
<!+>rMode<!+>Result<!>
<!c>0<!>centered on the screen<!>
<!c>1<!>centered on the main window<!>
<!c>2<!><!PW>rLeft and <!PW>rTop specifi the left/top corner<!>
<!ETBL>

Directly after <!RW>Screen.Dialog.Show <!RW>Screen.Dialog.LastButton is 0.
>>

<<
128.154.11.7
Screen.Dialog.Hide|Hide
--
<!DEF>
procedure <!TW>Screen.Dialog.Hide;
<!TXT>
Hides a visible dialog.

If no dialog was visible, nothing happens.
>>

<<
128.154.11.8
Screen.Dialog.LastButton|LastButton
--
<!DEF>
functionn <!TW>Screen.Dialog.LastButton;
<!TXT>
Returns the number of the dialog button that was pressed.

If no button was pressed, the result is 0.

The value can requested mor than once and remains unchanged until <!RW>Screen.Dialog.Show is called again.
>>

<<
128.154.12
Screen.Video|Video
--
>>
<<
128.154.12.1
Screen.Video.Show|Show
--
<!DEF>
procedure <!TW>Screen.Video.Show (rNr, rX, rY : real; sFileName : string; rFlags [, rW, rH [, rCX, rCY]] : real );
<!TXT>
Set the properties of the video display <!PW>rNr (has to be 1) and makes it visible.

 <!PW>rX and <!PW>rY are the ccordinates of the left upper corner.

 <!PW>sFileName is the name of the file with the video sequence to be shown (default path: path of actiual type data, default extension: AVI). A Codec has to be installed for the type of video sequenz to be shown.

 <!PW>rFlags is a bit pattern, that controls variuos properties of the display
<!STBL>
<!+>BitNr<!+>Value<!+>Effect<!>
<!c>0<!c>1<!>Show button "Play" - used to start the sequenz<!>
<!c>1<!c>2<!>Show button "Pause" - used to pause the sequenz<!>
<!c>2<!c>4<!>Show button "Stop" - used to stop the sequenz<!>
<!c>3<!c>8<!>Show button "Next" - used to go to the end of the sequenz<!>
<!c>4<!c>16<!>Show button "Prev" - used to go to the begin of the sequenz<!>
<!c>5<!c>32<!>Show button "Step" -  used to go to a step towards the end of the sequenz<!>
<!c>6<!c>64<!>Show button "Back" - used to go to a step towards the begin of the sequenz<!>
<!c>7<!c>128<!>reserved<!>
<!c>8<!c>256<!>reserved<!>
<!c>9<!c>512<!>Auto start - the sequenz will be started immediately<!>
<!c>10<!c>1024<!>Rewind&Replay - sequenz will not stop at the end but restart again<!>
<!ETBL>
If none of the bits 0..6 is set(<!PW>rFlags & 127 = 0), no buttons at all will be shown, the parameter <!PW>rCX and <!PW>rCY will not be used in this case.
Make sure, the reserved bits are allways 0, they might be used in future.

 <!PW>rW and <!PW>rH define the width and height of the display. If these parameter are not given (or -1), the display will use the all the space between the defined upper left corner (<!PW>rX, <!PW>rY) and the lower right corner of the screen area. The video sequenz will be shown always 1:1, and not be scaled to the display area.

 <!PW>rCX and <!PW>rCY define the position (left upper corner) of the buttons. If this parameter is not given (or -1), the buttons will be shown in the left upper corner of the display area.

<!DEF>
procedure <!TW>Screen.Video.Show (rNr : real);
<!TXT>
Makes the video display <!PW>rNr (has to be 1) visible.
The properties of the display have to be set before.

<!CODE>
screen.video.show (1, 4, 4, 'F:\Logo.avi', 1024+7, 320, 200, 4, 204);
<!TXT>
Defines video display 320 pixel wide and 200 pixel high. The left upper corner is at (4|4).
The buttons are shown beneath the display (4|204). The buttons "Play", "Pause" and "Stop" are visible.
The sequenz will be loaded from 'F:Logo.Avi'. The sequenz will be played endlessly, once started.
The sequenz wil NOT be started automatically.
>>

<<
128.154.12.2
Screen.Video.Hide|Hide
--
<!DEF>
procedure <!TW>Screen.Video.Hide (rNr : real);
<!TXT>
Makes the video display <!PW>rNr (has to be 1) invisible.

If <!PW>rNr=0 all video displays will be hidden.
>>

<<
128.154.12.3
Screen.Video.Action|Action
--
<!DEF>
procedure <!TW>Screen.Video.Action (rNr : real, rActionCode : real);
<!TXT>
Starts an action for display <!PW>rNr (has to be 1).

<!PW>rActionCode:


<!STBL>
<!+>Value<!+>Action<!>
<!c>0<!>"Play" - start the sequenz<!>
<!c>1<!>"Pause" - pause the sequenz<!>
<!c>2<!>"Stop" - stop the sequenz<!>
<!c>3<!>"Next" - go to the end of the sequenz<!>
<!c>4<!>"Prev" - go to the begin of the sequenz<!>
<!c>5<!>"Step" -  go to a step towards the end of the sequenz<!>
<!c>6<!>"Back" - go to a step towards the begin of the sequenz<!>
<!ETBL>
>>

<<
128.154.13
Screen.Meter|Meter
--

>>
<<
128.154.13.1
Screen.Meter.Show|Show
--
<!DEF>
procedure <!TW>Screen.Meter.Show (rNr, rX, rY, rWidth, rHeight, rBarWidth, rStretchMode, rVisibleRange, rTargetValue, rTolerance : real);
<!TXT>
Shows the meter <!PW>rNr (1..5) at the position <!PW>rX, <!PW>rY, width is <!PW>rWidth, height is <!PW>rHeight, width of the bar is <!PW>rBarWidth, center zoom is <!PW>rStrechMode, visible range in % is <!PW>rVisibleRange, target value is <!PW>rTargetValue, tolerance in % is <!PW>rToleranze.


<!DEF>
procedure <!TW>Screen.Meter.Show (rNr : real);
<!TXT>
Shows the meter <!PW>rNr (1..5) again. It works only if the meter has been previously provided with parameters, otherwise it is ignored.
>>

<<
128.154.13.2
Screen.Meter.Hide|Hide
--
<!DEF>
procedure <!TW>Screen.Meter.Hide (rNr : real);
<!TXT>
Hide the meter <!PW>rNr (1..5).

If <!PW>rNr=0, then all meters are hidden.
>>

<<
128.154.13.3
Screen.Meter.Set|Set
--
<!DEF>
procedure <!TW>Screen.Meter.Set (rNr, rPos : real);
<!TXT>
Sets the meter <!PW>rNr value to <!PW>rValue.
>>
