Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC
PATHDocumentation > Mac OS 8 and 9 > Human Interface Toolbox > Window Manager >

Programming With the Mac OS 8.5 Window Manager


Responding to Mouse-Down Events

When your application receives a mouse-down event, your application calls the FindWindow function to map the cursor location to a window region. The FindWindow function specifies the region by returning one of these constants:

Constant

Description

inDesk or inNoWindow None of the following
inMenuBar The menu bar
inSysWindow A desk accessory window
inContent Anywhere in the content region except the size box if the window is active; anywhere including the size box if the window is inactive
inDrag The drag region (in a window that contains a proxy icon, the drag region excludes the proxy icon region)
inGrow The size box (of an active window only)
inGoAway The close box
inZoomIn The zoom box (when the window is in the standard state)
inZoomOut The zoom box (when the window is in the user state)
inCollapseBox The collapse box
inProxyIcon The proxy icon

When the user presses the mouse button while the cursor is in a window, FindWindow not only returns a constant that identifies the window region but also reports which window the cursor is in by placing a pointer to this window at the address specified in one of its parameters. Your response to FindWindow depends on whether the cursor is in the active window and the kind of window that the cursor is in.

When you receive a mouse-down event in the active window, you route the event to the function that is appropriate for handling the mouse-down event for a given region. Tracking a Window Proxy Icon Drag describes how your application can respond to a mouse-down event in the proxy icon region of a window that indicates a user request to drag the proxy icon. Displaying a Window Path Pop-Up Menu shows how your application can handle the case where a mouse-down event--in either a window's drag region or its proxy icon region--indicates a user request to display the window path pop-up menu.


1999 Apple Computer, Inc. – (Last Updated 18 March 99)

Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2004 Apple Computer, Inc.
All rights reserved. | Terms of use | Privacy Notice