home *** CD-ROM | disk | FTP | other *** search
- /*
- colorPicking.h
- Application Kit, Release 3.0
- Copyright (c) 1991, NeXT, Inc. All rights reserved.
- */
-
-
- #import <objc/Object.h>
- #import "color.h"
-
-
- @protocol NXColorPickingDefault
-
- // The following methods are implemented by the generic base class:
- // NXColorPicker, and only need be implemented (overridden) by the CustomPicker
- // developer if there is a need.
-
- // "mask" is the mask (if any) passed to the ColorPanel by the
- // + setPickerMask: method. If your picker supports any of the bits in
- // the mask, return "self", otherwise, return "nil" (default is "self" if not
- // overridden, since if the "setPickerMask" method is never called, the
- // ColorPanel will just start off with the normal picker modes, of which
- // your custom mode will not be a part). This method can be used to turn
- // off some (or all) of your subpickers, if you have any (like sliders).
- // If this method returns "nil", the object will be freed.
- //
- // "owningColorPanel" is the id of the instantiating ColorPanel.
- // if this method is overridden, the base class' (NXColorPicker's)
- // initFromPickerMask method should be called before any subclass processing.
- // The instance variable "colorPanel" is set in this method.
- // FOR PERFORMANCE, DO NOT LOAD .NIBS, ETC. HERE!! WAIT 'TILL PROVIDENEWVIEW!
- - initFromPickerMask:(int)mask withColorPanel:owningColorPanel;
- - provideNewButtonImage;
- - insertNewButtonImage:newButtonImage in:buttonCell;
- - viewSizeChanged:sender;
- - alphaControlAddedOrRemoved:sender;
- - (float)insertionOrder;
- - attachColorList:colorList;
- - detachColorList:colorList;
- - updateColorList:colorList;
- - setMode:(int)mode;
-
- @end
-
-
-
- @protocol NXColorPickingCustom
-
- // These methods *MUST* be implemented by the CustomPicker, or an error
- // will occur!
-
- // Return NO if "mode" not supUFed.
- - (BOOL)supportsMode:(int)mode;
- - (int)currentMode;
- // "YES" on very first call (load your .nibs etc when "YES").
- - provideNewView:(BOOL)initialRequest; // "YES" on very first call.
- - setColor:(NXColor)newColor;
-
- @end