MonobjcMonobjc Documented Class Library
NSTrackingArea Constructor (rect, options, owner, userInfo)
NamespacesMonobjc.AppKitNSTrackingAreaNSTrackingArea(NSRect, NSTrackingAreaOptions, Id, NSDictionary)

Initializes and returns an object defining a region of a view to receive mouse-tracking events, mouse-moved events, cursor-update events, or possibly all these events.

Original signature is '- (id)initWithRect:(NSRect)rect options:(NSTrackingAreaOptions)options owner:(id)owner userInfo:(NSDictionary *)userInfo'

Available in Mac OS X v10.5 and later.

Declaration Syntax
C#Visual BasicVisual C++
public NSTrackingArea(
	NSRect rect,
	NSTrackingAreaOptions options,
	Id owner,
	NSDictionary userInfo
)
Public Sub New ( _
	rect As NSRect, _
	options As NSTrackingAreaOptions, _
	owner As Id, _
	userInfo As NSDictionary _
)
public:
NSTrackingArea(
	NSRect rect, 
	NSTrackingAreaOptions options, 
	Id^ owner, 
	NSDictionary^ userInfo
)
Parameters
rect (NSRect)
A rectangle that defines a region of a target view, in the view’s coordinate system, for tracking events related to mouse tracking and cursor updating. The specified rectangle should not exceed the view’s bounds rectangle.
options (NSTrackingAreaOptions)
One or more constants that specify the type of tracking area, the situations when the area is active, and special behaviors of the tracking area. See the description of NSTrackingAreaOptions and related constants for details. You must specify one or more options for the initialized object, in particular the type of tracking area; zero is not a valid value.
owner (Id)
The object to receive the requested mouse-tracking, mouse-moved, or cursor-update messages. It does not necessarily have to be the view associated with the created NSTrackingArea object, but should be an object capable of responding to the NSResponder methods mouseEntered:, mouseExited:, mouseMoved:, and cursorUpdate:.
userInfo (NSDictionary)
A dictionary containing arbitrary data for each mouse-entered, mouse-exited, and cursor-update event. When handling such an event you can obtain the dictionary by sending userData to the NSEvent object. (The dictionary is not available for mouse-moved events.) This parameter may be nil.
Return Value
The newly-initialized tracking area object.
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)

Assembly: Monobjc.AppKit (Module: Monobjc.AppKit)