Roku Object Reference - imaginArt
Roku Object Reference - imaginArt
Roku Object Reference - imaginArt
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
oTextWidget ()<br />
An object used for putting text on the screen.<br />
<strong>Object</strong> creation:<br />
• Create<strong>Object</strong>("roTextWidget", r As roRectangle, line_count As<br />
Integer, text_mode As Integer, pause_time As Integer)<br />
o r – roRectangle that contains the text<br />
o line_count – the number of lines of text to show in the rectangle<br />
o text_mode – 0 for an animated ‘teletype’ like view or 1 for static text.<br />
o pause_time – how long each string is displayed prior to displaying the next string<br />
• Create<strong>Object</strong>("roTextWidget", r As roRectangle, line_count As<br />
Integer, text_mode As Integer, array As roAssociativeArray)<br />
o r – roRectangle that contains the text<br />
o line_count – the number of lines of text to show in the rectangle<br />
o<br />
o<br />
text_mode – 0 for an animated ‘teletype’ like view or 1 for static text.<br />
array is an associative array that can include the following values<br />
• “LineCount” – the number of lines of text to show in the rectangle<br />
• “TextMode” - 0 for an animated ‘teletype’ like view or 1 for static text.<br />
• “PauseTime” - how long each string is displayed prior to displaying the next string<br />
• “Rotation” – the rotation of the text in the widget, 0 degrees (0), 90 degrees (1), 180<br />
degrees (2), 270 degrees (3)<br />
• “Alignment” – the alignment of the text. Left (0), center (1), or right(2)<br />
The object includes the following interfaces:<br />
• PushString(str As String) As Boolean<br />
o The string is added to the list of strings to display. Strings are displayed in order and when the<br />
end is reached it loops.<br />
• PopStrings(number_of_string_to_pop As Integer) As Boolean<br />
o Pops strings off the front of the list (last in first out). The popping is done the next time the<br />
widget wraps so that strings can be added and removed seamlessly to the widget.<br />
• GetStringCount() As Integer<br />
o Returns the number of strings that will exist once any pending pops have taken place.<br />
• Clear() As Boolean<br />
o Clears the list of strings leaving the widget blank and ready for more PushString() calls.<br />
This object also uses the ifWidget interface which provides:<br />
• SetForegroundColor(color As Integer) As Boolean<br />
• SetBackgroundColor(color As Integer) As Boolean<br />
o color is in ARGB format.<br />
• SetFont(font_filename As String) As Boolean<br />
o font_filename is a TrueType font, for example: CF:/Ariel.ttf<br />
• SetBackgroundBitmap(background_bitmap_filename As String, stretch As<br />
Boolean) As Boolean<br />
o If stretch is true, the image is stretched to the size of the window.<br />
• SetSafeTextRegion(rect As roRectangle) As Boolean<br />
o rect specifies the rectangle within the widget where the text can be drawn safely.<br />
• Show() As Boolean<br />
o Displays the widget – after creation, the widget is hidden until Show() is called.<br />
• Hide() As Boolean<br />
o Hides the widget.<br />
44