trackMouse:inRect:ofView:untilMouseUp:
マウスドラッグすると呼び出されます
-(BOOL)trackMouse:(NSEvent *)theEvent: inRect:(NSRect)cellFrame: ofView:(NSView *)controlView: untilMouseUp:(BOOL)untilMouseUp:
解説
マウスドラッグすると呼び出されます。
NOを返すと、連続して呼び出されます。YESを返すと一回きりです。
返り値
( BOOL )
YES/NO
引数
( NSEvent * )theEvent
イベント
( NSRect )cellFrame
範囲
( NSView * )controlView
コントロールビュー
( BOOL )untilMouseUp
マウスアップまで監視するか
フレームワーク
ApplicationKit
クラス
NSCell
Instance Methods
使用可能
10.0
参照
例文
#import "MyButtonCell.h" @implementation MyButtonCell -(BOOL)trackMouse:(NSEvent *)theEvent inRect:(NSRect)cellFrame ofView:(NSView *)controlView untilMouseUp:(BOOL)untilMouseUp { NSLog(@"trackMouse"); return NO; } @end