Important: The information in this document is obsolete and should not be used for new development.
TEClick
TheTEClick
procedure controls placement and highlighting of the selection range as determined by mouse events.
PROCEDURE TEClick (pt: Point; extend: Boolean; hTE: TEHandle);
pt
- The mouse location in local coordinates at the time the mouse button was pressed, obtainable from the event record (in global coordinates).
extend
- A flag denoting the state of the Shift key at the time of the click as indicated by the Event Manager. If the Shift key was held down at the time of the click to extend the selection, pass a value of
TRUE
.hTE
- A handle to the edit record whose text is displayed in the view rectangle where the click occurred.
DESCRIPTION
CallTEClick
whenever a mouse-down event occurs in the view rectangle of the edit record and the window associated with that edit record is active. TheTEClick
procedure keeps control until the mouse button is released. Use the QuickDraw procedureGlobalToLocal
to convert the global coordinates of the mouse location given in the event record to the local coordinate system forpt
.The
TEClick
procedure removes highlighting of the old selection range unless the selection range is being extended. If the mouse moves, meaning that a drag is occurring,TEClick
expands or shortens the selection range accordingly a character at a time. In the case of a double-click, the word where the cursor is positioned becomes the
selection range.SEE ALSO
For more information about theGlobalToLocal
procedure, see the QuickDraw chapters in Inside Macintosh: Imaging.