(go to: table of contents, index, list of vms_smg, prev: SET_CURSOR_MODE, next: NEXT)
Format:
None
Arguments:
SET_CURSOR_REL - Move Cursor Relative
Move the virtual cursor the specified number of rows and columns from the
current virtual cursor position in a virtual display.
None = vms_smg.set_cursor_rel (display_id, \
[delta_row], [delta_column])
Returns:
Examples:
(go to: table of contents,
index, list of vms_smg,
prev: SET_CURSOR_MODE,
next: NEXT)
>>> 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, '1234567890', 1, 1)
>>> status = vms_smg.put_chars (vtdpy1, 'ABCDEFGHIJ', 2, 1)
>>> status = vms_smg.put_chars (vtdpy1, 'KLMNOPQRST', 3, 1)
>>> status = vms_smg.put_chars (vtdpy1, 'abcdefghij', 4, 1)
>>> status = vms_smg.put_chars (vtdpy1, 'klmnopqrst', 5, 1)
>>>
>>> # move cursor over '1' # X Y
>>> vms_smg.set_cursor_rel (vtdpy1, -4, -9)
>>>
>>> # move cursor over '3'
>>> vms_smg.set_cursor_rel (vtdpy1, None, 2)
>>>
>>> # move cursor over 'b'
>>> vms_smg.set_cursor_rel (vtdpy1, 3, -1)
>>>
>>> # try to move outside the virtual display
>>> vms_smg.set_cursor_rel (vtdpy1, 99)
Traceback (innermost last):
File "<stdin>", line 1, in ?
vms_smg.error: (1212972, '%SMG-F-INVROW, invalid row')
>>>