U_REND

Process display renditions

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
xcall U_REND([D_COPY|D_LOAD], [renditions, attr, color], [...], 
&     [D_PALETTE, palette#, backgrd, foregrd][, D_DSPLY_ALL, ctrl_record])

D_COPY

(optional) Copy (retrieve) the renditions. (n)

D_LOAD

(optional) Set the renditions. (default) (n)

renditions

(optional) A display rendition. See the Rendition Code Definitions table below. (n)

attr

The attributes to set if loading (with D_LOAD) or the current attribute values if copying (with D_COPY). See the Attribute Flag Definitions table below. (n)

color

The palette number to use for the specified rendition if loading or the current color value if copying. (n)

D_PALETTE

(optional) Signifies that color palette codes will follow. (n)

palette#

Either the palette number to reference or D_ALL_CODES to indicate all palette codes. (n)

backgrd

Either the background color code (if palette# is a palette number) or the base of a 16-element array for all background color codes (if palette# is D_ALL_CODES). (n)

foregrd

Either the foreground color code (if palette# is a palette number) or the base of a 16-element array for all foreground color codes (if palette# is D_ALL_CODES). (n)

D_DSPLY_ALL

(optional) Signifies that all rendition controls will be accessed. (n)

ctrl_record

The name of a variable that holds the entire rendition control record. (a425)

U_REND retrieves (copies) or sets (loads) display renditions.

D_COPY and D_LOAD determine whether the codes that follow will define copy or load operations. D_COPY copies the current renditions into the specified variables (attr and color, backgrd and foregrd, or ctrl_record) so you can examine the current renditions and save them so you can reset them later. D_LOAD sets the renditions specified by the attr and color, backgrd and foregrd, or ctrl_record variables.

The table below lists the valid options for the renditions argument. Each rendition code must be followed by attr and color arguments. Attributes that aren’t referenced in the attr argument are reset to off. (For information on the default state for a rendition, see Renditions and rendition schemes.)   

Note

On Windows, the environment overrides many of the renditions set with U_REND (as well as those set by Proto and U_EDITREND). See Renditions and rendition schemes for information.

Rendition Code Definitions

Rendition code

Definition

D_RND_MNU_ENA

Enabled Menu Entry

D_RND_MNU_DSA

Disabled Menu Entry

D_RND_MNU_SEL

Selected Menu Entry

D_RND_MNU_HQS

Menu Header Quick-Select

D_RND_MNU_EQS

Menu Entry Quick-Select

D_RND_INP_DSP

Input Field Display

D_RND_INP_PRC

Input Field Processing

D_RND_INP_CLR

Cleared Input Field

D_RND_INP_BCK

Input Window Background

D_RND_INP_TTL

Input Window Title

D_RND_INP_BDR

Input Window Border

D_RND_INP_DSA

Disabled Input Field

D_RND_INP_ROD

Read-Only Input Field Display

D_RND_INP_ROP

Read-Only Input Field Processing

D_RND_SEL_SEL

Select Wnd Selected Item

D_RND_SEL_BCK

Selection Window Body (and unselected items)

D_RND_SEL_TTL

Selection Window Title

D_RND_SEL_BDR

Selection Window Border

D_RND_SEL_EQS

Sel Wnd Quick-Selects

D_RND_WIN_BCK

Generic Window Background

D_RND_WIN_TTL

General Window Title

D_RND_WIN_BDR

General Window Border

D_RND_MSG

Message Window Body

D_RND_MSG_BDR

Message Window Border

D_RND_HLP_BCK

Help Window Body

D_RND_HLP_TTL

Help Window Title

D_RND_HLP_BDR

Help Window Border

D_RND_HDR

Screen Header

D_RND_INF

Information Line

D_RND_FTR

Screen Footer

D_RND_DLG

Dialog Box Body

D_RND_DLG_BDR

Dialog Box Border

D_RND_LST_ENA

Enabled List

D_RND_LST_ENA_B

Enabled List Border

D_RND_LST_ENA_T

Enabled List Title

D_RND_LST_HDR

Enabled List Header

D_RND_LST_FTR

Enabled List Footer

D_RND_LST_SEL

Selected Item in List (used in place of D_RND_INP_DSP, D_RND_INP_CLR, or D_RND_INP_BCK if the input window is associated with a list)

D_RND_LST_DSA

Disabled List (body, border, and title)

D_RND_LST_DSA_S

Disabled Selected Item

D_RND_SCR_BAR

Scroll Bar

D_RND_SCR_IND

Scroll Bar Indicators

D_RND_USER_1

User Rendition 1

D_RND_USER_2

User Rendition 2

D_RND_USER_3

User Rendition 3

D_RND_USER_4

User Rendition 4

D_RND_USER_5

User Rendition 5

The table below lists the flags you can pass as the attr argument. Each flag consists of a series of codes: B=blinking (italic on Windows), H=highlighted (bold), R=reverse, and U=underlined. Note that you can substitute I for B (for example, A_IR instead of A_BR).

Attribute Flag Definitions

Attribute flag

Definition

A_NONE

No attributes.

A_U

Underlined.

A_R

Reverse.

A_RU

Reverse, underlined.

A_B

Blinking (on Unix and OpenVMS) or italic (on Windows).

A_BU

Blinking, underlined.

A_BR

Blinking, reverse.

A_BRU

Blinking, reverse, underlined.

A_H

Highlighted.

A_HU

Highlighted, underlined.

A_HR

Highlighted, reverse.

A_HRU

Highlighted, reverse, underlined.

A_BH

Blinking, highlighted.

A_BHU

Blinking, highlighted, underlined.

A_BHR

Blinking, highlighted, reverse.

A_BHRU

Blinking, highlighted, reverse, underlined.

A_ALL

All attributes (same as A_BHRU).

On Windows, U_REND can accept or return a color number from 0 through 511 for the backgrd and foregrd arguments, so variables for these arguments must be at least an i2 or d3. We recommend using an i4.

If you want to save two different sets of display renditions, you can use the D_DSPLY_ALL argument to recall an entire set of renditions. D_DSPLY_ALL requires a single argument that is used to access the entire rendition control information. If D_COPY was specified, the ctrl_record variable must be large enough to hold the control record (a425).

The first example sets the blinking attribute for the information line.

xcall u_rend(D_LOAD, D_RND_INF, A_B)

The second example sets the highlighted and underlined attributes for selected menu entries.

xcall u_rend(D_LOAD, D_RND_MNU_SEL, A_HU)

The following example saves the current rendition of the dialog box, changes the dialog box’s rendition for the next U_DIALOG subroutine, and then restores the previous rendition.

xcall u_rend(D_COPY, D_RND_DLG, att_sav, clr_sav)
xcall u_rend(D_LOAD, D_RND_DLG, att_new, clr_new)
xcall u_dialog(. . . )
xcall u_rend(D_LOAD, D_RND_DLG, att_sav, clr_sav)

The final example copies all rendition controls into rendctl, where rendctl is at least 404 bytes in size. You might use a subroutine like this to save all the current renditions so you can reset them later.

xcall u_rend(D_COPY, D_DSPLY_ALL, rendctl)