Next Page > Hide TOC

Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

NSInputServerMouseTracker

Package
com.apple.cocoa.application
Companion guide

Overview

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

The methods in this interface 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 , 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 interface.

Tasks

Handling Mouse Events

Instance Methods

mouseDownOnCharacterIndex

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.

public abstract boolean mouseDownOnCharacterIndex(int index, NSPoint point, int flags, Object sender)

Discussion

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

mouseDraggedOnCharacterIndex

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.

public abstract boolean mouseDraggedOnCharacterIndex(int index, NSPoint point, int flags, Object sender)

Discussion

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

mouseUpOnCharacterIndex

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.

public abstract boolean mouseUpOnCharacterIndex(int index, NSPoint point, int flags, Object sender)

Discussion

This event is always consumed.



Next Page > Hide TOC


© 1997, 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-02-01)


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.