|
OpenVMS/Hanzi RTL Chinese Screen Management (SMG$)
Manual
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 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
|
character-set
OpenVMS usage |
longword_unsigned |
type |
longword (unsigned) |
access |
read only |
mechanism |
by reference |
Specifies the character set of the text in the text.
The character-set argument is the address of an
unsigned longword that contains the character set code. If this
argument is omitted, the default character set will be the character
set which was set up by SMG$CREATE_VIRTUAL_DISPLAY or by
SMG$CHANGE_VIRTUAL_DISPLAY. Valid values are as follows.
Value |
Character Set |
SMG$C_ASCII
|
ASCII
|
SMG$C_SPEC_GRAPHICS
|
DEC Special Graphics
|
SMG$C_HANZI
|
DEC Hanzi
|
1One of DEC supplemental character set and Latin-1 character
set.
Description
SMG$PUT_CHARS_WIDE writes double-width text to the specified virtual
display, possibly overwriting any existing text. The line cannot
contain a mixture of single- and double-width characters; if the line
previously contained any single-width characters, those characters will
be replaced with blanks. The virtual cursor is left at the first
character position following the text written.
If the display has the SMG$M_TRUNC_ICON attribute, SMG$PUT_CHAR outputs
the truncation icon when the line overflows the display.
In the case that Chinese language character set is used, if the
start-column is on the right portion of a
Chinese character, the left portion of the character will become
an undefined character. Also, if the operation terminates on the left
portion of a Chinese character, the right portion of the
character will become an undefined character. Furthermore, if the
discard begins on the right portion of a Chinese character, the
left portion of the character will become an undefined character.
Condition Values Returned
SS$_NORMAL
|
Normal successful completion.
|
SMG$_INVARG
|
Invalid argument.
|
SMG$_INVCOL
|
Invalid column.
|
SMG$_INVROW
|
Invalid row.
|
SMG$_WILUSERMS
|
Pasteboard is not a video terminal.
|
SMG$_WRONUMARG
|
Wrong number of arguments.
|
SMG$_INVDIS_ID
|
Invalid
display-id.
|
LIB$_INVSTRDES
|
Invalid string descriptor.
|
SMG$PUT_HELP_TEXT
The Output Help Text to the Display routine retrieves and outputs the
help text for the specified topic in the virtual display provided.
Format
SMG$PUT_HELP_TEXT display-id [,keyboard-id] [,help-topic]
[,help-library] [,rendition-set] [,rendition-complement]
[,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 |
Display identifier of the virtual display to which the help text is
written. The display-id argument is the address of an
unsigned longword that contains this virtual display identifier. Note
that this display must be pasted and cannot be occluded or batched.
keyboard-id
OpenVMS usage |
identifier |
type |
longword (unsigned) |
access |
read only |
mechanism |
by reference |
Optional keyboard identifier of the virtual keyboard used for input.
The keyboard-id argument is the address of an unsigned
longword that contains this virtual keyboard identifier. If the
keyboard-id parameter is not specified, prompting is
disabled.
help-topic
OpenVMS usage |
char_string |
type |
character string |
access |
read only |
mechanism |
by descriptor |
Optional help topic. The help-topic argument is the
address of a descriptor pointing to the help topic string.
The help topic string pointed by help-topic argument
must be composed by ASCII characters. If the help topic is not composed
by ASCII characters, help-topic argument is ignored
and the help facility is just invoked.
help-library
OpenVMS usage |
char_string |
type |
character string |
access |
read only |
mechanism |
by descriptor |
Optional help library name. The help-library argument
is the address of a descriptor pointing to the help library name. The
default is SYS$HELP:HELPLIB.HLB.
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 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
|
character-set
OpenVMS usage |
longword_unsigned |
type |
longword (unsigned) |
access |
read only |
mechanism |
by reference |
Character set specifier. The optional character-set
argument is the address of an unsigned longword that specifies the
character set to be used when writing out the help text. If this
argument is omitted, the virtual display's default character set is
used.
Value |
Character Set |
SMG$C_ASCII
|
ASCII
|
SMG$C_SPEC_GRAPHICS
|
DEC Special Graphics
|
SMG$C_HANZI
|
DEC Hanzi
|
1One of DEC supplemental character set and Latin-1 character
set.
Description
SMG$PUT_HELP_TEXT lets you retrieve and output help text for a
specified topic in the virtual display specified. The text is output to
the virtual display's scrolling region. If you specify the
keyboard-id argument, you are prompted for input when
the last line of the virtual scrolling region is reached. In response
to this prompt you can either press the Return key to continue the
display, or enter a new topic to receive help on. Note that the virtual
display specified by display-id cannot be batched or
contain a viewport. If the keyboard-id argument is
specified, the virtual display cannot be occluded and must contain at
least three rows.
The help topic string in other than ASCII character set is not
supported.
Condition Values Returned
SS$_NORMAL
|
Normal successful completion.
|
SMG$_NOTPASTED
|
The virtual display specified by
display-id is not pasted.
|
SMG$_ILLBATFNC
|
The virtual display or pasteboard was batched.
|
SMG$_INVARG
|
Invalid argument.
|
SMG$_INVDIS_ID
|
The
display-id is illegal, has an associated viewport, or
is occluded.
|
LIB$_xxxx
|
Any condition value returned by LIB$FIND_IMAGE_SYMBOL.
|
LBR$_xxxx
|
Any condition value returned by LBR$OUTPUT_HELP.
|
SMG$_xxxx
|
Any condition value returned by SMG$SET_CURSOR_ABS or
SMG$CHECK_FOR_OCCLUSION.
|
SMG$PUT_LINE
The Write Line to Virtual Display routine writes a line of text to a
virtual display, beginning at the current virtual cursor position.
Format
SMG$PUT_LINE display-id ,text [,line-advance] [,rendition-set]
[,rendition-complement] [,flags] [,character-set] [,direction]
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 affected. 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.
text
OpenVMS usage |
char_string |
type |
character string |
access |
read only |
mechanism |
by descriptor |
The characters to be written to the virtual display. The
text argument is the address of a descriptor pointing
to the text.
line-advance
OpenVMS usage |
longword_signed |
type |
longword (signed) |
access |
read only |
mechanism |
by reference |
Specifies the number of lines to advance after output. The
line-advance argument is the address of a signed
longword that contains the number of lines to advance. The default is
1. If you specify 0 for line-advance, SMG$PUT_LINE
overwrites any existing text.
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
|
flags
OpenVMS usage |
mask_longword |
type |
longword (unsigned) |
access |
read only |
mechanism |
by reference |
Optional bit mask that specifies the action to be taken if the text
does not fit on the line. The flags argument is the
address of an unsigned longword that contains the flag. The
flags argument accepts the following values:
0
|
Does not wrap (the default).
|
SMG$M_WRAP_CHAR
|
Wraps at the last character on the line.
|
SMG$M_WRAP_WORD
|
Wraps at the last space on the line.
|
character-set
OpenVMS usage |
longword_unsigned |
type |
longword (unsigned) |
access |
read only |
mechanism |
by reference |
Specifies the character set of the text in the text.
The character-set argument is the address of an
unsigned longword that contains the character set code. If this
argument is omitted, the default character set will be the character
set set up by SMG$CREATE_VIRTUAL_DISPLAY or by
SMG$CHANGE_VIRTUAL_DISPLAY.
Value |
Character Set |
SMG$C_ASCII
|
ASCII
|
SMG$C_SPEC_GRAPHICS
|
DEC Special Graphics
|
SMG$C_HANZI
|
DEC Hanzi
|
1One of DEC supplemental character set and Latin-1 character
set.
direction
OpenVMS usage |
longword_unsigned |
type |
longword (unsigned) |
access |
read only |
mechanism |
by reference |
Specifies the direction to scroll, if scrolling is necessary. The
direction argument is the address of an unsigned
longword that contains the direction code. Valid values are SMG$M_UP
and SMG$M_DOWN. SMG$M_UP is the default.
Description
SMG$PUT_LINE writes lines of text to the virtual display, beginning at
the current line. Once text reaches the bottom or top line (depending
on the scrolling direction), subsequent calls to this routine cause the
display to scroll. SMG$PUT_LINE writes out the entire line, starting at
the current virtual cursor position. If the caller's text does not span
the entire line, the line is padded with blanks.
If flags specifies wrapping, lines are scrolled
line-advance times to make room for the overflow
characters in the "next" line. The "next" line is
determined by the scrolling direction. If
flags does not specify wrapping, excess characters are
discarded.
Following a call to SMG$PUT_LINE, the virtual cursor position is set to
column 1 of the next line where output should occur. The next line
where output should occur is determined by the
line-advance and direction arguments;
line-advance defaults to 1 so that subsequent calls to
SMG$PUT_LINE do not cause overprinting.
Other SMG$ procedures that can be used to write lines of text to a
virtual display are SMG$PUT_LINE_WIDE, SMG$PUT_LINE_HIGHWIDE,
SMG$PUT_LINE_MULTI, and SMG$INSERT_LINE.
Original SMG routines support only ASCII(default) and DEC Special
Graphics, but Chinese SMG will allow users to specify the
character-set which enables Chinese language to
be used.
In case Chinese language character set is used, and the current
virtual cursor position is on the right portion of a Chinese
character, the left portion of the character will become an undefined
character. Also, if the discard begins on the right portion of a
Chinese character, the left portion of the character will become
an undefined character.
Condition Values Returned
SS$_NORMAL
|
Normal successful completion.
|
SMG$_INVDIS_ID
|
Invalid
display-id.
|
SMG$_WRONUMARG
|
Wrong number of arguments.
|
LIB$_INVSTRDES
|
Invalid string descriptor.
|
SMG$_WILUSERMS
|
Pasteboard is not a video terminal.
|
Examples
#1 |
C+
C This DEC Fortran example program demonstrates the use of SMG$PUT_LINE.
C-
C+
C Include the SMG definitions. In particular, we want SMG$M_BORDER and
C SMG$M_UNDERLINE.
C-
IMPLICIT INTEGER (A-Z)
INCLUDE '($SMGDEF)'
CHARACTER*30 TEXT(3)
C+
C Create a virtual display with a border.
C-
ROWS = 7
COLUMNS = 50
STATUS = SMG$CREATE_VIRTUAL_DISPLAY
1 (ROWS, COLUMNS, DISPLAY1, SMG$M_BORDER)
IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS))
C+
C Create the pasteboard.
C-
STATUS = SMG$CREATE_PASTEBOARD (PASTE1)
IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS))
C+
C Put data in the virtual display.
C-
TEXT(1) = 'This virtual display has 7'
TEXT(2) = 'rows and 50 columns.'
TEXT(3) = 'Text entered by SMG$PUT_LINE.'
C+
C After the first line of text is printed, call SMG$PUT_LINE to
C advance two lines.
C-
STATUS = SMG$PUT_LINE ( DISPLAY1, TEXT(1), 2 )
IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS))
C+
C Now, use SMG$PUT_LINE to underline the next line of text.
C Notice that 30 characters are being underlined. Advance 1
C line of text after displaying the line.
C-
STATUS = SMG$PUT_LINE ( DISPLAY1, TEXT(2), 1, SMG$M_UNDERLINE )
IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS))
C+
C Display the third line of text.
C-
STATUS = SMG$PUT_LINE ( DISPLAY1, TEXT(3) )
IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS))
C+
C Paste the virtual display.
C-
STATUS = SMG$PASTE_VIRTUAL_DISPLAY ( DISPLAY1, PASTE1, 4, 15 )
IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS))
END
|
|