Class Index | File Index

Classes


Class gui.SessionController


Defined in: SessionController.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
gui.SessionController(session, inputMemberId, shadowCursor, args)
Method Summary
Method Attributes Method Name and Description
<inner>  
cancelEvent(event)
<inner>  
<inner>  
Return the number of mouse clicks if the mouse event is for the primary button.
 
destroy(callback)
<inner>  
destroy(callback)
 
<inner>  
This processes our custom drag events and if they are on a selection handle (with the attribute 'end' denoting the left or right handle), updates the shadow cursor's selection to be on those endpoints.
<inner>  
 
 
 
 
 
 
 
 
Return the keyboard event handlers
 
<inner>  
Gets the next walkable position after the given node.
 
 
 
<inner>  
 
 
<inner>  
Tell the browser that it's ok to perform a cut action on our read-only body
<inner>  
Tell the browser that it's ok to perform a paste action on our read-only body
<inner>  
<inner>  
Handle the copy operation request
<inner>  
Handle the cut operation request
<inner>  
<inner>  
<inner>  
Updates a flag indicating whether the mouse down event occurred within the OdfCanvas element.
<inner>  
<inner>  
<inner>  
Inserts the local cursor.
<inner>  
Handle composition end event.
<inner>  
Causes a cursor movement to the position hinted by a mouse click event.
<inner>  
mutableSelection(selection)
Return a mutable version of a selection-type object.
<inner>  
Executes the given function on range selection only
<inner>  
redo()
<inner>  
If the user's current selection is region selection (e.g.
<inner>  
Removes the local cursor.
<inner>  
Executes the provided function and returns true Used to swallow events regardless of whether an operation was created
<inner>  
 
setUndoManager(manager)
 
<inner>  
<inner>  
In order for drag operations to work, the browser needs to have it's current selection set.
<inner>  
undo()
<inner>  
Class Detail
gui.SessionController(session, inputMemberId, shadowCursor, args)
Parameters:
{!ops.Session} session
{!string} inputMemberId
{!ops.OdtCursor} shadowCursor
{!gui.SessionControllerOptions} args
Method Detail
<inner> {undefined} cancelEvent(event)
Parameters:
{!Event} event
Returns:
{undefined}

<inner> {?{container:!Node|offset:!number}} caretPositionFromPoint(x, y)
Parameters:
{!number} x
{!number} y
Returns:
{?{container:!Node|offset:!number}}

<inner> {!number} computeClickCount(event)
Return the number of mouse clicks if the mouse event is for the primary button. Otherwise return 0.
Parameters:
{!UIEvent} event
Returns:
{!number}

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

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

{undefined} endEditing()
Returns:
{undefined}

<inner> {undefined} extendSelectionByDrag(event)
This processes our custom drag events and if they are on a selection handle (with the attribute 'end' denoting the left or right handle), updates the shadow cursor's selection to be on those endpoints.
Parameters:
{!Event} event
Returns:
{undefined}

<inner> {undefined} forwardUndoStackChange(e)
Parameters:
{?Event} e
Returns:
{undefined}

{?gui.AnnotationController} getAnnotationController()
Returns:
{?gui.AnnotationController}

{!gui.DirectFormattingController} getDirectFormattingController()
Returns:
{!gui.DirectFormattingController}

{!gui.EventManager} getEventManager()
Returns:
{!gui.EventManager}

{!gui.HyperlinkClickHandler} getHyperlinkClickHandler()
Returns:
{!gui.HyperlinkClickHandler}

{!gui.HyperlinkController} getHyperlinkController()
Returns:
{!gui.HyperlinkController}

{!gui.ImageController} getImageController()
Returns:
{!gui.ImageController}

{!string} getInputMemberId()
Returns:
{!string}

{{keydown: gui.KeyboardHandler|keypress: gui.KeyboardHandler}} getKeyboardHandlers()
Return the keyboard event handlers
Returns:
{{keydown: gui.KeyboardHandler|keypress: gui.KeyboardHandler}}

{!gui.MetadataController} getMetadataController()
Returns:
{!gui.MetadataController}

<inner> {?{container:!Node|offset:!number}} getNextWalkablePosition(node)
Gets the next walkable position after the given node.
Parameters:
{!Node} node
Returns:
{?{container:!Node|offset:!number}}

{!gui.SelectionController} getSelectionController()
Returns:
{!gui.SelectionController}

{!ops.Session} getSession()
Returns:
{!ops.Session}

{!gui.SessionConstraints} getSessionConstraints()
Returns:
{!gui.SessionConstraints}

<inner> {Node} getTarget(e)
Parameters:
{!Event} e
Returns:
{Node}

{!gui.TextController} getTextController()
Returns:
{!gui.TextController}

{?gui.UndoManager} getUndoManager()
Returns:
{?gui.UndoManager}

<inner> {!boolean} handleBeforeCut()
Tell the browser that it's ok to perform a cut action on our read-only body
Returns:
{!boolean}

<inner> {!boolean} handleBeforePaste()
Tell the browser that it's ok to perform a paste action on our read-only body
Returns:
{!boolean}

<inner> handleContextMenu(e)
Parameters:
{!UIEvent} e

<inner> {undefined} handleCopy(e)
Handle the copy operation request
Parameters:
{!Event} e
Returns:
{undefined}

<inner> {undefined} handleCut(e)
Handle the cut operation request
Parameters:
{!Event} e
Returns:
{undefined}

<inner> {undefined} handleDragStart(e)
Parameters:
{!MouseEvent} e
Returns:
{undefined}

<inner> {undefined} handleMouseClickEvent(event)
Parameters:
{!UIEvent} event
Returns:
{undefined}

<inner> handleMouseDown(e)
Updates a flag indicating whether the mouse down event occurred within the OdfCanvas element. This is necessary because the mouse-up binding needs to be global in order to handle mouse-up events that occur when the user releases the mouse button outside the canvas. This filter limits selection changes to mouse down events that start inside the canvas
Parameters:
{!UIEvent} e

<inner> handleMouseUp(event)
Parameters:
{!UIEvent} event

<inner> {undefined} handlePaste(e)
Parameters:
{!Event} e
Returns:
{undefined}

<inner> {undefined} insertLocalCursor()
Inserts the local cursor.
Returns:
{undefined}

<inner> insertNonEmptyData(e)
Handle composition end event. If there is data specified, treat this as text to be inserted into the document.
Parameters:
{!CompositionEvent} e

<inner> {undefined} moveByMouseClickEvent(event)
Causes a cursor movement to the position hinted by a mouse click event.
Parameters:
{!UIEvent} event
Returns:
{undefined}

<inner> {?{anchorNode: ?Node|anchorOffset: !number|focusNode: ?Node|focusOffset: !number}} mutableSelection(selection)
Return a mutable version of a selection-type object.
Parameters:
{?Selection} selection
Returns:
{?{anchorNode: ?Node|anchorOffset: !number|focusNode: ?Node|focusOffset: !number}}

<inner> {function(T):(boolean|undefined)} rangeSelectionOnly(fn)
Executes the given function on range selection only
Parameters:
{function(T):(boolean|undefined)} fn
Returns:
{function(T):(boolean|undefined)}

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

<inner> {undefined} redrawRegionSelection()
If the user's current selection is region selection (e.g., an image), any executed operations could cause the picture to shift relative to the selection rectangle.
Returns:
{undefined}

<inner> {undefined} removeLocalCursor()
Removes the local cursor.
Returns:
{undefined}

<inner> {!Function} returnTrue(fn)
Executes the provided function and returns true Used to swallow events regardless of whether an operation was created
Parameters:
{!Function} fn
Returns:
{!Function}

<inner> {undefined} selectWordByLongPress(event)
Parameters:
{!Event} event
Returns:
{undefined}

{undefined} setUndoManager(manager)
Parameters:
{?gui.UndoManager} manager
Returns:
{undefined}

{undefined} startEditing()
Returns:
{undefined}

<inner> {?string} stringFromKeyPress(event)
Parameters:
{!Event} event
Returns:
{?string}

<inner> {undefined} synchronizeWindowSelection(cursor)
In order for drag operations to work, the browser needs to have it's current selection set. This is called on mouse down to synchronize the user's last selection to the browser selection
Parameters:
{ops.OdtCursor} cursor
Returns:
{undefined}

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

<inner> {undefined} updateUndoStack(op)
Parameters:
{!ops.Operation} op
Returns:
{undefined}

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