wantsToTrackMouse(for:in:of:atCharacterIndex:)
Allows an attachment to specify the events for which it tracks the mouse.
Declaration
@MainActor func wantsToTrackMouse(for theEvent: NSEvent, in cellFrame: NSRect, of controlView: NSView?, atCharacterIndex charIndex: Int) -> BoolDiscussion
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 true, this method allows the attachment to decide whether it wishes to do so for particular events.