home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / appkit / NXColorPanel.h < prev    next >
Text File  |  1992-06-19  |  2KB  |  91 lines

  1. /*
  2.     NXColorPanel.h
  3.     Application Kit, Release 2.0
  4.     Copyright (c) 1988, 1989, 1990, NeXT, Inc.  All rights reserved. 
  5. */
  6.  
  7. #import "Panel.h"
  8. #import "View.h"
  9.  
  10. #define NX_GRAYMODE            0
  11. #define NX_RGBMODE             1
  12. #define NX_CMYKMODE            2
  13. #define NX_HSBMODE             3
  14. #define NX_CUSTOMPALETTEMODE   4
  15. #define NX_COLORLISTMODE       5
  16. #define NX_WHEELMODE           6
  17.  
  18. #define NX_GRAYMODEMASK           0x0001
  19. #define NX_RGBMODEMASK            0x0002
  20. #define NX_CMYKMODEMASK           0x0004
  21. #define NX_HSBMODEMASK            0x0008
  22. #define NX_CUSTOMPALETTEMODEMASK  0x0010
  23. #define NX_COLORLISTMODEMASK      0x0020
  24. #define NX_WHEELMODEMASK          0x0040
  25.  
  26. #define NX_ALLMODESMASK \
  27.     (NX_GRAYMODEMASK|\
  28.     NX_RGBMODEMASK| \
  29.     NX_CMYKMODEMASK| \
  30.     NX_HSBMODEMASK| \
  31.     NX_CUSTOMPALETTEMODEMASK| \
  32.     NX_COLORLISTMODEMASK| \
  33.     NX_WHEELMODEMASK)
  34.     
  35.     
  36. // These are for the CustomPickers provided by the system.  These are the
  37. // values these pickers return in response to:"insertionOrder" message.
  38. // Your picker should have insertion numbers greater than, equal to, or
  39. // in between these, to determUDryour buttons insertion position in the
  40. // ColorPanel.
  41. #define NX_WHEEL_INSERTION           (0.50)
  42. #define NX_SLIDERS_INSERTION         (0.51)
  43. #define NX_CUSTOMPALETTE_INSERTION   (0.52)
  44. #define NX_LIST_INSERTION            (0.53)
  45.  
  46.  
  47.  
  48. @interface NXColorPanel : Panel
  49. {
  50.     void *              _cpPrivate;
  51.     int                 _reservedCPint[15];
  52. }
  53.  
  54. + (BOOL)dragColor:(NXColor)color withEvent:(NXEvent *)theEvent fromView:sourceView;
  55.  
  56. + sharedInstance:(BOOL)create;
  57. + (void)setPickerMask:(int)mask;
  58. + (void)setPickerMode:(int)mode;
  59.  
  60. + allocFromZone:(NXZone *)zone;
  61. + alloc;
  62.  
  63. - setAccessoryView:aView;
  64. - accessoryView;
  65. - setContinuous:(BOOL)flag;
  66. - (BOOL)isContinuous;
  67. - setShowAlpha:(BOOL)flag;
  68. - (BOOL)doesShowAlpha;
  69. - updateCustomColorList;
  70. - setMode:(int)mode;
  71. - (int)mode;
  72. - setColor:(NXColor)color;
  73. - (NXColor)color;
  74. - (float)alpha;
  75. - setAction:(SEL)aSelector;
  76. - setTarget:anObject;
  77. - attachColorList:colorList;
  78. - detachColorList:colorList;
  79. - read:(NXTypedStream *)stream;
  80.  
  81. @end
  82.  
  83. @interface View(ColorAcceptor)
  84. /*
  85.  * Obsolete API: The drag/drop API, in conjunction with the Pasteboard
  86.  * (NXColorPboardType) should be used instead of this method.
  87.  */
  88. - acceptColor:(NXColor)color atPoint:(const NXPoint *)aPoint;
  89.  
  90. @end
  91.