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
 
Returns the instance of DocumentViewer for this tool.
Event Summary
Event Attributes Event Name and Description
 
The event triggered when a context menu should be shown.
 
The event triggered when a keyboard key is down.
 
The event triggered when the mouse left button is double clicked.
 
The event triggered when the left mouse button is down
 
The event triggered when the left mouse button is up.
 
The event triggered when the mouse moves.
 
switchIn(oldTool)
The event triggered when this tool is selected.
 
switchOut(newTool)
The event triggered 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
{CoreControls.DocumentViewer} getDocumentViewer()
Returns the instance of DocumentViewer for this tool.
Returns:
{CoreControls.DocumentViewer} the instance of DocumentViewer for this tool.
Event Detail
contextMenu(e)
The event triggered when a context menu should be shown. Use e.preventDefault to disable the default browser context menu
Parameters:
e
the event object

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

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

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

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

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

switchIn(oldTool)
The event triggered 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 event triggered 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 Mon Apr 20 2015 14:53:21 GMT-0700 (PDT)