[an error occurred while processing this directive]

HP OpenVMS Systems Documentation

Content starts here

OpenVMS/Hangul RTL Korean Screen Management (SMG$) Manual


Previous Contents


SMG$CHANGE_RENDITION

The Change Default Rendition routine changes the video attributes for all or part of a virtual display.

Format

SMG$CHANGE_RENDITION display-id ,start-row ,start-column ,number-of-rows ,number-of-columns [,rendition-set] [,rendition-complement]


RETURNS


OpenVMS usage cond_value
type longword (unsigned)
access write only
mechanism by value


Arguments

display-id


OpenVMS usage identifier
type longword (unsigned)
access read only
mechanism by reference

Specifies the virtual display whose default rendition is to be changed. The display-id argument is the address of an unsigned longword that contains the display identifier.

Display-id is returned by SMG$CREATE_VIRTUAL_DISPLAY.

start-row


OpenVMS usage longword_signed
type longword (signed)
access read only
mechanism by reference

Starting row position to receive the new rendition. The start-row argument is the address of a signed longword that contains the starting row number.

start-column


OpenVMS usage longword_signed
type longword (signed)
access read only
mechanism by reference

Starting column position to receive the new rendition. The start-column argument is the address of a signed longword that contains the starting column number.

In the case that the right portion of a Korean character is specified in the start-column, the left portion of the character also receives the new rendition.

number-of-rows


OpenVMS usage longword_signed
type longword (signed)
access read only
mechanism by reference

Number of rows to receive the new rendition. The number-of-rows argument is the address of a signed longword that contains the number of rows to be affected.

number-of-columns


OpenVMS usage longword_signed
type longword (signed)
access read only
mechanism by reference

Number of columns to receive the new rendition. The number-of-columns argument is the address of a signed longword that contains the number of columns to be affected.

rendition-set


OpenVMS usage mask_longword
type longword (unsigned)
access read only
mechanism by reference

Attribute specifier. The optional rendition-set argument is the address of a longword bit mask in which each attribute set causes the corresponding attribute to be set in the display. The following attributes can be specified using the rendition-set argument:
SMG$M_BLINK Displays blinking characters.
SMG$M_BOLD Displays characters in higher-than-normal intensity.
SMG$M_REVERSE Displays characters in reverse video, that is, using the opposite of the default rendition of the virtual display.
SMG$M_UNDERLINE Displays underlined characters.
SMG$M_INVISIBLE Specifies invisible characters; that is, the characters exist in the virtual display but do not appear on the pasteboard.
SMG$M_USER1 through
SMG$M_USER8
Displays user-defined attributes.

The display-id argument must be specified when you use the rendition-set argument.

rendition-complement


OpenVMS usage mask_longword
type longword (unsigned)
access read only
mechanism by reference

Attribute complement specifier. The optional rendition-complement argument is the address of a longword bit mask in which each attribute set causes the corresponding attribute to be complemented in the display. All of the attributes that can be specified with the rendition-set argument can be complemented with the rendition-complement argument. The display-id argument must be specified when you use the rendition-complement argument.

The optional arguments rendition-set and rendition-complement let the user control the attributes of the virtual display. The rendition-set argument sets certain virtual display attributes, while rendition-complement complements these attributes. If the same bit is specified in both the rendition-set and rendition-complement parameters, rendition-set is evaluated first, followed by rendition-complement. By using these two parameters together, the user can control each virtual display attribute in a single procedure call. On a single-attribute basis, the user can cause the following transformations:

Set Complement Action
0 0 Attribute set to default
1 0 Attribute on
0 1 Attribute set to complement of default setting
1 1 Attribute off

Description

This procedure changes the default video rendition of a rectangular block of text already in the specified virtual display. For example, you might use this procedure to redisplay a particular row in reverse video.

In the case Korean language character set is used, if the start-column is on the right portion of a Korean character, the left portion of the character also receives the new rendition. Also, if the rectangular block ends on the left portion of a Korean character, the right portion of the character receives the new rendition, too.


Condition Values Returned

SS$_NORMAL Normal successful completion.
SMG$_INVROW Invalid start-row. The specified row is outside the virtual display.
SMG$_INVCOL Invalid start-column. The specified column is outside the virtual display.
SMG$_INVDIS_ID Invalid display-id.
SMG$_INVARG Invalid number of rows, invalid number of columns, unrecognized rendition-set code, or unrecognized rendition-complement code.
SMG$_NO_CHADIS No change in virtual display.
SMG$_WRONUMARG Wrong number of arguments.

SMG$CHANGE_VIEWPORT

The Change the Viewport Associated with a Virtual Display routine changes the size of an existing viewport in a virtual display. The text currently in the viewport is remapped to fit the new dimensions.

Format

SMG$CHANGE_VIEWPORT display-id [,viewport-row-start] [,viewport-column-start] [,viewport-number-rows] [,viewport-number-columns]


RETURNS


OpenVMS usage cond_value
type longword (unsigned)
access write only
mechanism by value


Arguments

display-id


OpenVMS usage identifier
type longword (unsigned)
access read only
mechanism by reference

Identifier of the virtual display containing the viewport to be changed. The display-id argument is the address of an unsigned longword containing this identifier.

viewport-row-start


OpenVMS usage longword_signed
type longword (signed)
access read only
mechanism by reference

Optional row number in the virtual display that will become row 1 in the changed viewport. The viewport-row-start argument is the address of a signed longword containing the row number. If omitted, the present viewport-row-start value is used.

viewport-column-start


OpenVMS usage longword_signed
type longword (signed)
access read only
mechanism by reference

Optional column number in the virtual display that will become column 1 in the changed viewport. The viewport-column-start argument is the address of a signed longword containing the column number. If omitted, the present viewport-column-start value is used.

In the case that the viewport-column-start begins on the right portion of a Korean character, the right portion of the character becomes invisible.

viewport-number-rows


OpenVMS usage longword_signed
type longword (signed)
access read only
mechanism by reference

Optional number of rows in the changed viewport. The viewport-number-rows argument is the address of a signed longword containing the number of rows. If omitted, the present viewport-number-rows value is used.

viewport-number-columns


OpenVMS usage longword_signed
type longword (signed)
access read only
mechanism by reference

Optional number of columns in the changed viewport. The viewport-number-columns argument is the address of a signed longword containing the number of columns. If omitted, the present viewport-number-columns value is used.

Description

SMG$CHANGE_VIEWPORT lets you change the size of an existing viewport in a virtual display. The text currently in this viewport is remapped to fit the new dimensions, starting at the position specified by the viewport-row-start and viewport-column-start arguments. This position also specifies the resulting virtual cursor location.

In case Korean language character set is used, and the viewport-column-start begins on the right portion of a Korean character, the right portion of the character will become invisible. Also if the viewport ends on the left portion of a Korean character, the left portion of the character will become invisible.


Condition Values Returned

SS$_NORMAL Normal successful completion.
SMG$_INVARG Number of rows or columns is less than zero.
SMG$_INVCOL Invalid column specified.
SMG$_INVDIS_ID Invalid display-id.
SMG$_INVROW Invalid row specified.
SMG$_NO_WINASSOC No viewport associated with the virtual display.
SMG$_WRONUMARG Wrong number of arguments.

Example


C+
C This DEC Fortran example program demonstrates the use of
C SMG$CHANGE_VIEWPORT.
C-


        IMPLICIT INTEGER (A-Z)
        INCLUDE '($SMGDEF)'

C Create the virtual display. Give it a border.

        ROWS = 9
        COLUMNS = 50

        STATUS = SMG$CREATE_VIRTUAL_DISPLAY
     1         (ROWS, COLUMNS, DISPLAY1,SMG$M_BORDER )
        IF (.NOT. STATUS) CALL LIB$SIGNAL(%val(STATUS))

C Create the pasteboard.

        STATUS = SMG$CREATE_PASTEBOARD (PASTE1)
        IF (.NOT. STATUS) CALL LIB$SIGNAL(%val(STATUS))

C Put data in the virtual display.

        STATUS = SMG$PUT_CHARS ( DISPLAY1,
     1               'This is row 1 in a virtual display with 9 rows.',1,1)
        IF (.not. STATUS) CALL LIB$SIGNAL(%val(STATUS))

        STATUS = SMG$PUT_CHARS ( DISPLAY1,
     1               'This is row 2 in a virtual display with 9 rows.',2,1)
        IF (.not. STATUS) CALL LIB$SIGNAL(%val(STATUS))

        STATUS = SMG$PUT_CHARS ( DISPLAY1,
     1               'This is row 3 in a virtual display with 9 rows.',3,1)
        IF (.not. STATUS) CALL LIB$SIGNAL(%val(STATUS))

        STATUS = SMG$PUT_CHARS ( DISPLAY1,
     1               'This is row 4 in a virtual display with 9 rows.',4,1)
        IF (.not. STATUS) CALL LIB$SIGNAL(%val(STATUS))

        STATUS = SMG$PUT_CHARS ( DISPLAY1,
     1               'This is row 5 in a virtual display with 9 rows.',5,1)
        IF (.not. STATUS) CALL LIB$SIGNAL(%val(STATUS))

        STATUS = SMG$PUT_CHARS ( DISPLAY1,
     1               'This is row 6 in a virtual display with 9 rows.',6,1)
        IF (.not. STATUS) CALL LIB$SIGNAL(%val(STATUS))

        STATUS = SMG$PUT_CHARS ( DISPLAY1,
     1               'This is row 7 in a virtual display with 9 rows.',7,1)
        IF (.not. STATUS) CALL LIB$SIGNAL(%val(STATUS))

        STATUS = SMG$PUT_CHARS ( DISPLAY1,
     1               'This is row 8 in a virtual display with 9 rows.',8,1)
        IF (.not. STATUS) CALL LIB$SIGNAL(%val(STATUS))

        STATUS = SMG$PUT_CHARS ( DISPLAY1,
     1               'This is row 9 in a virtual display with 9 rows.',9,1)
        IF (.not. STATUS) CALL LIB$SIGNAL(%val(STATUS))

C Paste the virtual display.

        STATUS = SMG$COPY_VIRTUAL_DISPLAY(DISPLAY1,DISPLAY2)
        IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS))

        STATUS = SMG$LABEL_BORDER (DISPLAY1, 'Full Display',,,SMG$M_BOLD)
        IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS))

        STATUS = SMG$LABEL_BORDER (DISPLAY2, 'Viewport',,,SMG$M_BOLD)
        IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS))

        STATUS = SMG$PASTE_VIRTUAL_DISPLAY ( DISPLAY1, PASTE1, 2, 10)
        IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS))

        STATUS = SMG$PASTE_VIRTUAL_DISPLAY ( DISPLAY2, PASTE1, 13, 10)
        IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS))
        CALL LIB$WAIT (4.0)

        STATUS = SMG$CREATE_VIEWPORT ( DISPLAY2, 2, 1, 5, 21)
        IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS))
        CALL LIB$WAIT (4.0)

        STATUS = SMG$PASTE_VIRTUAL_DISPLAY ( DISPLAY2, PASTE1, 13, 10)
        IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS))
        CALL LIB$WAIT (4.0)

        STATUS = SMG$CHANGE_VIEWPORT ( DISPLAY2, 4, 8, 3, 15)
        IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS))
        CALL LIB$WAIT (4.0)

        END


      

The output generated by this DEC Fortran example is shown in the following figures. In Figure SMG-1, the program has copied the initial virtual display into a second virtual display, labeled "Viewport".

Figure SMG-1 Output Generated After Virtual Displays Are Pasted


After the two identical virtual displays are pasted, the program creates a viewport on the second (copy) virtual display. Once the second display is "repasted", only the portion located in the viewport is visible. This is shown in Figure SMG-2.

Figure SMG-2 Output Generated After the Viewport Is Created


By calling SMG$CHANGE_VIEWPORT, the portion of the virtual display that is visible through the viewport is changed. This is shown in Figure SMG-3.

Figure SMG-3 Output Generated After Calling SMG$CHANGE_VIEWPORT



SMG$CHANGE_VIRTUAL_DISPLAY

The Change Virtual Display routine lets you change the dimensions, border, and video attributes of a virtual display.

Format

SMG$CHANGE_VIRTUAL_DISPLAY display-id [,number-of-rows] [,number-of-columns] [,display-attributes] [,video-attributes] [,character-set]


RETURNS


OpenVMS usage cond_value
type longword (unsigned)
access write only
mechanism by value


Arguments

display-id


OpenVMS usage identifier
type longword (unsigned)
access read only
mechanism by reference

Specifies the virtual display whose attributes are to be changed. The display-id argument is the address of an unsigned longword that contains the display identifier.

Display-id is returned by SMG$CREATE_VIRTUAL_DISPLAY.

number-of-rows


OpenVMS usage longword_signed
type longword (signed)
access read only
mechanism by reference

Specifies the new number of rows for the virtual display. The number-of-rows argument is the address of a signed longword that contains the number of rows in the virtual display.

number-of-columns


OpenVMS usage longword_signed
type longword (signed)
access read only
mechanism by reference

Specifies the new number of columns for the virtual display. The number-of-columns argument is the address of a signed longword that contains the number of columns in the virtual display.

display-attributes


OpenVMS usage mask_longword
type longword (unsigned)
access read only
mechanism by reference

Specifies the attributes of the virtual display. The display-attributes argument is the address of a longword bit mask that contains the display attributes.

Valid values for display-attributes are as follows:

SMG$M_BORDER Specifies a bordered display. If omitted, the display is not bordered.
SMG$M_BLOCK_BORDER Specifies a block bordered display. If omitted, the display is not bordered.
SMG$M_DISPLAY_CONTROLS Specifies that control characters such as carriage return and line feed are displayed as graphic characters, if your terminal supports them.
SMG$M_TRUNC_ICON Specifies that an icon (generally a diamond shape) is displayed where truncation of a line exceeding the width of the virtual display has occurred.

video-attributes


OpenVMS usage mask_longword
type longword (unsigned)
access read only
mechanism by reference

Specifies the default rendition to be applied to all output in a virtual display, unless overridden by a call to a specific output routine. The video-attributes argument is the address of an unsigned longword that contains the video attributes mask.

For example, a call to SMG$PUT_CHARS with an explicit rendition specified would override the default rendition.

The bits that can be set for this argument are as follows:

SMG$M_BLINK Displays blinking characters.
SMG$M_BOLD Displays characters in higher-than-normal intensity.
SMG$M_REVERSE Displays characters in reverse video, that is, to the opposite of the current default rendition of the virtual display.
SMG$M_UNDERLINE Displays underlined characters.
SMG$M_INVISIBLE Specifies invisible characters; that is, the characters exist in the virtual display but do not appear on the pasteboard.
SMG$M_USER1 through
SMG$M_USER8
Displays user-defined attributes.

Note that you can specify any combination of attributes in a single call. All other bits are reserved for use by Digital and must be zero.

character-set


OpenVMS usage longword_unsigned
type longword (unsigned)
access read only
mechanism by reference

Specifies the default character set for all text in this virtual display. The character-set argument is the address of an unsigned longword that contains the character set specifier. The valid values for this argument are as follows.
Value Character Set
SMG$C_ASCII ASCII
SMG$C_SPEC_GRAPHICS DEC Special Graphics
SMG$C_HANGUL DEC Hangul

1One of DEC supplemental character set and Latin-1 character set.


Description

SMG$CHANGE_VIRTUAL_DISPLAY lets you change the size or default attributes of an existing virtual display. If the size of the virtual display is changed, the Screen Management Facility attempts to remap the text associated with the display to fit the new dimensions (starting at row 1 and column 1). If the new size of the virtual display is smaller than the old size, text may be truncated.

In case the truncation starts on the right portion of a Korean character, the left portion of the character will become an undefined character. If the new size of the virtual display is larger than the old size, text may be padded on the right with spaces.


Previous Next Contents