O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSColorPickingDefault — Mac OS X 10.0

Synopsis

This protocol declares an interface for classes to conform to in order to provide custom color pickers for the color-picker panel. This protocol is used closely with the NSColorPickingCustom protocol. The Application Kit implements the methods of this protocol in the NSColorPicker class. The most straightforward way to create a custom color picker for your application is to subclass NSColorPicker and implement the methods of NSColorPickingCustom in your subclass.

@protocol NSColorPickingDefault
                                  // Instance Methods
   - (id)initWithPickerMask:(int)mask 
                                 colorPanel:(NSColorPanel *)owningColorPanel;
   - (NSImage *)provideNewButtonImage;
   - (void)insertNewButtonImage:(NSImage *)newButtonImage 
                                 in:(NSButtonCell *)buttonCell;
   - (void)viewSizeChanged:(id)sender;
   - (void)alphaControlAddedOrRemoved:(id)sender;
   - (void)attachColorList:(NSColorList *)colorList;
   - (void)detachColorList:(NSColorList *)colorList;
   - (void)setMode:(int)mode;
@end

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required