(LOGO.JPG) Python for OpenVMS

(go to: table of contents, index, list of vms_smg, prev: SAVE_VIRTUAL_DISPLAY, next: SCROLL_VIEWPORT)


SCROLL_DISPLAY_AREA - Scroll Display Area

Scroll a rectangular region of a virtual display.

A default scrolling area can be defined with the vms_smg.set_display_scroll_region() routine.

Format:

    None = vms_smg.scroll_display_area (display_id, \
                  [start_row], [start_column],      \
                  [height],    [width],             \
                  [direction], [count])
Returns:

None

Arguments:

display_id
Virtual display in which scrolling takes place.
start_row
The first row of the scrolling region. If omitted, row 1 is used.
start_column
The first column of the scrolling region. If omitted, column 1 is used.
height
The number of rows in the scrolling region.
width
The number of columns in the scrolling region.
direction
The direction to scroll. Bit mask values like SMG_M_UP are defined in module 'vms_smgdef'.
count
The number of lines or columns to scroll. If omitted, one row or column is scrolled.
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)
>>>
>>> # 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)
>>>

Screen layout, file: VMS_SMG_008.JPG

(picture VMS_SMG_008.JPG)

>>> # scroll down 2 lines in a 4x5 area at (2,3)
>>> vms_smg.scroll_display_area (vtdpy1, \
...        2, 3,                     # at: row 2, column 3 ('c')
...        4, 5,                     # 4 rows, 5 columns big
...        vms_smgdef.SMG_M_DOWN, 2) # 2 rows down
>>>

Screen layout, file: VMS_SMG_056.JPG

(picture VMS_SMG_056.JPG)

>>> # scroll right 4 lines in a 7x3 area at (2,2)
>>> vms_smg.scroll_display_area (vtdpy1, \
...        2, 2,                      # row 2, column 2 ('B')
...        3, 7,                      # 3 rows, 7 columns
...        vms_smgdef.SMG_M_RIGHT, 4) # 4 columns right
>>>

Screen layout, file: VMS_SMG_057.JPG

(picture VMS_SMG_057.JPG)

>>> # attempt to scroll more columns (4) than the area is wide (3)
>>> vms_smg.scroll_display_area (vtdpy1, \
...        2, 2,                      # row 2, column 2
...        7, 3,                      # 7 rows, 3 columns
...        vms_smgdef.SMG_M_RIGHT, 4) # 4 columns right
Traceback (innermost last):
  File "<stdin>", line 4, in ?
vms_smg.error: (1212940, '%SMG-F-INVARG, invalid argument')
>>>

(go to: table of contents, index, list of vms_smg, prev: SAVE_VIRTUAL_DISPLAY, next: SCROLL_VIEWPORT)

11-SEP-2000 ZE.