Cursor input

The Generic Routine

              +--------------------------------------------+
              |CALL  IRQLC (KWKID,LCDNR,ISTAT*,NT*,PX*,PY*) |
              +--------------------------------------------+
                                  
Action: This routine returns the (x,y) position of the cursor in world coordinates, and the index the normalization transformation. Its calling sequence is compatible with the equivalent GKS routine. Parameter Description:
KWKID
Workstation identifier.
LCDNR
Locator device.
1
Keyboard.
2
Graphic tablet.
With the X11 driver LCDNR can have the following values:
10
tracking cross
20
cross-hair
30
rubber circle
40
rubber band
50
rubber rectangle
99
the screen coordinates are taken in XLOC and YLOC.
>0
request mode
<0
sample mode
ISTAT
Return status.
0
Graphic input has been canceled.
1
A point was located and its coordinates are recorded in PX and PY.
NT
Index of the normalization transformation.
PX
X coordinate of position of locator
PY
Y coordinate of position of locator

The Two Points Routine

         +------------------------------------------------------+
         |CALL  IGLOC2 (KWKID,*NT*,X1*,Y1*,X2*,Y2*,ISTAT*,CHOPT) |
         +------------------------------------------------------+
                                  
Action: This routine returns the graphic cursor position in world coordinates space of two points and the corresponding normalization transformation number. Rubberbanding is used to visualize the area (box) delimited by the two points. Parameter Description:
KWKID
Workstation identifier
NT
Index of the normalization transformationsee(CHOPT).
X1
X coordinate of the cursor position in world coordinates space of the first point.
Y1
Y coordinate of the cursor position in world coordinates space of the first point.
X2
X coordinate of the cursor position in world coordinates space of the second point.
Y2
Y coordinate of the cursor position in world coordinates space of the second point.
ISTAT
Return status:
0
Graphic input has been canceled.
1
Two points were located and their coordinates are recorded in X1, Y1, X2, Y2.
CHOPT
CHARACTER variable specifying the option desired:
' '
NT is an output parameter.
'P'
NT is an input and output parameter. In this case, NT contains on input the normalization transformation index with the highest priority.

How to get the position both in normalized device coordinates and world coordinates space

           +--------------------------------------------------+
           |CALL  IGLOC (ICURS,NT*,IBN*,XNDC*,YNDC*,XWC*,YWC*) |
           +--------------------------------------------------+
                                  
Action: It is sometimes useful to get a point position both in normalized device coordinates and world coordinates space at the same time. This routine allows to do this for the workstation 1.
ICURS
Cursor type.
NT
normalization transformation number.
IBN
Button number:
0
Right button of the mouse.
1
Left button of the mouse.
3
Middle button of the mouse only for the X11 interface.
XNDC
X coordinate of the cursor position in normalized device coordinates space.
YNDC
Y coordinate of the cursor position in normalized device coordinates space.
XWC
X coordinate of the cursor position in world coordinates space.
YWC
Y coordinate of the cursor position in world coordinates space.