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.
oClockWidget ()<br />
roClockWidget puts a clock on the screen. It has no extra interface, only construction arguments.<br />
roClockWidget implements the ifTextWidget interface.<br />
<strong>Object</strong> creation:<br />
• Create<strong>Object</strong>("roClockWidget", rect As roRectangle, res As<br />
roResourceManager, display_type As Integer)<br />
o rect = the rectangle in which the clock is displayed. Based on the size of the rectangle, the<br />
widget picks a font.<br />
o display_type = 0 for date only, 1 for clock only. To show both on the screen, two<br />
widgets must be created.<br />
Example:<br />
rect=Create<strong>Object</strong>("roRectangle", 0, 0, 300, 60)<br />
res=Create<strong>Object</strong>("roResourceManager", "resources.txt")<br />
c=Create<strong>Object</strong>("roClockWidget", rect, res, 1)<br />
c.Show()<br />
The resource manager is passed in to the widget and the widget uses the following resources within<br />
resources.txt to display the time/date correctly.<br />
Here are the 'eng' entries:<br />
[CLOCK_DATE_FORMAT]<br />
eng "%A, %B %e, %Y"<br />
[CLOCK_TIME_FORMAT]<br />
eng "%l:%M"<br />
[CLOCK_TIME_AM]<br />
eng "AM"<br />
[CLOCK_TIME_PM]<br />
eng "PM"<br />
[CLOCK_DATE_SHORT_MONTH]<br />
eng "Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec"<br />
[CLOCK_DATE_LONG_MONTH]<br />
eng<br />
"January|February|March|April|May|June|July|August|September|October|No<br />
vember|December"<br />
[CLOCK_DATE_SHORT_DAY]<br />
eng "Sun|Mon|Tue|Wed|Thu|Fri|Sat"<br />
[CLOCK_DATE_LONG_DAY]<br />
eng "Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday"<br />
The following are the control characters for the date/time format strings:<br />
// Date format<br />
//<br />
// %a Abbreviated weekday name<br />
// %A Long weekday name<br />
// %b Abbreviated month name<br />
// %B Full month name<br />
// %d Day of the month as decimal 01 to 31<br />
// %e Like %d, the day of the month as a decimal number, but without<br />
leading zero<br />
// %m Month name as a decimal 01 to 12<br />
// %n Like %m, the month as a decimal number, but without leading zero<br />
47