(LOGO.JPG) Python for OpenVMS

(go to: table of contents, index, list of vms_smg, prev: PUT_LINE_HIGHWIDE, next: PUT_LINE_WIDE)


PUT_LINE_MULTI - Write Line with Multiple Renditions to Display

Write lines with multiple renditions to the virtual display, optionally followed by cursor movement sequences.

Format:

    status = vms_smg.put_line_multi (display_id, text,          \
                    [rendition_string], [rendition_complement], \
                    [line_advance], [flags], [direction],       \
                    [character_set])
Returns:
status
Condition code as returned from SMG$PUT_LINE_MULTI. Either SS$_NORMAL or SMG$_WILUSERMS are returned here - all other codes produce a Python exception.
Arguments:
display_id
Identifier of the virtual display in which to put the text.
text
Characters to be written to the virtual display.
rendition_string
Optional bit mask string that controls the video attributes. Each attribute set causes the corresponding attribute to be set for the corresponding byte in the text string in the display. Bit mask values like SMG_M_BOLD are in module 'vms_smgdef'.
rendition_complement
Optional bit mask string that controls the video attributes. There are no symbolic names available - please see the OpenVMS documentation for details.
line_advance
Specifies the number of lines to advance after output.
flags
Bit mask that specifies the action to take if the text does not fit on the line. Values like SMG_M_WRAP_CHAR are in module 'vms_smgdef'.
direction
Specifies the direction to scroll, if scrolling is necessary. Bit mask values like SMG_M_DOWN 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 virtual display
>>> status, vtdpy1 = vms_smg.create_virtual_display \
...         (5, 10, vms_smgdef.SMG_M_BORDER, None, None)
>>>

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

>>> # put characters on 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)
>>>

Screen layout, file: VMS_SMG_008.JPG

(picture VMS_SMG_008.JPG)

>>> # position cursor 
>>> vms_smg.set_cursor_abs (vtdpy1, 2, 2)
>>>

>>> # put line on virtual display
>>> status = vms_smg.put_line_multi (vtdpy1, 'VTDPY1')

>>> # position cursor 
>>> vms_smg.set_cursor_abs (vtdpy1, 3, 2)
>>>

>>> # write to virtual display - graphics
>>> status = vms_smg.put_line_multi (vtdpy1, 'qnqxq', None, None, \
...        0, None, None, vms_smgdef.SMG_C_SPEC_GRAPHICS)
>>>

>>> # position cursor 
>>> vms_smg.set_cursor_abs (vtdpy1, 5, 2)

>>> rendition_string = chr(vms_smgdef.SMG_M_BOLD)    + \
...                    chr(vms_smgdef.SMG_M_REVERSE) + \
...                    chr(vms_smgdef.SMG_M_UNDERLINE) 
>>> # caution - these are control characters that can screw up
>>> #           a terminal's setting! - use repr() for inspection
>>> print repr (rendition_string)
'\001\002\010'
>>>
>>> status = vms_smg.put_line_multi (vtdpy1, 'bru', \
...                 rendition_string, None,         \
...                 0, 0, vms_smgdef.SMG_M_UP,      \
...                 vms_smgdef.SMG_C_ASCII)
>>>

Screen layout, file: VMS_SMG_042.JPG

(picture VMS_SMG_042.JPG)

The 'b' in the last line appears bold, the 'r' in the last line appears reverse and the 'u' in the last line appears underlined.


(go to: table of contents, index, list of vms_smg, prev: PUT_LINE_HIGHWIDE, next: PUT_LINE_WIDE)

10-SEP-2000 ZE.