Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Text /
Chapter 2 - TextEdit / TextEdit Reference
Routines / Initializing TextEdit, Creating an Edit Record, and Disposing of an Edit Record


TENew

The TENew function creates and initializes a monostyled edit record and allocates a handle to it.

FUNCTION TENew (destRect,viewRect: Rect): TEHandle;
destRect
The destination rectangle for the new edit record, specified in the local coordinates of the current graphics port. This is the area in which text is laid out.
viewRect
The view, or visible, rectangle for the new edit record, specified in the local coordinates of the current graphics port. This is the area of the window in which text is actually displayed.
DESCRIPTION
A monostyled edit record is one in which all text is restricted to a single font, size, and style. Use TENew when the text is to be rendered in attributes that are consistent from character to character. Otherwise, use TEStyleNew.

Call TENew once for every edit record you want allocated. Your application should store the handle to the edit record that is returned; many routines require it as an input parameter. The edit record assumes the drawing environment of the graphics port.

If your application contains more than one window where text editing occurs, you need to create an edit record for each window.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996