Important: The information in this document is obsolete and should not be used for new development.
TECalText
TheTECalTextprocedure recalculates the beginnings of all lines of text in the specified edit record.
PROCEDURE TECalText (hTE: TEHandle);
hTE- A handle to the edit record whose text lines are to be recalculated.
DESCRIPTION
TheTECalTextprocedure updates elements of thelineStartsarray in an edit record. CallTECalTextif you've changed the destination rectangle, thehTextfield, or any other property of the edit record that pertains to line breaks and the number of characters per line--for example, font, size, style, and so on.ASSEMBLY-LANGUAGE INFORMATION
The low-memory global variableTERecalcontains the address of the routine called byTECalTextto recalculate the line starts and set the first and last characters that need to be redrawn. TheTERecaldefault hook routine calls the Text UtilitiesStyledLineBreakfunction. If you replace the defaultTERecalhook routine with a customized version and your application supports non-Roman script systems, make sure that your customized hook routine is script-aware. The registers on entry and exit for this hook routine are:
Registers on entry A3 Pointer to the locked edit record D7 Change in the length of the record (word)
Registers on exit D2 Line start of the line containing the first character to be redrawn (word) D4 Position of last character to be redrawn (word) TextEdit uses the low-memory global variable
WordRedrawwidely, but primarily for line calculations and to determine how much of a line to redraw after the user types in a character. TextEdit sets the correct value forWordRedrawinTEInitbased upon the installed script systems. If a 2-byte script is installed,TEInitperforms an OR operation onWordRedrawwith a 1; if a right-to-left script is installed,TEInitperforms an OR operation onWordRedrawwith an $FF. The size of this global is one byte.TextEdit interprets the final value of
WordRedrawas follows:
Value Description 0 Redraws the character before the entered character. 1 Redraws the word before the entered character. $FF Redraws the whole line.