Carbon


STElement

Header: TextEdit.h

struct STElement {
    SInt16 stCount; 
    SInt16 stHeight; 
    SInt16 stAscent; 
    SInt16 stFont; 
    StyleField stFace; 
    SInt16 stSize; 
    RGBColor stColor;
};
typedef STElement STPtr;

Field descriptions

stCount

A reference count of character runs using this set of character attributes.

stHeight

The line height for this run, in points.

stAscent

The font ascent for this run, in points.

stFont

The font family ID.

stFace

The character style (bold, italic, and so forth). This field consists of two bytes. The low-order byte contains the character style. TextEdit uses the high bit (bit 15) of the high-order byte to store the style run direction: it uses 0 for left-to-right text, and 1 for right-to-left text.

stSize

The text size, in points.

stColor

The RGB (red, green, blue) color.

The style table contains one entry for each distinct set of character attributes used in the text of an edit structure. Each entry is defined in a style element structure. The size of the table is given by the nStyles field of the style structure. There is no duplication; each set of character attributes appears exactly once in the table. A reference count tells how many times each set of attributes is used in the table. The TEStyleTable data type defines the style table. The STElement data type defines the style element structure.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)