Created
November 22, 2015 03:17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public struct NSTrackingAreaOptions : OptionSetType { | |
public init(rawValue: UInt) | |
/* Type of tracking area. You must specify one or more type from this list in the NSTrackingAreaOptions argument of -initWithRect:options:owner:userInfo: */ | |
public static var MouseEnteredAndExited: NSTrackingAreaOptions { get } // owner receives mouseEntered when mouse enters area, and mouseExited when mouse leaves area | |
public static var MouseMoved: NSTrackingAreaOptions { get } // owner receives mouseMoved while mouse is within area. Note that mouseMoved events do not contain userInfo | |
public static var CursorUpdate: NSTrackingAreaOptions { get } // owner receives cursorUpdate when mouse enters area. Cursor is set appropriately when mouse exits area | |
/* When tracking area is active. You must specify one of the following in the NSTrackingAreaOptions argument of -initWithRect:options:owner:userInfo: */ | |
public static var ActiveWhenFirstResponder: NSTrackingAreaOptions { get } // owner receives mouseEntered/Exited, mouseMoved, or cursorUpdate when view is first responder | |
public static var ActiveInKeyWindow: NSTrackingAreaOptions { get } // owner receives mouseEntered/Exited, mouseMoved, or cursorUpdate when view is in key window | |
public static var ActiveInActiveApp: NSTrackingAreaOptions { get } // owner receives mouseEntered/Exited, mouseMoved, or cursorUpdate when app is active | |
public static var ActiveAlways: NSTrackingAreaOptions { get } // owner receives mouseEntered/Exited or mouseMoved regardless of activation. Not supported for NSTrackingCursorUpdate. | |
/* Behavior of tracking area. These values are used in NSTrackingAreaOptions. You may specify any number of the following in the NSTrackingAreaOptions argument of -initWithRect:options:owner:userInfo: */ | |
public static var AssumeInside: NSTrackingAreaOptions { get } // If set, generate mouseExited event when mouse leaves area (same as assumeInside argument in deprecated addTrackingRect:owner:userData:assumeInside:) | |
public static var InVisibleRect: NSTrackingAreaOptions { get } // If set, tracking occurs in visibleRect of view and rect is ignored | |
public static var EnabledDuringMouseDrag: NSTrackingAreaOptions { get } // If set, mouseEntered events will be generated as mouse is dragged. If not set, mouseEntered events will be generated as mouse is moved, and on mouseUp after a drag. mouseExited events are paired with mouseEntered events so their delivery is affected indirectly. That is, if a mouseEntered event is generated and the mouse subsequently moves out of the trackingArea, a mouseExited event will be generated whether the mouse is being moved or dragged, independent of this flag. | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Xcode7.1.1