(go to: table of contents, index, list of vms_smg, prev: PREV, next: FLUSH_BUFFER)
Format:
FIND_CURSOR_DISPLAY - Find Display that Contains the Cursor
Return the identifier of the most recently pasted virtual display that
contains the physical cursor.
display_id = vms_smg.find_cursor_display (pasteboard_id, \
[pasteboard_row], [pasteboard_column])
Returns:
Arguments:
Examples:
(go to: table of contents,
index, list of vms_smg,
prev: PREV,
next: FLUSH_BUFFER)
>>> 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 1
>>> status, vtdpy1 = vms_smg.create_virtual_display \
... (5, 10, vms_smgdef.SMG_M_BORDER, None, None)
>>>
>>> # write to virtual display 1
>>> status = vms_smg.put_chars (vtdpy1, 'V1', 0, 0)
>>>
>>> # create virtual display 2
>>> status, vtdpy2 = vms_smg.create_virtual_display \
... (5, 10, vms_smgdef.SMG_M_BORDER, None, None)
>>>
>>> # write to virtual display 2
>>> status = vms_smg.put_chars (vtdpy2, 'V2', 0, 0)
>>>
>>> # paste virtual display 1
>>> status = vms_smg.paste_virtual_display \
... (vtdpy1, pasteboard_id, 3, 5, None)
>>>
>>> # paste virtual display 2
>>> status = vms_smg.paste_virtual_display \
... (vtdpy2, pasteboard_id, 5, 7, None)
>>>
>>> # check positions ...
>>> display_id = vms_smg.find_cursor_display (pasteboard_id, 3, 5)
>>> print display_id, vtdpy1
2962744 2962744
>>>
>>> display_id = vms_smg.find_cursor_display (pasteboard_id, 5, 7)
>>> print display_id, vtdpy2
2963240 2963240
>>>
>>> # no virtual display at this position
>>> display_id = vms_smg.find_cursor_display (pasteboard_id, 1, 3)
>>> print display_id
0
>>>
>>> # invalid position
>>> display_id = vms_smg.find_cursor_display (pasteboard_id, 99, 1)
Traceback (innermost last):
File "<stdin>", line 1, in ?
vms_smg.error: (1212972, '%SMG-F-INVROW, invalid row')
>>>