(LOGO.JPG) Python for OpenVMS

(go to: table of contents, index, list of vms_smg, prev: MOVE_TEXT, next: NAME_TO_KEYCODE)


MOVE_VIRTUAL_DISPLAY - Move Virtual Display

Moves a virtual display on the pasteboard, but keeps the pasting order. Use vms_smg.repaste_virtual_display() to move the location and change the pasting order of the display within the pasteboard.

Format:

    status = vms_smg.move_virtual_display (display_id,         \
             pasteboard_id, pasteboard_row, pasteboard_column, \
             [top_display_id])
Returns:
status
Condition code as returned from SMG$MOVE_VIRTUAL_DISPLAY. Either SS$_NORMAL or SMG$_BATWAS_ON are returned here - all other codes produce a Python exception. (The latter code is not mentioned in the documentation of OpenVMS VAX V6.1).
Arguments:
display_id
Virtual display to be moved.
pasteboard_id
Pasteboard on which the virtual display is to be moved.
pasteboard_row
Specifies the row of the pasteboard that is to contain row 1 of the new location of the specified virtual display.
pasteboard_column
Specifies the column of the pasteboard that is to contain column 1 of the specified virtual display.
top_display_id
Identifier of the virtual display under which the moving display_id will be pasted.
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 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)
>>>

Screen layout, file: VMS_SMG_003.JPG

(picture VMS_SMG_003.JPG)

>>> # now move virtual display 1
>>> status = vms_smg.move_virtual_display (vtdpy1, pasteboard_id, 3, 10)
>>>

Screen layout, file: VMS_SMG_004.JPG

(picture VMS_SMG_004.JPG)

Notice that the display 1 is at a new location, but still partially occluded by virtual display 2. Also, the cursor position has not changed, which does happen when using vms_smg.repaste_virtual_display().


(go to: table of contents, index, list of vms_smg, prev: MOVE_TEXT, next: NAME_TO_KEYCODE)

10-SEP-2000 ZE.