Mouse Events in NSView
Hi,
How can we find out and use the mouse events for NSView? I want to draw shapes on the canvas using mouse in my cocoa (using Obj C) application ?
Thanks in advance.....
How can we find out and use the mouse events for NSView? I want to draw shapes on the canvas using mouse in my cocoa (using Obj C) application ?
Thanks in advance.....
Set your view as current responder, and subclass NSResponder mouse methods.
I made a little test project:
http://kuon.goyman.com/stuffs/MouseEvents.zip
I made a little test project:
http://kuon.goyman.com/stuffs/MouseEvents.zip
Possibly Related Threads...
Thread: | Author | Replies: | Views: | Last Post | |
Full screen mouse events | Mister T | 17 | 14,135 |
Jan 4, 2010 02:55 PM Last Post: MacMan |
|
NSView loaded from bundle won't draw... | Joseph Duchesne | 1 | 4,720 |
Feb 12, 2006 03:33 AM Last Post: Cochrane |
|
NSImage and NSView problems | Joseph Duchesne | 1 | 5,293 |
Aug 19, 2005 07:36 AM Last Post: unknown |
|
Mouse events for an openGL window | majestik666 | 5 | 9,292 |
Jul 5, 2005 06:15 PM Last Post: majestik666 |
|
Problem With Motion in NSView | Nick | 16 | 12,280 |
Jun 2, 2005 05:56 AM Last Post: Nick |