Instance Method

wantsToTrackMouseForEvent:inRect:ofView:atCharacterIndex:

Allows an attachment to specify the events for which it tracks the mouse.

Required.

Declaration

- (BOOL)wantsToTrackMouseForEvent:(NSEvent *)theEvent inRect:(NSRect)cellFrame ofView:(NSView *)controlView atCharacterIndex:(NSUInteger)charIndex;

Discussion

theEvent is the event in question that occurred in cellFrame inside controlView. charIndex is the index of the attachment character within the text. If wantsToTrackMouse returns YES, this method allows the attachment to decide whether it wishes to do so for particular events.

See Also

Responding to Mouse Events

- wantsToTrackMouse

Returns a Boolean value that indicates whether the attachment handles mouse events occurring over its image.

Required.

- trackMouse:inRect:ofView:untilMouseUp:

Handles a mouse-down event on the cell's image, and optionally waits until a mouse-up event

Required.

- trackMouse:inRect:ofView:atCharacterIndex:untilMouseUp:

Handles a mouse-down event on the image at the specified character position.

Required.