Adopted by | |
Framework | /System/Library/Frameworks/AppKit.framework |
Availability | Available in Mac OS X v10.0 and later. |
Companion guide | |
Declared in | NSInputServer.h |
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.
– mouseDownOnCharacterIndex:atCoordinate:withModifier:client:
– mouseDraggedOnCharacterIndex:atCoordinate:withModifier:client:
– mouseUpOnCharacterIndex: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
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.
– handleMouseEvent:
(NSInputManager)NSInputServer.h
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
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.
– handleMouseEvent:
(NSInputManager)NSInputServer.h
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
This event is always consumed.
– handleMouseEvent:
(NSInputManager)NSInputServer.h
© 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-04-02)