Establishes an area for tracking mouse-entered and mouse-exited events within the receiver and returns a tag that identifies the tracking rectangle.
Original signature is '- (NSTrackingRectTag)addTrackingRect:(NSRect)aRect owner:(id)userObject userData:(void *)userData assumeInside:(BOOL)flag'
Available in Mac OS X v10.0 and later.
|C#||Visual Basic||Visual C++|
- aRect (NSRect)
- A rectangle that defines a region of the receiver for tracking mouse-entered and mouse-exited events.
- userObject (Id)
- The object that gets sent the event messages. It can be the receiver itself or some other object (such as an NSCursor or a custom drawing tool object), as long as it responds to both mouseEntered: and mouseExited:.
- userData (IntPtr)
- Data stored in the NSEvent object for each tracking event.
- flag (Boolean)
- If YES, the first event will be generated when the cursor leaves aRect, regardless if the cursor is inside aRect when the tracking rectangle is added. If NO the first event will be generated when the cursor leaves aRect if the cursor is initially inside aRect, or when the cursor enters aRect if the cursor is initially outside aRect. You usually want to set this flag to NO.
- Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)