(go to: table of contents, index, list of vms_smg, prev: PREV, next: DELETE_VIRTUAL_DISPLAY)
Format:
None
Arguments:
DELETE_VIEWPORT - Delete a Viewport
Deletes the specified viewport from any pasteboards to which it is pasted.
vms_smg.delete_viewport (display_id)
Returns:
Examples:
(go to: table of contents,
index, list of vms_smg,
prev: PREV,
next: DELETE_VIRTUAL_DISPLAY)
>>> 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)
>>>
>>> # 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)
>>>
>>> # create a viewport
>>> status = vms_smg.create_viewport (vtdpy1, 2, 3, 4, 5)
>>>
The examples section of vms_smg.create_viewport() shows that
this has no immediate effect if the virtual display is already
pasted. It also shows the contents of the whole virtual display.
>>> # paste virtual display
>>> status = vms_smg.paste_virtual_display \
... (vtdpy1, pasteboard_id, 3, 5, None)
>>>
>>> # delete the viewport
>>> vms_smg.delete_viewport (vtdpy1)
>>>
>>> # The display is unpasted and the screen is empty.
>>> # it is not possible to delete a deleted viewport
>>> vms_smg.delete_viewport (vtdpy1)
Traceback (innermost last):
File "<stdin>", line 1, in ?
vms_smg.error: (1213332, '%SMG-F-NO_WINASSOC, no viewport has been\
associated with the display')
>>>