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>  
 
 
<inner>  
Resets and immediately updates the current selection info.
<inner>  
formatTextSelection(textProperties)
Apply the supplied text properties to the current range.
 
Get all styles currently applied to the selected range.
<inner>  
<inner>  
<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 ends at the last step of a 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>  
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)
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(!odf.Formatting.StyleData) : !odf.Formatting.StyleData} applyDirectStyling
Returns:
{undefined}

<inner> {undefined} applySimpleParagraphDirectStyling(styleOverrides)
Parameters:
{!odf.Formatting.StyleData} 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} emitSelectionChanges()
Returns:
{undefined}

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

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

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

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

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

<inner> {undefined} forceSelectionInfoRefresh()
Resets and immediately updates the current selection info. VERY SLOW... please use sparingly.
Returns:
{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:
{!odf.Formatting.StyleData} 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> {!{directTextStyling: !boolean|directParagraphStyling: !boolean}} getCachedEnabledFeatures()
Returns:
{!{directTextStyling: !boolean|directParagraphStyling: !boolean}}

<inner> {!gui.DirectFormattingController.SelectionInfo} getCachedSelectionInfo()
Returns:
{!gui.DirectFormattingController.SelectionInfo}

<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> {!gui.DirectFormattingController.SelectionInfo} 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:
{!gui.DirectFormattingController.SelectionInfo}

{!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 ends at the last step of a 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> {!odf.Formatting.StyleData} modifyParagraphIndent(direction, paragraphStyle)
Parameters:
{!number} direction
{!odf.Formatting.StyleData} paragraphStyle
Returns:
{!odf.Formatting.StyleData}

<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> {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}

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Aug 06 2015 04:10:40 GMT+0200 (MESZ)