home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / OpenStepConversion / IntermediateFrameworks3 / AppKit.framework / Headers / colorPicking.h < prev    next >
Text File  |  1994-09-29  |  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 <Foundation/NSObject.h>
  9. #import "NSColor.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. - setMode:(int)mode;   
  41.  
  42. @end
  43.  
  44.  
  45. @protocol NXColorPickingCustom
  46.  
  47. // These methods *MUST* be implemented by the CustomPicker, or an error
  48. // will occur!
  49.  
  50. // Return NO if "mode" not supported.
  51. - (BOOL)supportsMode:(int)mode;   
  52. - (int)currentMode;
  53. // "YES" on very first call (load your .nibs etc when "YES").
  54. - provideNewView:(BOOL)initialRequest;  // "YES" on very first call.
  55. - setColor:(NSColor *)newColor;
  56.  
  57. @end
  58.  
  59.