Rotextfield (hd2000 only) – BrightSign HD2000 Object Reference Manual User Manual

Page 40

Advertising
background image

roTextField (HD2000 only)

A text field represents an area of the screen that can contain arbitrary text. This feature is intended for
presenting diagnostic and usage information rather than for generating a user interface. The roTextField
object implements the ifTextField and ifStreamSend interfaces.

The object is created with several parameters:
 CreateObject("roTextField", rotINT xpos, rotINT ypos, rotINT

width_in_chars, rotINT height_in_chars, rotOBJECT metadata)

o

xpos = Horizontal coordinate for the top left of the text field.

o

ypos = Vertical coordinate for the top left of the text field. The top of the screen is zero.

o

width_in_chars = Width of the text field in character cells.

o

height_in_chars = Height of the text field in character cells.

o

metadata = Optionally a roAssociativeArray containing extra parameters for the text field. If

you don't require this then pass zero.


Note that in TV modes a border around the screen may not be displayed due to overscanning. You may
want to use the roVideoMode object’s GetSafeX and GetSafeY functions to ensure that the coordinates you
use will be visible.

The metadata object supports the following extra parameters:
o

"CharWidth" the width of each character cell in pixels.

o

"CharHeight" the height of each character cell in pixels.

o

"BackgroundColor" the background color of the text field as an integer specifying eight bits for each of

red, green and blue in the form &Hrrggbb.

o

"TextColor" the color of the text as an integer specifying eight bits for each of red, green and blue in

the form &Hrrggbb.

o

"Size" an alternative to "CharWidth" and "CharHeight" for specifying either normal size text (0) or

double-sized text (1).


The ifTextField interface provides:
o

rotVOID Cls(rotVOID)

o

Clear the text field.

o

rotINT GetWidth(rotVOID)

o

Return the width of the text field.

o

rotINT GetHeight(rotVOID)

o

Return the height of the text field.

o

rotVOID SetCursorPos(rotINT x, rotINT y)

o

Move the cursor to the specified position. Subsequent output will appear at this position.

o

rotINT GetValue(rotVOID)

o

Return the value of the character currently under the cursor.



The ifStreamSend interface provides (note – the ifStreamSend interface is also described in the section
documenting the various Roku file objects – the interface is described again below in a manner more
specific to the roTextField object):
o

rotVOID SendByte(rotINT byte)

o

Write the character indicated by the specified number at the current cursor position within the

text field and advance the cursor.

o

rotVOID SendLine(rotSTRING string)

o

Write the characters specified at the current cursor position followed by the end of line

sequence.

o

rotVOID SendBlock(rotSTRING string)

o

Write the characters specified at the current cursor position and advance the cursor to one

position beyond the last character.

40

Advertising
This manual is related to the following products: