Class Index

Classes


Class Tools.Tool

Represents the base class for DocumentViewer UI tools.

Class Summary
Constructor Attributes Constructor Name and Description
 
Tools.Tool(docViewer)
Field Summary
Field Attributes Field Name and Description
 
the reference to the current DocumentViewer instance
 
an array of page coordinates this tool currently holds.
Method Summary
Method Attributes Method Name and Description
 
The function called when a context menu should be shown.
 
Returns the instance of DocumentViewer for this tool.
 
The function called when a keyboard key is down.
 
The function called when the mouse left button is double clicked.
 
The function called when the left mouse button is down
 
The function called when the left mouse button is up.
 
The function called when the mouse moves.
 
switchIn(oldTool)
The function called when this tool is selected.
 
switchOut(newTool)
The function called when this tool is deselected.
Class Detail
Tools.Tool(docViewer)
Parameters:
{CoreControls.DocumentViewer} docViewer
an instance of DocumentViewer.
Field Detail
{CoreControls.DocumentViewer} docViewer
the reference to the current DocumentViewer instance

{Tools.PageCoordinate[]} pageCoordinates
an array of page coordinates this tool currently holds. The default is index 0 for the mouse left down and index 1 for mouse left up.
Method Detail
contextMenu(e)
The function called when a context menu should be shown. Use e.preventDefault to disable the default browser context menu
Parameters:
e
the event object

{CoreControls.DocumentViewer} getDocumentViewer()
Returns the instance of DocumentViewer for this tool.
Returns:
{CoreControls.DocumentViewer} the instance of DocumentViewer for this tool.

keyDown(e)
The function called when a keyboard key is down.
Parameters:
e
the event object containing keyboard key data.

mouseDoubleClick(e)
The function called when the mouse left button is double clicked.
Parameters:
e
the event object containing mouse coordinates.

mouseLeftDown(e)
The function called when the left mouse button is down
Parameters:
e
the event object containing mouse coordinates.

mouseLeftUp(e)
The function called when the left mouse button is up. Typically, annotations are created and added to the annotation manager at this point.
Parameters:
e
the event object containing mouse coordinates.

mouseMove(e)
The function called when the mouse moves.
Parameters:
e
the event object containing mouse coordinates.

switchIn(oldTool)
The function called when this tool is selected. Typically use for changing mouse cursors, and initializing states for the tool.
Parameters:
{Tools.Tool} oldTool
the Tool class that was previously selected.

switchOut(newTool)
The function called when this tool is deselected. Typically use for changing mouse cursors, and cleaning up states for the tool.
Parameters:
{Tools.Tool} newTool
the Tool class that was newly selected.

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Sep 09 2016 14:32:43 GMT-0700 (PDT)