Managing Cursors
Cocoa provides several ways to manage mouse cursors. The NSCursor class is central to this, but NSView and NSWindow classes both play an integral part in the more complex management options. For the simplest cases, such as a modal tool that temporarily changes the cursor on an application-wide basis, only knowledge of the NSCursor class is required. Because this class plays such a central role, it is discussed first, followed by more complex cursor management. Finally, cursor rectangles are covered. These special tracking rectangles provide a way to change the cursor automatically as it enters or exits a specific region.
The Cursors example at the www.cocoaprogramming.net Web site demonstrates all these techniques. It will be ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access