GDDM-GKS V1R1 Programming Guide and Reference
Previous topic | Next topic | Contents | Index | Contact z/OS | Library | PDF | BOOK


Locator input

GDDM-GKS V1R1 Programming Guide and Reference
SC33-0334-00



When the operator chooses PF2 ("place furniture") the program branches here. The locator device is initialized so that the initial cursor position is the center of the room.


          INITIALIZE LOCATOR (wkid, 1, 1, 29.93,
               69.51, 1, 0.0, rx, 0.0, ry, 0, datarcd)

The device is set to request mode, and the echo facility is enabled. The program loops until a valid locator point is chosen by the operator.


          SET LOCATOR MODE (wkid, 1, 0, 1)
          LOOP:
               UNTIL STATUS = 1
               AND XCOR < 60.0
               AND YCOR > 40.0
               REQUEST LOCATOR (wkid, 1, status,
                    transformation number, xcor, ycor)
          END LOOP

The status parameter indicates whether a valid location was chosen at the device. The program then checks if the chosen point is valid, which in this instance means whether the point chosen was within the perimeter of the room outline.

The echo type (1) chosen in the Initialize locator (GINLC) function call echoes the operator input by indicating the current cursor position.

This is what the screen looks like during locator input:


   PICTURE 18          

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012