TEStyleRec
#include <TextEdit.h>
typedef struct TEStyleRec { Size Offset Description short nRuns; 2 0 Number of elements in runs
short nStyles; 2 2 Number of elements in handle at styleTab
STHandle styleTab; 4 4 Handle to style table LHHandle lhTab; 4 8 Handle to line-height table long teRefCon; 4 12 Available for use by applications
NullSTHandle nullStyle; 4 16 Handle to styles for null selection StyleRun runs[8001]; n 20 List of offsets and style table indexes typedef TEStyleRec *TEStylePtr;
typedef TEStyleRec **TEStyleHandle;
Notes: In the new style-aware TERec, the fields at offsets 74-77 (the txFont and txFace and the 1-byte filler) contain a 4-byte TEStyleHandle which leads
to this data structure, also known as the "style record".
Although all TextEdit style-related functions depend on it, a TEStyleHandle
inter-dependent records.
The amount of data in the line-height table (at lhTab) depends on the value
of TERec.nLines. There is one LHElement for each line in the edit record. The nullStyle handle eventually leads to an STScrpRec. It defines the font,
face, etc. for text which is inserted via TEKey when the selection range is an insertion point.
The runs field is variable length, but always contains at least one 4-byte
StyleRun with an index to the first style in the style table lead to by styleTab (which gets initialized to the TextEdit defaults for font, face, etc.).