Class Index | File Index

Classes


Class gui.DirectFormattingController


Defined in: DirectFormattingController.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
gui.DirectFormattingController(session, sessionConstraints, sessionContext, inputMemberId, objectNameGenerator, directTextStylingEnabled, directParagraphStylingEnabled)
Field Summary
Field Attributes Field Name and Description
<static>  
gui.DirectFormattingController.enabledChanged
<static>  
gui.DirectFormattingController.paragraphStylingChanged
<static>  
gui.DirectFormattingController.textStylingChanged
 
 
 
 
Method Summary
Method Attributes Method Name and Description
<inner>  
alignParagraph(alignment)
 
 
 
 
<inner>  
applyParagraphDirectStyling(applyDirectStyling)
<inner>  
<inner>  
applyTextPropertyToSelection(propertyName, propertyValue)
<inner>  
Listen for local operations and clear the local cursor styling if necessary
 
createCursorStyleOp(position, length, useCachedStyle)
Generate an operation that would apply the current direct cursor styling to the specified position and length
<inner>  
createDiff(oldSummary, newSummary)
Create a map containing all the keys that have a different value in the new summary object.
 
TODO: HACK, REMOVE Generates operations that would create and apply the current direct cursor styling to the paragraph at given position.
 
destroy(callback)
<inner>  
<inner>  
<inner>  
 
 
 
<inner>  
formatTextSelection(textProperties)
Apply the supplied text properties to the current range.
 
Get all styles currently applied to the selected range.
<inner>  
Gets the current selection information style summary
<inner>  
getNodes(range)
Fetch all the character elements and text nodes in the specified range, or if the range is collapsed, the node just to the left of the cursor.
<inner>  
getOwnProperty(obj, key)
<inner>  
Get all styles currently applied to the selected range.
 
 
 
 
 
 
 
 
 
<inner>  
isSelectionAtTheEndOfLastParagraph(range, paragraphNode)
Check if the selection is at the end of the last paragraph.
<inner>  
Returns true if the first text node in the selection has different text style from the first paragraph; otherwise false.
<inner>  
modifyParagraphIndent(direction, paragraphStyle)
<inner>  
onCursorEvent(cursorOrId)
<inner>  
<inner>  
 
<inner>  
roundUp(step)
Round the step up to the next step
<inner>  
setBold(checked)
<inner>  
setFontName(value)
<inner>  
setFontSize(value)
<inner>  
<inner>  
setHasUnderline(checked)
<inner>  
setItalic(checked)
 
subscribe(eventid, cb)
<inner>  
toggle(predicate, toggleMethod)
 
unsubscribe(eventid, cb)
<inner>  
Class Detail
gui.DirectFormattingController(session, sessionConstraints, sessionContext, inputMemberId, objectNameGenerator, directTextStylingEnabled, directParagraphStylingEnabled)
Parameters:
{!ops.Session} session
{!gui.SessionConstraints} sessionConstraints
{!gui.SessionContext} sessionContext
{!string} inputMemberId
{!odf.ObjectNameGenerator} objectNameGenerator
{!boolean} directTextStylingEnabled
{!boolean} directParagraphStylingEnabled
Field Detail
<static> gui.DirectFormattingController.enabledChanged

<static> gui.DirectFormattingController.paragraphStylingChanged

<static> gui.DirectFormattingController.textStylingChanged

{!boolean} toggleBold

{!boolean} toggleItalic

{!boolean} toggleStrikethrough

{!boolean} toggleUnderline
Method Detail
<inner> {undefined} alignParagraph(alignment)
Parameters:
{!string} alignment
Returns:
{undefined}

{!boolean} alignParagraphCenter()
Returns:
{!boolean}

{!boolean} alignParagraphJustified()
Returns:
{!boolean}

{!boolean} alignParagraphLeft()
Returns:
{!boolean}

{!boolean} alignParagraphRight()
Returns:
{!boolean}

<inner> {undefined} applyParagraphDirectStyling(applyDirectStyling)
Parameters:
{!function(!Object) : !Object} applyDirectStyling
Returns:
{undefined}

<inner> {undefined} applySimpleParagraphDirectStyling(styleOverrides)
Parameters:
{!Object} styleOverrides
Returns:
{undefined}

<inner> {undefined} applyTextPropertyToSelection(propertyName, propertyValue)
Parameters:
{!string} propertyName
{!string} propertyValue
Returns:
{undefined}

<inner> clearCursorStyle(op)
Listen for local operations and clear the local cursor styling if necessary
Parameters:
{!ops.Operation} op

{ops.Operation} createCursorStyleOp(position, length, useCachedStyle)
Generate an operation that would apply the current direct cursor styling to the specified position and length
Parameters:
{!number} position
{!number} length
{!boolean} useCachedStyle
Returns:
{ops.Operation}

<inner> {!Object.} createDiff(oldSummary, newSummary)
Create a map containing all the keys that have a different value in the new summary object.
Parameters:
{!Object.} oldSummary
{!Object.} newSummary
Returns:
{!Object.}

{!Array.} createParagraphStyleOps(position)
TODO: HACK, REMOVE Generates operations that would create and apply the current direct cursor styling to the paragraph at given position.
Parameters:
{number} position
Returns:
{!Array.}

{undefined} destroy(callback)
Parameters:
{!function(!Error=)} callback
passing an error object in case of error
Returns:
{undefined}

<inner> {undefined} emitStylingChanges()
Returns:
{undefined}

<inner> {!boolean} emptyFalseReturningFunction()
Returns:
{!boolean}

<inner> {undefined} emptyFunction()
Returns:
{undefined}

{!{directTextStyling: !boolean|directParagraphStyling: !boolean}} enabledFeatures()
Returns:
{!{directTextStyling: !boolean|directParagraphStyling: !boolean}}

{string|undefined} fontName()
Returns:
{string|undefined}

{number|undefined} fontSize()
Returns:
{number|undefined}

<inner> {undefined} formatTextSelection(textProperties)
Apply the supplied text properties to the current range. If no range is selected, this styling will be applied to the next character entered.
Parameters:
{!Object} textProperties
Returns:
{undefined}

{!Array.} getAppliedStyles()
Get all styles currently applied to the selected range. If the range is collapsed, this will return the style the next inserted character will have. (Note, this is not used internally by WebODF, but is provided as a convenience method for external consumers)
Returns:
{!Array.}

<inner> {!gui.StyleSummary} getCachedStyleSummary()
Gets the current selection information style summary
Returns:
{!gui.StyleSummary}

<inner> {!Array.} getNodes(range)
Fetch all the character elements and text nodes in the specified range, or if the range is collapsed, the node just to the left of the cursor.
Parameters:
{!Range} range
Returns:
{!Array.}

<inner> {string|undefined} getOwnProperty(obj, key)
Parameters:
{!Object.} obj
{string} key
Returns:
{string|undefined}

<inner> {!{containsText: !boolean|appliedStyles: !Array.|styleSummary: !gui.StyleSummary}} getSelectionInfo()
Get all styles currently applied to the selected range. If the range is collapsed, this will return the style the next inserted character will have
Returns:
{!{containsText: !boolean|appliedStyles: !Array.|styleSummary: !gui.StyleSummary}}

{!boolean} hasStrikeThrough()
Returns:
{!boolean}

{!boolean} hasUnderline()
Returns:
{!boolean}

{!boolean} indent()
Returns:
{!boolean}

{!boolean} isAlignedCenter()
Returns:
{!boolean}

{!boolean} isAlignedJustified()
Returns:
{!boolean}

{!boolean} isAlignedLeft()
Returns:
{!boolean}

{!boolean} isAlignedRight()
Returns:
{!boolean}

{!boolean} isBold()
Returns:
{!boolean}

{!boolean} isItalic()
Returns:
{!boolean}

<inner> {boolean} isSelectionAtTheEndOfLastParagraph(range, paragraphNode)
Check if the selection is at the end of the last paragraph.
Parameters:
{!Range} range
{!Node} paragraphNode
Returns:
{boolean}

<inner> {!boolean} isTextStyleDifferentFromFirstParagraph(range, paragraphNode)
Returns true if the first text node in the selection has different text style from the first paragraph; otherwise false.
Parameters:
{!Range} range
{!Node} paragraphNode
Returns:
{!boolean}

<inner> {!Object} modifyParagraphIndent(direction, paragraphStyle)
Parameters:
{!number} direction
{!Object.>} paragraphStyle
Returns:
{!Object}

<inner> {undefined} onCursorEvent(cursorOrId)
Parameters:
{!ops.OdtCursor|!string} cursorOrId
Returns:
{undefined}

<inner> {undefined} onParagraphChanged(args)
Parameters:
{!{paragraphElement:Element}} args
Returns:
{undefined}

<inner> {undefined} onParagraphStyleModified()
Returns:
{undefined}

{!boolean} outdent()
Returns:
{!boolean}

<inner> {!boolean} roundUp(step)
Round the step up to the next step
Parameters:
{!number} step
Returns:
{!boolean}

<inner> {undefined} setBold(checked)
Parameters:
{!boolean} checked
Returns:
{undefined}

<inner> {undefined} setFontName(value)
Parameters:
{!string} value
Returns:
{undefined}

<inner> {undefined} setFontSize(value)
Parameters:
{!number} value
Returns:
{undefined}

<inner> {undefined} setHasStrikethrough(checked)
Parameters:
{!boolean} checked
Returns:
{undefined}

<inner> {undefined} setHasUnderline(checked)
Parameters:
{!boolean} checked
Returns:
{undefined}

<inner> {undefined} setItalic(checked)
Parameters:
{!boolean} checked
Returns:
{undefined}

{undefined} subscribe(eventid, cb)
Parameters:
{!string} eventid
{!Function} cb
Returns:
{undefined}

<inner> {!boolean} toggle(predicate, toggleMethod)
Parameters:
{!function():boolean} predicate
{!function(!boolean):undefined} toggleMethod
Returns:
{!boolean}

{undefined} unsubscribe(eventid, cb)
Parameters:
{!string} eventid
{!Function} cb
Returns:
{undefined}

<inner> {undefined} updateEnabledState()
Returns:
{undefined}

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Jul 17 2014 23:45:40 GMT+0200 (MESZ)