Next Page > Hide TOC

NSInputServerMouseTracker Protocol Reference

Adopted by
Framework
/System/Library/Frameworks/AppKit.framework
Availability
Available in Mac OS X v10.0 and later.
Companion guide
Declared in
NSInputServer.h

Overview

An NSInputServiceProvider object (an "NSInputServer" subclass object or a delegate of an NSInputServer object) may need to implement this protocol. See the NSInputServiceProvider protocol description.

The methods in this protocol differ from typical mouse events in that they have an additional argument which is the index of the character within the text view’s text storage. When an text view object forwards a mouse event to the input manager (with handleMouseEvent:), the input manager calls the text view’s characterIndexForPoint: method to get the index, which it then passes on to the appropriate method in this protocol.

Tasks

Handling Mouse Events

Instance Methods

mouseDownOnCharacterIndex:atCoordinate:withModifier:client:

A mouse down event happened at given index within the sender text view’s text storage, at the given point, with modifier keys identified in flags.

- (BOOL)mouseDownOnCharacterIndex:(NSUInteger)index atCoordinate:(NSPoint)point withModifier:(NSUInteger)flags client:(id)sender

Discussion

Returns YES if it consumes the event; in that case, a mouse dragged or a mouse up message will follow. If NO is returned, then neither of the other two events will follow.

Availability
See Also
Declared In
NSInputServer.h

mouseDraggedOnCharacterIndex:atCoordinate:withModifier:client:

A mouse dragged event happened at given index within the sender text view’s text storage, at the given point, with modifier keys identified in flags.

- (BOOL)mouseDraggedOnCharacterIndex:(NSUInteger)index atCoordinate:(NSPoint)point withModifier:(NSUInteger)flags client:(id)sender

Discussion

Returns YES if it consumes the event; in that case, either another mouse dragged or a mouse up message will follow. If NO is returned, then neither message will follow.

Availability
See Also
Declared In
NSInputServer.h

mouseUpOnCharacterIndex:atCoordinate:withModifier:client:

A mouse up event happened at given index within the sender text view’s text storage, at the given point, with modifier keys identified in flags.

- (void)mouseUpOnCharacterIndex:(NSUInteger)index atCoordinate:(NSPoint)point withModifier:(NSUInteger)flags client:(id)sender

Discussion

This event is always consumed.

Availability
See Also
Declared In
NSInputServer.h

Next Page > Hide TOC


© 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-04-02)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.