TEStylNew
Rect * destRect ; the destination rectangle Rect *viewRect ; the viewable display area returns handle leading to an empty TERec TEStylNew allocates a handle for text, creates and initializes an edit record and returns a handle for the record. It works like TENew, but it allocates a TEStyleRec and initializes for text style/format usage. destRect is the address of a Rect identifying the area into which the edit record will be sent. It defines the margins used in word wrap,
justification, and so forth. It must be at least as wide as the first
character that will be drawn.
viewRect is the address of a Rect identifying the viewing area for the text. It defines the clipping range (the visible area) for the text. It must not
be empty; the right side must be greater than the left side.
usage.
Notes: The edit record is initialized as with TENew except that offsets 74-77 are set to contain a TEStyleHandle and txSize, lineHeight, and
fontAscent are set to -1 to indicate style-aware processing. See
Call this function once for every edit record you want allocated. Use
TEDispose to release all memory occupied by the edit record and its sub- records.
The caret (a blinking vertical bar), which indicates the insertion point, is
In a new edit record, the caret may be drawn at an unusual height, since
TEStylNew doesn't initialize the line heights array. To initialize the In a new edit record, the line height for the first line may be too large,
since TEStylNew adds an extra character run at the beginning of the text. This character run corresponds to the font, size and style that were set for
the grafPort when you called TEStylNew. To avoid this large line height, you don't know the text size, call TextSize with a small value, like 9. You will probably want to call TEAutoView to enable automatic scrolling.