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

Page 44

Advertising
background image

roTextWidget (HD2000 only)

An object used for putting text on the screen.

Object creation:
 CreateObject("roTextWidget", roRectangle r, rotINT32 line_count,

rotINT32 text_mode, rotINT32 pause_time)

o

r – roRectangle that contains the text

o

line_count – the number of lines of text to show in the rectangle

o

text_mode – 0 for an animated ‘teletype’ like view or 1 for static text.

o

pause_time – how long each string is displayed prior to displaying the next string


The object includes the following interfaces:
 rotBOOL PushString(rotSTRING str)

o

The string is added to the list of strings to display. Strings are displayed in order and when the

end is reached it loops.

 rotBOOL PopStrings(rotINT32 number_of_string_to_pop)

o

Pops strings off the front of the list (last in first out). The popping is done the next time the

widget wraps so that strings can be added and removed seamlessly to the widget.

 rotINT32 GetStringCount()

o

Returns the number of strings that will exist once any pending pops have taken place.

 rotBOOL Clear()

o

Clears the list of strings leaving the widget blank and ready for more PushString() calls.


This object also uses the ifWidget interface which provides:
 rotBOOL SetForegroundColor(rotINT32 color)
 rotBOOL SetBackgroundColor(rotINT32 color)

o

color is in ARGB format.

 rotBOOL SetFont(rotSTRING font_filename)

o

font_filename is a TrueType font, for example: CF:/Ariel.ttf

 rotBOOL SetBackgroundBitmap(rotSTRING background_bitmap_filename,

rotBOOL stretch)

o

If stretch is true, the image is stretched to the size of the window.

 rotBOOL SetSafeTextRegion(roRectangle rect)

o

rect specifies the rectangle within the widget where the text can be drawn safely.

 rotBOOL Show(rotVOID)

o

Displays the widget – after creation, the widget is hidden until Show() is called.

 rotBOOL Hide(rotVOID)

o

Hides the widget.


The top 8 bits of the color value are ‘alpha’. Alpha has no effect for the foreground text color but does
effect the widget background color. 0 is fully transparent and 255 is fully non-transparent. This feature
allows ‘subtitle’ like effects. For example, a semi-transparent black box containing text over video.

44

Advertising
This manual is related to the following products: