NSEvent:mouseLocation
Home 目次>ApplicationKit>NSEvent

mouseLocation

スクリーン座標で、現在のマウス位置を返します


+(NSPoint) mouseLocation


【返り値】
   NSPointマウス位置


【解説】

スクリーン座標で、現在のマウス位置を返します。



【例文】


#import "MyScrollView.h"

@implementation MyScrollView
- (void)mouseDown:(NSEvent *)event
{

NSLog([NSString stringWithFormat:@"global x=%.1f,y=%.1f",[NSEvent mouseLocation].x,[NSEvent mouseLocation].y]);
}

@end


(C) 2000-2007 Satoshi Oomori.
[Apple]

Google
Webwww.oomori.com
Apple_Store_40x120

[ad:Usual day in Japan]

この記事を評価してください。 

良い 

間違いがある 説明がわかりにくい 例文がわかりにくい  

Home 目次>ApplicationKit>NSEvent
修正日2006.12.26