TEClick
TEClick Indicate when a mouse-down event occurs
#include <TextEdit.h> TextEdit
void TEClick(thePt, extend, hTE );
Point thePt; in local coordinates, from event record
Boolean extend; TRUE=extending (i.e., when Shift is down)
TEHandle hTE; handle of an edit record
Use TEClick to tell TextEdit that a mouse-down event has occurred. It
retains control until the button is released and takes care of all mouse-related
selection operations.
thePt is the point, in local coordinates, at which the click occurred. This
is obtained from the where field of the EventRecord structure.
Note: Use GlobalToLocal to convert the EventRecord point to local
coordinates.
extend is a Boolean value specifying how text selection (for this click)
should be handled. It is one of:
FALSE Start selecting/highlighting a new block.
TRUE The current selection is to be extended (as when the user
holds down the Shift key while clicking)
Note: The EventRecord.modifiers field contains a flag indicating if
the Shift key is being pressed.
hTE is a handle obtained via TENew or TEStylNew. It leads to a
variable-length TERec structure and identifies the edit record in
which the mouse was clicked.
Returns: none

Notes: This function handles actions associated with mouse clicks
while editing text.
If extend is FALSE, the previous selection (if any) is unhighlighted and the
function retains control while the button is held down, selecting and
highlighting text as the mouse is moved. A double click selects the single
word at the mouse location.
If extend is TRUE, the selection range is expanded or contracted to the
character at thePt. A double click extends the selection range to include the
word at thePt.
Automatic Scrolling
By default, TextEdit does not "auto- scroll" when you drag beyond the
bottom or top of the window. On 128K ROMs, you can call
TEAutoView(TRUE) to enable simple auto- scrolling (but it does not
update your scroll bars, if any).
The common practice on 64K ROMs is to call SetClikLoop to install a
custom auto-scroll routine for a TextEdit record. See that topic for related
details.