Mouse Programming
Using the Mouse in ProvideX  
  Prior Next
 

The MOUSE can be used within ProvideX to control input and as a pointing device. The directive SETMOUSE and the system variable MSE are used to interface with the mouse. To enable the MOUSE logic in ProvideX the program must execute a SETMOUSE ON directive. To disable it execute a SETMOUSE OFF. While the mouse is enabled, the system variable MSE can be referenced to determine the mouse status and position.

Simple Mouse Usage

The standard ProvideX input handler intercepts mouse clicks and generates a pseudo input terminator (EOM value). These are:

EOM value

Mouse button action

$00FF01$

Left button pressed or held and moved

$00FF81$

Left button released

$00FF02$

Right button pressed or held and moved

$00FF82$

Right button released

$00FF04$

Center button pressed (3 button mice only)

$00FF84$

Center button released

These EOM values may be assigned to a CTL value form the purposes of interfacing to a program. Three special CTL values are provided in order to interface the mouse to your program, they are:

-1080

Mouse button pressed/dragged

This CTL value is returned when the mouse is either pressed or moved while pressed.

-1081

Standard Mouse release processing

System generates Up, down, left, right arrows depending on location of mouse and input message.

-1082

Mouse generated ESCAPE

This value is generated by mouse being released outside of current scroll region. This is usually undefined but it can be mapped to CTL-4 or other values.

The default setting for ProvideX is to map the following:

$00FF01$

-1080

Left mouse button down/moved

$00FF81$

-1081

Left mouse button released

$00FF02$

-1000

Ignore right button down/move

$00FF82$

4

Return CTL value 4 on right release

$00FF04$

-1000

Ignore center down

$00FF84$

-1

Call utilities on center release

  Prior Next