Document revision date: 30 March 2001
[Compaq] [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]
[OpenVMS documentation]

OpenVMS RTL Screen Management (SMG$) Manual


Previous Contents Index


SMG$DISABLE_UNSOLICITED_INPUT

The Disable Unsolicited Input routine disables the trapping of unsolicited input.

Format

SMG$DISABLE_UNSOLICITED_INPUT pasteboard-id


RETURNS


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


Argument

pasteboard-id


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

Specifies the keyboard (associated with the specified pasteboard) for which unsolicited input is being disabled. The pasteboard-id argument is the address of an unsigned longword that contains the pasteboard identifier.

The pasteboard identifier is returned by SMG$CREATE_PASTEBOARD.


Description

SMG$DISABLE_UNSOLICITED_INPUT disables unsolicited input ASTs for the specified pasteboard. SMG$DISABLE_UNSOLICITED_INPUT deassigns the mailbox set with SMG$ENABLE_UNSOLICITED_INPUT, resets the terminal characteristics and, therefore, allows the user to call LIB$SPAWN. This routine must be used to disable any unsolicited input trapping enabled with the SMG$ENABLE_UNSOLICITED_INPUT routine.

Note that if both unsolicited input trapping and the trapping of broadcast messages are enabled, then both SMG$DISABLE_UNSOLICITED_INPUT and SMG$DISABLE_BROADCAST_TRAPPING must be invoked in order to deassign the mailbox.


Condition Values Returned

SS$_NORMAL Normal successful completion.
SMG$_INVPAS_ID Invalid pasteboard-id.
SMG$_WRONUMARG Wrong number of arguments.

Any condition values returned by $QIOW.


Example


      

For an example of using SMG$DISABLE_UNSOLICITED_INPUT, see the example for the SMG$DISABLE_BROADCAST_TRAPPING routine.


SMG$DRAW_CHAR

The Draw a Character in a Virtual Display routine draws a character at the specified position in a virtual display.

Format

SMG$DRAW_CHAR display-id ,flags [,row] [,column] [,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

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

flags


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

Optional bit mask indicating the character to be drawn. The flags argument is the address of an unsigned longword that contains the flag. The flags argument accepts the following character values:

Note that you may perform a logical OR operation to draw T characters, corner characters, cross characters, and so forth. A value of 0 draws a diamond character.

row


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

Optional row number specifying the row position at which the specified character is drawn. The row argument is the address of a signed longword containing the row number. If row is omitted, the character is drawn at the row position of the current virtual cursor.

column


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

Optional column number specifying the column position at which the specified character is drawn. The column argument is the address of a signed longword containing the column number. If column is omitted, the character is drawn at the column position of the current virtual cursor.

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

SMG$DRAW_CHAR draws a designated character at the specified position in the specified virtual display. Note that this routine does not change the position of the virtual cursor. The characters drawn depend on the type of terminal. For example, SMG$ uses the terminal's line-drawing character set if possible. If that is not available, SMG$ uses the plus sign (+), minus sign (--), and vertical bar (|) to draw a line.

Condition Values Returned

SS$_NORMAL Normal successful completion.
SMG$_INVCOL Invalid column number.
SMG$_INVROW Invalid row number.
SMG$_WRONUMARG Wrong number of arguments.

Example


C+ 
C This Fortran example demonstrates the use of 
C SMG$DRAW_CHAR to use the terminal line drawing 
C characters. 
C- 
 IMPLICIT INTEGER (A-Z) 
 INCLUDE '($SMGDEF)' 
 
 s = SMG$CREATE_PASTEBOARD(p_id) 
 IF (.NOT. s) CALL LIB$SIGNAL(%VAL(s)) 
 s = SMG$CREATE_VIRTUAL_DISPLAY(17,7,d_id,SMG$M_BORDER) 
 IF (.NOT. s) CALL LIB$SIGNAL(%VAL(s)) 
 s = SMG$PASTE_VIRTUAL_DISPLAY(d_id,p_id,4,30) 
 IF (.NOT. s) CALL LIB$SIGNAL(%VAL(s)) 
 s = SMG$SET_CURSOR_REL(d_id,1,3) 
 IF (.NOT. s) CALL LIB$SIGNAL(%VAL(s)) 
 
 s = SMG$DRAW_CHAR(d_id,SMG$M_UP,1,4,SMG$M_BOLD) 
 IF (.NOT. s) CALL LIB$SIGNAL(%VAL(s)) 
 s = SMG$DRAW_CHAR(d_id,SMG$M_DOWN,2,4,0,SMG$M_REVERSE) 
 IF (.NOT. s) CALL LIB$SIGNAL(%VAL(s)) 
 s = SMG$DRAW_CHAR(d_id,SMG$M_LEFT,3,4,SMG$M_BLINK) 
 IF (.NOT. s) CALL LIB$SIGNAL(%VAL(s)) 
 s = SMG$DRAW_CHAR(d_id,SMG$M_RIGHT,4,4,0,0) 
 IF (.NOT. s) CALL LIB$SIGNAL(%VAL(s)) 
 s = SMG$DRAW_CHAR(d_id,SMG$M_UP + SMG$M_DOWN,5) 
 IF (.NOT. s) CALL LIB$SIGNAL(%VAL(s)) 
 s = SMG$DRAW_CHAR(d_id,SMG$M_UP + SMG$M_LEFT,6) 
 IF (.NOT. s) CALL LIB$SIGNAL(%VAL(s)) 
 s = SMG$DRAW_CHAR(d_id,SMG$M_UP + SMG$M_RIGHT,7) 
 IF (.NOT. s) CALL LIB$SIGNAL(%VAL(s)) 
 s = SMG$DRAW_CHAR(d_id,SMG$M_DOWN + SMG$M_LEFT,8) 
 IF (.NOT. s) CALL LIB$SIGNAL(%VAL(s)) 
 s = SMG$DRAW_CHAR(d_id,SMG$M_DOWN + SMG$M_RIGHT,9) 
 IF (.NOT. s) CALL LIB$SIGNAL(%VAL(s)) 
 s = SMG$DRAW_CHAR(d_id,SMG$M_LEFT + SMG$M_RIGHT,10) 
 IF (.NOT. s) CALL LIB$SIGNAL(%VAL(s)) 
 s = SMG$DRAW_CHAR(d_id,SMG$M_UP + SMG$M_DOWN + SMG$M_LEFT,11) 
 IF (.NOT. s) CALL LIB$SIGNAL(%VAL(s)) 
 s = SMG$DRAW_CHAR(d_id,SMG$M_UP + SMG$M_DOWN + SMG$M_RIGHT,12) 
 IF (.NOT. s) CALL LIB$SIGNAL(%VAL(s)) 
 s = SMG$DRAW_CHAR(d_id,SMG$M_DOWN + SMG$M_LEFT + SMG$M_RIGHT,13) 
 IF (.NOT. s) CALL LIB$SIGNAL(%VAL(s)) 
 s = SMG$DRAW_CHAR(d_id,SMG$M_UP + SMG$M_LEFT + SMG$M_RIGHT,14) 
 IF (.NOT. s) CALL LIB$SIGNAL(%VAL(s)) 
 s = SMG$DRAW_CHAR(d_id,SMG$M_UP + SMG$M_DOWN + SMG$M_RIGHT + 
     1          SMG$M_LEFT, 15) 
 IF (.NOT. s) CALL LIB$SIGNAL(%VAL(s)) 
 s = SMG$DRAW_CHAR(d_id,0,16) 
 IF (.NOT. s) CALL LIB$SIGNAL(%VAL(s)) 
 
 END 
 
      

This example generates line-drawing characters in a single column.


SMG$DRAW_LINE

The Draw a Line routine draws a horizontal or vertical line.

Format

SMG$DRAW_LINE display-id ,start-row ,start-column ,end-row ,end-column [,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 on which the line is to be drawn. The display-id argument is the address of an unsigned longword that contains the display identifier.

The display identifier is returned by SMG$CREATE_VIRTUAL_DISPLAY.

start-row


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

Specifies the row at which to begin drawing the line. The start-row argument is the address of a signed longword that contains the row number at which to begin drawing the line.

start-column


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

Specifies the column at which to begin drawing the line. The start-column argument is the address of a signed longword that contains the column number at which to begin drawing the line.

end-row


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

Specifies the row at which the drawn line ends. The end-row argument is the address of a signed longword that contains the row number at which the drawn line ends.

end-column


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

Specifies the column at which the drawn line ends. The end-column argument is the address of a signed longword that contains the column number at which the drawn line ends.

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

SMG$DRAW_LINE draws a line from a specified starting row and column to a specified ending row and column. Note that this routine does not change the virtual cursor position. You can draw only horizontal or vertical lines. The characters used to draw the line depend on the type of terminal. If possible, SMG$ uses the terminal's line-drawing character set. If that is not available, SMG$ uses the plus sign (+), minus sign (-), and vertical bar (|) to draw the line.

Condition Values Returned

SS$_NORMAL Normal successful completion.
SMG$_DIALINNOT Diagonal line not allowed.
SMG$_INVCOL Invalid column number. The specified column is outside the virtual display.
SMG$_INVDIS_ID Invalid display-id.
SMG$_INVROW Invalid row number. The specified row is outside the virtual display
SMG$_WRONUMARG Wrong number of arguments.

Example


C+ 
C This Fortran example program demonstrates the use of SMG$DRAW_LINE. 
C- 
 
        INTEGER SMG$CREATE_VIRTUAL_DISPLAY, SMG$CREATE_PASTEBOARD 
        INTEGER SMG$PASTE_VIRTUAL_DISPLAY, SMG$DRAW_LINE 
        INTEGER DISPLAY1, PASTE1, ROWS, COLUMNS, BORDER, STATUS 
C+ 
C First, create the virtual display using SMG$CREATE_VIRTUAL_DISPLAY. 
C To give it a border, set BORDER = 1. No border would be BORDER = 0. 
C- 
 
        ROWS = 7 
        COLUMNS = 50 
        BORDER = 1 
 
        STATUS = SMG$CREATE_VIRTUAL_DISPLAY 
     1                                (ROWS, COLUMNS, DISPLAY1, BORDER) 
        IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS)) 
 
C+ 
C Call SMG$CREATE_PASTEBOARD to create the pasteboard. 
C- 
 
        STATUS = SMG$CREATE_PASTEBOARD (PASTE1) 
        IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS)) 
 
C+ 
C Draw a vertical line using SMG$DRAW_LINE. 
C Start at row 2, column 20. End at row 6. 
C- 
 
        STATUS = SMG$DRAW_LINE (DISPLAY1, 2, 20, 6, 20) 
        IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS)) 
 
C+ 
C Now, use SMG$DRAW_LINE to draw a vertical line. 
C Start at row 6, column 40. End at row 2. 
C This is similar to the line drawn above, but we are drawing the 
C line in the reverse direction. 
C- 
 
        STATUS = SMG$DRAW_LINE (DISPLAY1, 6, 40, 2, 40) 
        IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS)) 
C+ 
C Draw a horizontal line now, again calling SMG$DRAW_LINE. 
C Start at row 4, column 8. End at column 50. 
C- 
 
        STATUS = SMG$DRAW_LINE (DISPLAY1, 4, 8, 4, 50) 
        IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS)) 
 
C+ 
C Paste the virtual display using SMG$PASTE_VIRTUAL_DISPLAY. 
C- 
 
        STATUS = SMG$PASTE_VIRTUAL_DISPLAY ( DISPLAY1, PASTE1, 4, 15) 
        IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS)) 
 
        END 
 
      

The output generated by this Fortran example is shown in Figure SMG-17.

Figure SMG-17 Output Generated by Fortran Program Calling SMG$DRAW_LINE



Previous Next Contents Index

  [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]  
  privacy and legal statement  
5935PRO_016.HTML