Carbon


LHElement

Header: TextEdit.h

struct LHElement {
    SInt16 lhHeight; 
    SInt16 lhAscent;
};
typedef LHElement LHPtr;

Field descriptions

lhHeight

The line height, in points. This is the maximum value for any individual character attribute in the line.

lhAscent

The font ascent, in points; this is the maximum value for any individual character attribute in a line.

The line-height table, defined by the LHTable data type, provides an array of line heights to hold the vertical spacing information for a given edit structure. It also contains line ascent information. The null style structure, defined by the NullStRec data type, contains the null scrap which is used to store character attribute information for a null selection.

The line height table holds vertical spacing information for the text of an edit structure. This table parallels the lineStarts array in the edit structure itself. Its length equals the edit structure’s nLines field plus 1 for a dummy entry at the end, just as the lineStarts array ends with a dummy entry that has the same value as the length of the text. The table’s contents are recalculated whenever the line starting values are themselves recalculated with the TECalText function or whenever an editing action causes recalibration.

The line height table is used only if the lineHeight and fontAscent fields in the edit structure are negative; positive values in those fields specify fixed vertical spacing, overriding the information in the table. The line height table is of type LHTable, which is an array of elements of LHElement.


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