(LOGO.JPG) Python for OpenVMS

(go to: table of contents, index, list of vms_smg, prev: RESTORE_PHYSICAL_SCREEN, next: NEXT)


RETURN_CURSOR_POS - Return Cursor Position

Return the current virtual cursor position in a specified virtual display.

Format:

    start_row, start_column = vms_smg.return_cursor_pos (display_id)
Returns:
start_row
The virtual cursor's current row position within the specified virtual display.
start_column
The virtual cursor's current column position within the specified virtual display.
Arguments:
display_id
The virtual display whose current virtual cursor position you are requesting.
Examples:
>>> import vms_smg
>>> import vms_smgdef

>>> # create a new DECwindows terminal using SMG
>>> status, pasteboard_id, number_of_pasteboard_rows, \
... number_of_pasteboard_columns, type_of_terminal,   \
... device_name = vms_smg.create_pasteboard           \
...   (None, vms_smgdef.SMG_M_WORKSTATION)
>>>

>>> # create virtual display
>>> status, vtdpy1 = vms_smg.create_virtual_display \
...         (5, 10, vms_smgdef.SMG_M_BORDER, None, None)
>>>

>>> # paste virtual display
>>> status = vms_smg.paste_virtual_display \
...          (vtdpy1, pasteboard_id, 3, 5, None)
>>>

>>> # write to virtual display
>>> status = vms_smg.put_chars (vtdpy1, 'VTDPY1', 0, 0)
>>>

>>> # write to virtual display - graphics
>>> status = vms_smg.put_chars (vtdpy1, 'qnqxq', 2, 2, 0, \
...        None, None, vms_smgdef.SMG_C_SPEC_GRAPHICS)
>>>

Screen layout, file: VMS_SMG_034.JPG

(picture VMS_SMG_034.JPG)

>>> # report position
>>> start_row, start_column = vms_smg.return_cursor_pos (vtdpy1)
>>> print start_row, start_column
2 7
>>>

(go to: table of contents, index, list of vms_smg, prev: RESTORE_PHYSICAL_SCREEN, next: NEXT)

11-SEP-2000 ZE.