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 / Customizing TextEdit


TESetClickLoop

The TESetClickLoop procedure installs in the clikLoop field of the edit record the address of the application-supplied click loop routine.

PROCEDURE TESetClickLoop (clickProc: ProcPtr; hTE: TEHandle);
clickProc
A pointer to the customized click loop routine.
hTE
A handle to the edit record whose clikLoop field is to be modified.
DESCRIPTION
The TESetClickLoop procedure lets you replace the default click loop routine. The TEClick procedure repeatedly calls the routine that the click loop field points to as long as the user holds down the mouse button within the text of the view rectangle. The default click loop routine scrolls only the text. However, you can provide a customized click loop procedure that scrolls the text and the scroll bars in tandem.

If automatic scrolling is enabled, the default click loop routine checks to see if the mouse has been dragged out of the view rectangle; if it has, the routine scrolls the text using TEPinScroll. (For more information, see "TEPinScroll" on page 2-86.) The amount by which TEPinScroll scrolls the text vertically is determined by the lineHeight field of the edit record for monostyled text and the LHTable for multistyled text.

ASSEMBLY-LANGUAGE INFORMATION
You can directly set the click loop (clikLoop) field; you don't need to use the TESetClickLoop procedure. Your routine should set register D0 to 1 and preserve register D2. Returning 0 in register D0 terminates TEClick.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996