home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1994 June / NEBULA_SE.ISO / SourceCode / MiscKit / Palettes / MiscCircularSlider / MiscCircularSlider.subproj / MiscCircularSliderCell.h < prev    next >
Encoding:
Text File  |  1994-03-28  |  2.3 KB  |  66 lines

  1. //
  2. //    MiscCircularSliderCell.h -- a SliderCell for circular sliders
  3. //        Written by Vince DeMarco and Don Yacktman, (c) 1994 by Vince DeMarco.
  4. //                Version 1.0  All rights reserved.
  5. //        This notice may not be removed from this source code.
  6. //
  7. //    This object is included in the MiscKit by permission from the author
  8. //    and its use is governed by the MiscKit license, found in the file
  9. //    "LICENSE.rtf" in the MiscKit distribution.  Please refer to that file
  10. //    for a list of all applicable permissions and restrictions.
  11. //    
  12.  
  13. // This was created by modifying Vince's CircularSliderCell class and
  14. // merging it with Don's RotationSliderCell class.  Here's the info
  15. // from the original files.
  16. /*
  17.  *    Filename:    CircularSliderCell.h 
  18.  *    Created :    Sun Oct 18 16:56:22 1992 
  19.  *    Author  :    Vince DeMarco
  20.  *        <vince@whatnxt.cuc.ab.ca>
  21.  *    LastEditDate was "Sun Oct 25 13:47:43 1992"
  22.  */
  23. //    RotationSliderCell.h -- written by Don Yacktman
  24. //    Copyright 1993 by Don Yacktman.  All rights reserved.
  25.  
  26. #import <appkit/SliderCell.h>
  27.  
  28. typedef enum _MiscCircularSliderStyle {
  29.         MISC_PIECHART_STYLE = 0,    // this is obvious:  a pie chart.
  30.         MISC_SLIDER_STYLE,            // this looks NeXT-like (ring shape)
  31.         MISC_DIAL_STYLE,            // raised circle with a radial line
  32.         MISC_SHUTTLEWHEEL_STYLE        // raised circle with a dimple
  33. } MiscCircularSliderStyle;
  34.  
  35. @interface MiscCircularSliderCell:SliderCell
  36. {
  37.     MiscCircularSliderStyle style; // which rendering style is being used
  38.     BOOL jumpToMousePoint; // Does the position indicator jump to the
  39.                     // location of the first mouse down event or does it
  40.                     // move in relation to the mouse dragging?
  41.     BOOL hidden;     // Is the Cell Hidden?
  42.     float radius;    // The smallest radius of the Cell
  43.     float sliderPathWidth;    // width of ring if MISC_SLIDER_STYLE
  44.     NXPoint center; // The center point of the Cell--x,y coordinates
  45. @private
  46.     BOOL imFlipped;    // we need to keep track of our flippedness...
  47.     float _offsetAng;
  48.     NXRect _lastFrame;
  49.     id disabledBezelImage, enabledBezelImage, tempImage, knobImage; // caches
  50. }
  51.  
  52. - init;
  53. - setSliderPathWidth:(float)val;
  54. - (float)sliderPathWidth;
  55. - setSliderStyle:(MiscCircularSliderStyle)aBOOL;
  56. - (MiscCircularSliderStyle)sliderStyle;
  57. - renderAll;
  58. - setJumpToMousePoint:(BOOL)aBOOL;
  59. - (BOOL)jumpToMousePoint;
  60. - setHidden:(BOOL)flag;
  61. - (BOOL)hidden;
  62. - read:(NXTypedStream *)stream;
  63. - write:(NXTypedStream *)stream;
  64.  
  65. @end
  66.