Carbon


Window Definition Hit Test Result Code Constant

Header: MacWindows.h

enum WindowDefPartCode {
    wNoHit = ,
    wInContent = 1,
    wInDrag = 2,
    wInGrow = 3,
    wInGoAway = 4,
    wInZoomIn = 5,
    wInZoomOut = 6,
    wInCollapseBox = 9,
    wInProxyIcon = 10
};

Constant descriptions

wNoHit

The mouse-down event did not occur in the content region or the drag region of any active or inactive window or in the close, size, zoom, or collapse box of an active window. The return value wNoHit might also mean that the point isn’t in the window. The standard window definition functions, for example, return wNoHit if the point is in the window frame but not in the title bar.

wInContent

The mouse-down event occurred in the content region of an active or inactive window (with the exception of the size box).

wInDrag

The mouse-down event occurred in the drag region of an active or inactive window.

wInGrow

The mouse-down occurred in the size box of an active window.

wInGoAway

The mouse-down event occurred in the close box of an active window.

wInZoomIn

The mouse-down event occurred in the zoom box of an active window that is currently in the standard state.

wInZoomOut

The mouse-down event occurred in the zoom box of an active window that is currently in the user state.

wInCollapseBox

The mouse-down event occurred in the collapse box of an active window. Available with Appearance Manager 1.0 and later.

wInProxyIcon

The mouse-down event occurred in the proxy icon of a window.

In response to the wHit message, your window definition function should return one of these constants.

Return the constants wInGrow, wInGoAway, wInZoomIn, wInZoomOut, and wInCollapseBox only if the window is active—by convention, the size box, close box, zoom box, and collapse box aren’t drawn if the window is inactive. In an inactive document window, for example, a mouse-down event in the part of the title bar that would contain the close box if the window were active is reported as wInDrag.

With the Mac OS 8.5 Window Manager, your window definition function may return the wInProxyIcon constant to report that a mouse-down event occurred in your window’s proxy icon. For other window definition hit test result code constants.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)