Kernel 8.0 APIs Banner
Office of Information and Technology (OIT) Banner
[skip navigation]

SETA^XGF(): Screen Video Attributes

Reference Type: Supported, Category: XGF Function Library, ICR#: 3173

Description

The SETA^XGF API sets all video attribute simultaneously, for subsequent screen output. This API is different from the $$READ^XGF(): Read Using Escape Processing API in that it takes a different form of the attribute argument, and, unlike the CHGA^XGF(): Screen Change Attributes API, it sets all attributes. The change in attribute remains in effect until you make another CHGA^XGF(): Screen Change Attributes, CLEAN^XGF: Screen/Keyboard Exit and Cleanup, or SETA^XGF API call. If you want only a temporary change in attribute, the SAY^XGF(): Screen String API might be a better function to use.

A call to the PREP^XGF(): Screen/Keyboard Setup API must be made at some point prior to calling the SETA^XGF API.

The value of the attribute parameter uses one bit for the value of each video attribute. The format of the bits is not documented. The current setting of all video attributes is accessible via the xgcuratr parameter, however. Rather than trying to use the SETA^XGF API to control an individual video attribute's setting, you should use it mainly to restore the screen attributes based on a previously saved value of XGCURATR.

Format

  SETA^XGF(atr_code)

Input Parameters

atr_code:

(required) Single character containing the states of all video attributes as the bit values. This argument itself should be derived from a previous call to the PREP^XGF(): Screen/Keyboard Setup, CHGA^XGF(): Screen Change Attributes, or SETA^XGF APIs.

Output Variables

XGCURATR:

This parameter always holds the current screen attribute coded as a single character, and is updated when you call SETA^XGF.

$X and $Y:

Left unchanged.

NOTE: See also: $$READ^XGF(): Read Using Escape Processing API.

Example

To save the initial screen attribute settings to variable SAVEATR, do a function called SOME^THING, and then reset all the video attributes to their initial state, do the following:

>D PREP^XGF S SAVEATR=XGCURATR
>D SOME^THING
>D SETA^XGF(SAVEATR)