Class cwi.smilText.STDocument
Extends: cwi.smilText.Time.Playable.
Defined in: cwi.smilText.js.
Constructor Summary
Method Summary
Constructor Detail
new cwi.smilText.STDocument(region)
Implementation of a SmilText Document.
Author: Rodrigo Laiola Guimaraes.
Author: Rodrigo Laiola Guimaraes.
- Parameters:
- {string} region
- the id of the region where the smilText document will be rendered.
Method Detail
getStoredAttribute(layout, attr)
: string
Return the value of a stored style attribute.
Parameters:
{string} | layout | the region id |
{string} | attr | the attribute name |
Returns:
{string} | val the attribute value |
updateAttribute(layout, attr, val)
Save a style attribute of a given layout element.
Parameters:
{string} | layout | the region id |
{string} | attr | the attribute name |
{string} | val | the attribute value |
addTimingEntry(entry, args, t)
Add a rendering primitive to the scheduler.
Parameters:
{string} | entry | The smilText rendering primitive. |
{Array[]} | args | An array of arguments to the rendering primitive. |
{integer} | t | The occurring time (in milliseconds) relative to the smilText container. |
See:
cwi.smilText.Render.appendContainer |
cwi.smilText.Render.appendLineBreak |
cwi.smilText.Render.appendText |
cwi.smilText.Render.clearLayout |
cwi.smilText.Render.closeContainer |
clearTimingEntries()
Remove all rendering primitives from the scheduler.
See:
cwi.smilText.Render.appendContainer |
cwi.smilText.Render.appendLineBreak |
cwi.smilText.Render.appendText |
cwi.smilText.Render.clearLayout |
cwi.smilText.Render.closeContainer |
getTimingEntries()
: Array[ [integer; string; args] ]
Return an array containing the timing entries. Each element of this array is an array containing:
[the occurency time, the rendering function, array of parameters to the rendering function].
Returns:
{Array[ [integer; string; args] ]} |
See:
cwi.smilText.Render.appendContainer |
cwi.smilText.Render.appendLineBreak |
cwi.smilText.Render.appendText |
cwi.smilText.Render.clearLayout |
cwi.smilText.Render.closeContainer |
setTime(t)
Update the current time of the smilText document.
Parameters:
{integer} | t | new time moment (in milliseconds). |
seekTo(t)
Perform the seek operation to a given time moment.
Parameters:
{integer} | t | The desired time instant (in milliseconds). |
getTranslatedSentence(s)
: string
Return the translation of a sentence.
Parameters:
{string} | s | The original sentence. |
Returns:
{string} | the translated equivalent. |