(LOGO.JPG) Python for OpenVMS

(go to: table of contents, index, list of vms_smg, prev: CHECK_FOR_OCCLUSION, next: COPY_VIRTUAL_DISPLAY)


CONTROL_MODE - Control mode

Controls the pasteboard's mode.

Format:

    old_mode = vms_smg.control_mode \
               (pasteboard_id, [new_mode], [buffer_size])
Returns:
old_mode
The old settings before vms_smg.control_mode() was called.
Arguments:
pasteboard_id
The pasteboard to be changed.
new_mode
The new control settings to be used. Bit mask values like SMG_M_CLEAR_SCREEN are in module 'vms_smgdef'.
buffer_size
The buffer size in bytes. See the 'OpenVMS RTL Screen Management (SMG$) Manual' for details.
Examples:
>>> import vms_smg
>>> import vms_smgdef

>>> # create a pasteboard
>>> # note: unlike many other examples this one does not use
>>> #       a separate DECterm.
>>> #       You should put these commands in a script for testing.
>>> status, pasteboard_id, number_of_pasteboard_rows, \
... number_of_pasteboard_columns, type_of_terminal,   \
... device_name = vms_smg.create_pasteboard (None)
>>>

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

Screen layout, file: VMS_SMG_001.JPG

(picture VMS_SMG_001.JPG)

>>> old_mode = vms_smg.control_mode (pasteboard_id)
>>> print old_mode
18
>>> print vms_smgdef.SMG_M_MINUPD
2
>>> print vms_smgdef.SMG_M_PROTECT
16
>>>
>>> # if Python is terminated here without using
>>> #   vms_smg.delete_pasteboard, SMG will not
>>> #   clear the screen
>>>
>>>
>>> new_mode = old_mode | vms_smgdef.SMG_M_CLEAR_SCREEN
>>> old_mode = vms_smg.control_mode (pasteboard_id, new_mode)
>>>
>>> # if Python is terminated here without using
>>> #   vms_smg.delete_pasteboard, SMG will
>>> #   clear the screen

(go to: table of contents, index, list of vms_smg, prev: CHECK_FOR_OCCLUSION, next: COPY_VIRTUAL_DISPLAY)

10-SEP-2000 ZE.