home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / appkit / colorPicking.h < prev    next >
Text File  |  1992-07-10  |  2KB  |  59 lines

  1. /*
  2.     colorPicking.h
  3.     Application Kit, Release 3.0
  4.     Copyright (c) 1991, NeXT, Inc.  All rights reserved. 
  5. */
  6.  
  7.  
  8. #import <objc/Object.h>
  9. #import "color.h"
  10.  
  11.  
  12. @protocol NXColorPickingDefault
  13.  
  14. // The following methods are implemented by the generic base class:
  15. // NXColorPicker, and only need be implemented (overridden) by the CustomPicker
  16. // developer if there is a need.
  17.  
  18. // "mask" is the mask (if any) passed to the ColorPanel by the
  19. // + setPickerMask: method.  If your picker supports any of the bits in
  20. // the mask, return "self", otherwise, return "nil" (default is "self" if not
  21. // overridden, since if the "setPickerMask" method is never called, the
  22. // ColorPanel will just start off with the normal picker modes, of which
  23. // your custom mode will not be a part). This method can be used to turn
  24. // off some (or all) of your subpickers, if you have any (like sliders).
  25. // If this method returns "nil", the object will be freed.
  26. // 
  27. // "owningColorPanel" is the id of the instantiating ColorPanel.  
  28. // if this method is overridden, the base class' (NXColorPicker's) 
  29. // initFromPickerMask method should be called before any subclass processing.
  30. // The instance variable "colorPanel" is set in this method.
  31. // FOR PERFORMANCE, DO NOT LOAD .NIBS, ETC. HERE!!  WAIT 'TILL PROVIDENEWVIEW!
  32. - initFromPickerMask:(int)mask withColorPanel:owningColorPanel;
  33. - provideNewButtonImage;
  34. - insertNewButtonImage:newButtonImage in:buttonCell;
  35. - viewSizeChanged:sender;
  36. - alphaControlAddedOrRemoved:sender;
  37. - (float)insertionOrder;
  38. - attachColorList:colorList;
  39. - detachColorList:colorList;
  40. - updateColorList:colorList;
  41. - setMode:(int)mode;   
  42.  
  43. @end
  44.  
  45.  
  46.  
  47. @protocol NXColorPickingCustom
  48.  
  49. // These methods *MUST* be implemented by the CustomPicker, or an error
  50. // will occur!
  51.  
  52. // Return NO if "mode" not supUFed.
  53. - (BOOL)supportsMode:(int)mode;   
  54. - (int)currentMode;
  55. // "YES" on very first call (load your .nibs etc when "YES").
  56. - provideNewView:(BOOL)initialRequest;  // "YES" on very first call.
  57. - setColor:(NXColor)newColor;
  58.  
  59. @end