(LOGO.JPG) Python for OpenVMS

(go to: table of contents, index, list of vms_smg, prev: PREV, next: HOME_CURSOR)


GET_VIEWPORT_CHAR - Get Characteristics of Display Viewport

Return the characteristics of the specified viewport.

Format:

    viewport_row_start, viewport_column_start,      \
    viewport_number_rows, viewport_number_columns = \
        vms_smg.get_viewport_char (display_id)
Returns:
viewport_row_start
The starting row number of the viewport
viewport_column_start
The starting column number of the specified viewport.
viewport_number_rows
The number of rows in the specified viewport.
viewport_number_columns
The number of columns in the specified viewport.
Arguments:
display_id
Display to which the viewport is associated.
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)
>>>

>>> # create a viewport
>>> status = vms_smg.create_viewport (vtdpy1, 2, 3, 4, 5)
>>>

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

Screen layout, file: VMS_SMG_009.JPG

(picture VMS_SMG_009.JPG)

>>> # get information about this viewport
>>> viewport_row_start, viewport_column_start,      \
... viewport_number_rows, viewport_number_columns = \
...     vms_smg.get_viewport_char (vtdpy1)
>>> print viewport_row_start, viewport_column_start
2 3
>>> print viewport_number_rows, viewport_number_columns
4 5
>>>

(go to: table of contents, index, list of vms_smg, prev: PREV, next: HOME_CURSOR)

10-SEP-2000 ZE.