Project Outline
«
SmilText JS

Class cwi.smilText.STDocument

Extends: cwi.smilText.Time.Playable.

Defined in: cwi.smilText.js.

Constructor Summary
new cwi.smilText.STDocument (region) Implementation of a SmilText Document.
Method Summary
getStoredAttribute(layout, attr) Return the value of a stored style attribute.
updateAttribute(layout, attr, val) Save a style attribute of a given layout element.
getXML() Return the string representation of the smilText document.
addTimingEntry(entry, args, t) Add a rendering primitive to the scheduler.
clearTimingEntries() Remove all rendering primitives from the scheduler.
getTimingEntries() Return an array containing the timing entries.
setTime(t) Update the current time of the smilText document.
seekTo(t) Perform the seek operation to a given time moment.
stop() Stop the smilText object.
getTranslatedSentence(s) Return the translation of a sentence.
updateDictionary(k, val) Save a sentence and its translation.
setTranslateFunction(func) Set the translation function.
Constructor Detail
new cwi.smilText.STDocument(region)
Implementation of a SmilText Document.

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
getXML() : string
Return the string representation of the smilText document.

										
									
Returns:
{string}
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
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).
stop()
Stop the smilText object.

										
									
getTranslatedSentence(s) : string
Return the translation of a sentence.

										
									
Parameters:
{string} s The original sentence.
Returns:
{string} the translated equivalent.
updateDictionary(k, val)
Save a sentence and its translation.

										
									
Parameters:
{string} k The original sentence.
{string} val The translation in some language.
setTranslateFunction(func)
Set the translation function.

										
									
Parameters:
{string} func A translation function.
Documentation generated by JsDoc Toolkit 2.3.2 on Mon Nov 09 2009 18:20:41 GMT+0100 (CET)