home *** CD-ROM | disk | FTP | other *** search
/ OpenStep (Enterprise) / OpenStepENTCD.toast / OEDEV / DEV.Z / NSColorPanel.h < prev    next >
Text File  |  1996-09-09  |  3KB  |  100 lines

  1. /*
  2.     NSColorPanel.h
  3.     Application Kit
  4.     Copyright (c) 1994-1996, NeXT Software, Inc.
  5.     All rights reserved.
  6. */
  7.  
  8. #import <AppKit/NSPanel.h>
  9. #import <AppKit/NSApplication.h>
  10. #import <AppKit/NSView.h>
  11. #import <AppKit/AppKitDefines.h>
  12.  
  13. @class NSColorList;
  14.  
  15. enum {
  16.     NSGrayModeColorPanel        = 0,
  17.     NSRGBModeColorPanel            = 1,
  18.     NSCMYKModeColorPanel        = 2,
  19.     NSHSBModeColorPanel            = 3,
  20.     NSCustomPaletteModeColorPanel    = 4,
  21.     NSColorListModeColorPanel        = 5,
  22.     NSWheelModeColorPanel        = 6
  23. };
  24.  
  25. enum {
  26.     NSColorPanelGrayModeMask        = 0x00000001,
  27.     NSColorPanelRGBModeMask        = 0x00000002,
  28.     NSColorPanelCMYKModeMask        = 0x00000004,
  29.     NSColorPanelHSBModeMask        = 0x00000008,
  30.     NSColorPanelCustomPaletteModeMask    = 0x00000010,
  31.     NSColorPanelColorListModeMask    = 0x00000020,
  32.     NSColorPanelWheelModeMask        = 0x00000040,
  33.     NSColorPanelAllModesMask        = 0x0000ffff
  34. };
  35.     
  36.     
  37.  
  38. @interface NSColorPanel : NSPanel
  39. {
  40.     id            _colorSwatch;
  41.     id            _colorSwatchBox;
  42.     id            _colorWell;
  43.     id            _colorWellView;
  44.     id            _magnifyButton;
  45.     id            _middleView;
  46.     id            _opacitySlider;
  47.     id            _opacityText;
  48.     id            _opacityView;
  49.     id            _paletteMatrix;
  50.     id            _pickerView;
  51.     id            _customViewsList;
  52.     id            _customPickerList;
  53.     id            _currViewObject;
  54.     id            _splitView;
  55.     id            _target;
  56.     id            _accessoryView;
  57.     SEL            _action;
  58.     NSSize        _minColorPanelSize;
  59.     NSSize        _maxColorPanelSize;
  60.     NSSize        _minMiddleViewSize;
  61.     NSSize        _minSwatchSize;
  62.     float        _swatchOffsetFromBox;
  63.     float        _prevSwatchHeight;
  64.     BOOL        _continuous;
  65.     BOOL        _allowColorSetting;
  66.     BOOL        _stillInitializing;
  67.     unsigned int     _reservedColorPanel;
  68. }
  69.  
  70. + (NSColorPanel *)sharedColorPanel;
  71. + (BOOL)sharedColorPanelExists;
  72. + (BOOL)dragColor:(NSColor *)color withEvent:(NSEvent *)theEvent fromView:(NSView *)sourceView;
  73. + (void)setPickerMask:(int)mask;
  74. + (void)setPickerMode:(int)mode;
  75.  
  76. - (void)setAccessoryView:(NSView *)aView;
  77. - (NSView *)accessoryView;
  78. - (void)setContinuous:(BOOL)flag;
  79. - (BOOL)isContinuous;
  80. - (void)setShowsAlpha:(BOOL)flag;
  81. - (BOOL)showsAlpha;
  82. - (void)setMode:(int)mode;
  83. - (int)mode;
  84. - (void)setColor:(NSColor *)color;
  85. - (NSColor *)color;
  86. - (float)alpha;
  87. - (void)setAction:(SEL)aSelector;
  88. - (void)setTarget:(id)anObject;
  89. - (void)attachColorList:(NSColorList *)colorList;
  90. - (void)detachColorList:(NSColorList *)colorList;
  91. @end
  92.  
  93. @interface NSApplication(NSColorPanel)
  94. - (void)orderFrontColorPanel:(id)sender;
  95. @end
  96.  
  97. /* Notifications */
  98. APPKIT_EXTERN NSString *NSColorPanelColorDidChangeNotification;
  99.  
  100.