(LOGO.JPG) Python for OpenVMS

(go to: table of contents, index, list of vms_smg, prev: LOAD_VIRTUAL_DISPLAY, next: MOVE_VIRTUAL_DISPLAY)


MOVE_TEXT - Move Text from One Virtual Display to Another

Move a rectangle of text from one virtual display to another virtual display.

Format:

    None = vms_smg.move_text (display_id,      \
        top_left_row, top_left_column,         \
        bottom_right_row, bottom_right_column, \
        display_id2,                           \
        [top_left_row2], [top_left_column2],   \
        [flags])
Returns:

None

Arguments:

display_id
The virtual display from which text is to be moved.
top_left_row
Top left row of the rectangle of text you want to move.
top_left_column
Top left column of the rectangle of text you want to move.
bottom_right_row
Bottom right row of the rectangle of text you want to move.
bottom_right_column
Bottom right column of the rectangle of text you want to move.
display_id2
Specifies the virtual display to which the text is to be moved.
top_left_row2
Top left row of the rectangle that is the destination of the text you want to move. If you do not specify a value, the text is moved to the current virtual cursor row.
top_left_column2
Top left column of the rectangle that is the destination of the text you want to move. If you do not specify a value, the text is moved to the current virtual cursor column.
flags
Optional bit mask that specifies the action to take when moving the specified text. Bit mask values like SMG_M_TEXT_SAVE are in module 'vms_smgdef'.
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 a virtual display
>>> status, vtdpy1 = vms_smg.create_virtual_display \
...         (5, 10, vms_smgdef.SMG_M_BORDER, None, None)
>>>

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

>>> # put some text in the display
>>> status = vms_smg.put_chars (vtdpy1, 'Line1Line1Line1', 1, 1)
>>> status = vms_smg.put_chars (vtdpy1, 'Line2Line2Line2', 2, 2)
>>> status = vms_smg.put_chars (vtdpy1, 'Line3Line3Line3', 3, 3)
>>>

Screen layout, file: VMS_SMG_015.JPG

(picture VMS_SMG_015.JPG)

>>> # create another virtual display
>>> status, vtdpy2 = vms_smg.create_virtual_display \
...         (6, 11, vms_smgdef.SMG_M_BORDER, None, None)
>>>

>>> # paste the virtual display
>>> status = vms_smg.paste_virtual_display \
...          (vtdpy2, pasteboard_id, 5, 7, None)
>>>

>>> # copy (some) text, but use an offset in the other display
>>> vms_smg.move_text ( \
...        vtdpy1,      # display_id
...        1,           # top_left_row
...        1,           # top_left_column
...        3,           # bottom_right_row
...        8,           # bottom_right_column
...        vtdpy2,      # display_id2
...        2,           # [top_left_row2]
...        2,           # [top_left_column2]
...        0)           # [flags]
>>>

Notice that the text from the old display was removed.

Screen layout, file: VMS_SMG_031.JPG

(picture VMS_SMG_031.JPG)


(go to: table of contents, index, list of vms_smg, prev: LOAD_VIRTUAL_DISPLAY, next: MOVE_VIRTUAL_DISPLAY)

11-SEP-2000 ZE.