ui/ Mouse.js

This library creates an object that can be used to track the current mouse position.  This library creates and object called SysMouse which is an instance of SystemMouse described here (meaning you’ll probably never need to make an instance of SystemMouse).  To enable tracking, register the neuro_trackMouse method with the event manager or with the document mouse move event.  For example when using the eventmanager.js you can do the following:

//register the mouse tracker
neuro_addMoveListener(neuro_trackMouse);

mouse_moved = function(event){
alert("move: " + SysMouse.X + " " + SysMouse.Y);
};
neuro_addMoveListener(mouse_moved);

that will alert the X and Y position on every mouse move.

Copyright

2005 Rob Rohan (robr.nosp@m.ohan@gmai.nosp@m.l.com)

Summary
This library creates an object that can be used to track the current mouse position.
the library version
Wrapper function to fill in the mouse object with the current coordinates.
Constructor for SystemMouse this holds the current mouse position on the screen in X and Y
gets the current mouse position and puts it into the SysMouse object this is not really an API call; however it needs to get envoked on window mouse move events to be of any help.
An instance of SystemMouse for use in your everyday code

Variables

SYSMOUSE_VERSION

var SYSMOUSE_VERSION

the library version

Functions

neuro_trackMouse

function neuro_trackMouse(event)

Wrapper function to fill in the mouse object with the current coordinates.  Use add this to the listener events if you would like to constantly track the mouse

Parameters

eventthe event passed in from the system.

SystemMouse

Constructor for SystemMouse this holds the current mouse position on the screen in X and Y

Summary
gets the current mouse position and puts it into the SysMouse object this is not really an API call; however it needs to get envoked on window mouse move events to be of any help.
An instance of SystemMouse for use in your everyday code

Functions

SystemMouse. setMouseCoords

gets the current mouse position and puts it into the SysMouse object this is not really an API call; however it needs to get envoked on window mouse move events to be of any help.  For example using the neuro event model:

neuro_addMoveListener(SysMouse.setMouseCoords);

Parameters

ethe event

Variables

SysMouse

SysMouse

An instance of SystemMouse for use in your everyday code

var SYSMOUSE_VERSION
the library version
function neuro_trackMouse(event)
Wrapper function to fill in the mouse object with the current coordinates.
SysMouse
An instance of SystemMouse for use in your everyday code