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: Macintosh Toolbox Essentials /
Chapter 2 - Event Manager / Event Manager Reference
Event Manager Routines / Receiving Events


SystemClick

After receiving a mouse-down event, your application should call the Window
Manager function FindWindow to determine where the cursor was when the mouse button was pressed. If FindWindow returns the inSysWindow constant, call the SystemClick procedure to handle the event.

PROCEDURE SystemClick (theEvent: EventRecord; 
                        theWindow: WindowPtr);
theEvent
The event record for the event.
theWindow
The window in which the mouse-down event occurred. Pass the window pointer returned by FindWindow in this parameter.
DESCRIPTION
If a mouse-down event occurred in a desk accessory's window, the SystemClick procedure determines which part of the desk accessory's window the cursor was in when the mouse button was pressed and routes the event to the appropriate desk accessory as necessary.

If the mouse button was pressed while the cursor was in the content region of the desk accessory's window and the window is active, SystemClick sends the mouse-down event to the desk accessory to process. If the mouse-down event occurred in the content region of the window and the window is inactive, SystemClick makes it the active window. It does this by sending your application an activate event to deactivate its
front window and directing an event to the desk accessory to activate its window.

If the mouse button was pressed while the cursor was in the drag region or go-away region, SystemClick calls the Window Manager routine DragWindow or TrackGoAway, as appropriate. If TrackGoAway reports that the user closed the desk accessory, SystemClick sends a close message to the desk accessory.

SEE ALSO
See "The Event Record," beginning on page 2-79, for a description of the fields in the event record.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996