The following two programs demonstrate simple applications of the interactive graphics cursor and the CURSOR procedure. To label the location, enter: XYOUTS, X, Y, 'X marks the spot.', /DEVICE The position of the cursor in device coordinates is stored in the variables X and Y. Move the cursor over the graphics window and press the mouse button. ExamplesĪctivate the graphics cursor, select a point in the graphics window, and return the position of the cursor in device coordinates. Bit 0 is the leftmost button (value = 1), bit 1 is the middle button (value = 2), and bit 3 is the rightmost button (value = 4) for the typical three-button mouse. Each mouse button is assigned a bit in the button field. When CURSOR returns, the button field of the system variable !MOUSE is set to the button status. Normally, the position is reported in data coordinates, but the DATA, DEVICE, and NORMAL keywords can be used to explicitly specify the coordinate system. The X and Y arguments are named variables that receive the cursor position. If no mouse buttons are present, CURSOR waits for a key on the keyboard to be pressed. On devices that have a mouse, CURSOR normally waits until a mouse button is pressed (or already down). CURSOR enables the graphic cursor on the device and optionally waits for the operator to position it. Note that not all graphics devices have interactive cursors. The CURSOR procedure is used to read the position of the interactive graphics cursor from the current graphics device.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |