home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1994 June / NEBULA_SE.ISO / SourceCode / MiscKit / Palettes / MiscLogSliderPalette / MiscLogSlider.subproj / MiscLogSlider.m < prev    next >
Encoding:
Text File  |  1994-03-27  |  1.1 KB  |  53 lines

  1. //
  2. //    MiscLogSlider.m -- a Slider subclass with logarithmic transfer function
  3. //        Written by Don Yacktman, Copyright (c) 1994 by Don Yacktman.
  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. #import "MiscLogSlider.h"
  14.  
  15. static id MiscLogSliderCellClass;
  16.  
  17. @implementation MiscLogSlider
  18.  
  19. + initialize
  20. {
  21.     if (self == [MiscLogSlider class]) {
  22.         MiscLogSliderCellClass = [MiscLogSliderCell class];
  23.         // the default class
  24.     }
  25.     return self;
  26. }
  27.  
  28. + setCellClass:classId
  29. {
  30.     MiscLogSliderCellClass = classId;
  31.     return self;
  32. }
  33.  
  34. - initFrame:(NXRect *)nf
  35. {
  36.     [super initFrame:nf];
  37.     [[self setCell:[[MiscLogSliderCellClass alloc] init]] free];
  38.     return self;
  39. }
  40.  
  41. - setBase:(double)newBase
  42. {
  43.     [cell setBase:newBase];
  44.     return self;
  45. }
  46.  
  47. - (double)base
  48. {
  49.     return [cell base];
  50. }
  51.  
  52. @end
  53.