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: More Macintosh Toolbox /
Chapter 4 - List Manager / List Manager Reference
List Manager Routines / Responding to Events Affecting Lists


LClick

To process a mouse-down event in a list, use the LClick function.

FUNCTION LClick (pt: Point; modifiers: Integer; 
                 lHandle: ListHandle): Boolean;
pt
The location in local coordinates of the mouse-down event. Your application can simply call GlobalToLocal(myEvent.where) and then pass myEvent.where in this parameter.
modifiers
An integer value corresponding to the modifiers field of the event record.
lHandle
The list in which the mouse-down event occurred.
DESCRIPTION
The LClick function responds to the mouse-down event whose location and modifiers are specified by the pt and modifiers parameters. The LClick function handles all user interaction until the user releases the mouse button. The LClick function returns TRUE if the click was a double-click, or FALSE otherwise.

If the pt parameter specifies a portion of the list's visible rectangle, then cells are selected with an algorithm that depends on the list's selection flags and on the modifiers parameter. If the user drags the cursor above or below the list's visible rectangle and vertical autoscrolling is enabled, then the List Manager vertically autoscrolls the list. If the user drags the cursor to the right or the left of the list's visible rectangle and horizontal autoscrolling is enabled, then the List Manager horizontally autoscrolls the list.

If the pt parameter specifies a point within the list's scroll bar, then the List Manager calls the scroll bar's control definition procedure to track the cursor and it scrolls the list appropriately.

SPECIAL CONSIDERATIONS
You should not call the LClick function from within an interrupt, such as in a completion routine or VBL task.

ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for the LClick function are
Trap macroSelector
_Pack0$0018

SEE ALSO
For information on enabling and disabling autoscrolling, see "About the List Manager" beginning on page 4-13. For information on responding to mouse-down events, see "Responding to Events Affecting a List" on page 4-23.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996