(LOGO.JPG) Python for OpenVMS

(go to: table of contents, index, list of vms_smg, prev: INSERT_CHARS, next: INVALIDATE_DISPLAY)


INSERT_LINE - Insert Line

Insert a line into the virtual display and scroll the display.

Format:

    status = vms_smg.insert_line (display_id, start_row,     \
                    [character_string], direction,           \
                    [rendition_set], [rendition_complement], \
                    [flags], [character_set])
Returns:
status
Condition code as returned from SMG$INSERT_LINE. Either SS$_NORMAL or SMG$_WILUSERMS are returned here - all other codes produce a Python exception.
Arguments:
display_id
Virtual display in which to insert the line.
start_row
The row position at which the string is inserted and the scrolling begins.
character_string
The character string to be inserted.
direction
The scrolling directions. Bit mask values like SMG_M_UP ar in module 'vms_smgdef'.
rendition_set
Attribute specifier. Bit mask values like SMG_M_BOLD are in module 'vms_smgdef'.
rendition_complement
Attribute complement specifier. There are no symbolic names available - please see the OpenVMS documentation for details.
flags
Optional bit mask that specifies the action to take if the text does not fit on the line. Bit masks like SMG_M_WRAP_WORD are in module 'vms_smgdef'.
character_set
The default character set for all text. Constants like SMG_C_ASCII 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, display_id = vms_smg.create_virtual_display \
...         (5, 10, vms_smgdef.SMG_M_BORDER, None, None)
>>>

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

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

Screen layout, file: VMS_SMG_015.JPG

(picture VMS_SMG_015.JPG)

>>> # insert characters in line 2
>>> status = vms_smg.insert_line \
...        (display_id, 2, 'LI1', vms_smgdef.SMG_M_DOWN)
>>>

Screen layout, file: VMS_SMG_066.JPG

(picture VMS_SMG_066.JPG)

>>> # insert graphic symols in line 4
>>> status = vms_smg.insert_line \
...        (display_id, 4, 'qnqxq', vms_smgdef.SMG_M_UP, \
...        None, None, None, vms_smgdef.SMG_C_SPEC_GRAPHICS)
>>>

Screen layout, file: VMS_SMG_027.JPG

(picture VMS_SMG_027.JPG)

The first line containing 'Line1Line1' has scrolled off the (upper row) of the screen.


(go to: table of contents, index, list of vms_smg, prev: INSERT_CHARS, next: INVALIDATE_DISPLAY)

10-SEP-2000 ZE.