(LOGO.JPG) Python for OpenVMS

(go to: table of contents, index, list of vms_smg, prev: CHANGE_PBD_CHARACTERISTICS, next: CHANGE_VIEWPORT)


CHANGE_RENDITION - Change Default Rendition

Changes the video attributes for all or part of a virtual display.

Format:

    status = vms_smg.change_rendition (display_id, \
        start_row, start_column,                   \
        number_of_rows, number_of_columns,         \
        [rendition_set], [rendition_complement])
Returns:
status
Condition code as returned from SMG$CHANGE_RENDITION. Either SS$_NORMAL or SMG$_NO_CHADIS are returned here - all other codes produce a Python exception.
Arguments:
display_id
Display whoes default rendition is to be changed.
start_row
Starting row position to receive the new rendition.
start_column
Starting column position to receive the new rendition.
number_of_rows
Number of rows to receive the new rendition.
number_of_columns
Number of columns to receive the new rendition.
rendition_set
Attribute specifier. Bit masks like SMG_M_BLINK are in module 'vms_smgdef'.
rendition_complement
Attribute complement specifier. There are no symbolic values available for these bits. Please see the 'OpenVMS RTL Screen Management (SMG$) Manual'.
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)
>>>

>>> # 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)
>>>

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

Screen layout, file: VMS_SMG_008.JPG

(picture VMS_SMG_008.JPG)

>>> # define the new rendition set
>>> rendition_set = vms_smgdef.SMG_M_REVERSE + \
...                 vms_smgdef.SMG_M_UNDERLINE
>>> # change the set
>>> status = vms_smg.change_rendition \
...          (vtdpy1, 2, 3, 2, 3, rendition_set)
>>> 

Screen layout. file: VMS_SMG_011.JPG

(picture VMS_SMG_011.JPG)

>>> # try to change the rendition of a non-existing display
>>> status = vms_smg.change_rendition (vtdpy1+99, 1, 2, 3, 4)
Traceback (innermost last):
  File "<stdin>", line 1, in ?
vms_smg.error: (1212956, '%SMG-F-INVDIS_ID, invalid display-id')
>>>

>>> # use a bad value for the rendition_complement
>>> status = vms_smg.change_rendition (vtdpy1, 1, 2, 3, 4, 3, 99)
Traceback (innermost last):
  File "<stdin>", line 1, in ?
vms_smg.error: (1212940, '%SMG-F-INVARG, invalid argument')
>>>

(go to: table of contents, index, list of vms_smg, prev: CHANGE_PBD_CHARACTERISTICS, next: CHANGE_VIEWPORT)

10-SEP-2000 ZE.