NSCursor

NSCursor Mac OS X 10.0

This class represents a mouse cursor on the screen, and is used to create new cursors that can be used in place of the default arrow cursor. NSView objects often define regions within the view in which the cursor is changed when the mouse is present in those regions. For example, in a text view the cursor changes to an I-beam when the cursor is inside of the text field.

figs/cocn_1524.gif

@interface NSCursor : NSObject <NSCoding>
 // Initializers
   - (id)initWithImage:(NSImage *)newImage foregroundColorHint:(NSColor *)fg
        backgroundColorHint:(NSColor *)bg hotSpot:(NSPoint)hotSpot;
   - (id)initWithImage:(NSImage *)newImage hotSpot:(NSPoint)aPoint;
 // Accessor Methods
   - (void)setOnMouseEntered:(BOOL)flag;
   - (void)setOnMouseExited:(BOOL)flag;
 // Class Methods
   + (NSCursor *)IBeamCursor;
   + (NSCursor *)arrowCursor;
   + (NSCursor *)currentCursor;
   + (void)hide;
   + (void)pop;
   + (void)setHiddenUntilMouseMoves:(BOOL)flag;
   + (void)unhide;
 // Instance Methods
   - (void)set;
   - (NSPoint)hotSpot;
   - (NSImage *)image;
   - (BOOL)isSetOnMouseEntered;
   - (BOOL)isSetOnMouseExited;
   - (void)mouseEntered:(NSEvent *)theEvent;
   - (void)mouseExited:(NSEvent *)theEvent;
   - (void)pop;
   - (void)push;
 // Methods Implementing NSCoding
   - (void)encodeWithCoder:(NSCoder *)aCoder;
   - (id)initWithCoder:(NSCoder *)aDecoder;



    Part II: API Quick Reference
    Chapter 13. Foundation Classes