home *** CD-ROM | disk | FTP | other *** search
/ Nebula / nebula.bin / SourceCode / Palettes / RotationSliderPalette / RotationSlider.m < prev    next >
Text File  |  1993-01-30  |  2KB  |  62 lines

  1. //
  2. //    RotationSlider.m -- written by Don Yacktman
  3. //
  4. //    Copyright 1993 by Don Yacktman.  All rights reserved.
  5. //
  6. //    You may use this code subject to the following conditions:
  7. //    (1) If you use this code in any applications or packages which
  8. //        will be sold for gain (i.e. commercial, shareware, etc.) you
  9. //        must first have a signed written agreement from the author.
  10. //    (2) You may freely use this object in personal projects which
  11. //        are freely redistributable at not cost to the recipient.
  12. //        (A nominal distribution fee, like media and postage cost,
  13. //        is OK, though.)  You must include the source to this object
  14. //        and any of your modifications in the distribution, however.
  15. //    (3) If you make any modifications, send them to the author.  If
  16. //        any of them are useful, they will be included in any future
  17. //        releases if you like.  You must send the changes, though!
  18. //
  19.  
  20. #import "RotationSlider.h"
  21. #import "RotationSliderCell.h"
  22.  
  23. @implementation RotationSlider
  24.  
  25. static id rotationSliderCellClass;
  26.  
  27. + initialize
  28. {
  29.     if (self == [RotationSlider class]) {
  30.         rotationSliderCellClass = [RotationSliderCell class]; // default class
  31.     }
  32.     return self;
  33. }
  34.  
  35. + setCellClass:classId
  36. {
  37.     rotationSliderCellClass = classId;
  38.     return self;
  39. }
  40.  
  41. - initFrame:(NXRect *)frameRect
  42. {
  43.     id oldCell;
  44.     
  45.     [super initFrame:frameRect];
  46.     oldCell = [self setCell:[[rotationSliderCellClass alloc] init]];
  47.     [oldCell free];
  48.     return self;
  49. }
  50.  
  51. - getMinSize:(NXSize *)minSize maxSize:(NXSize *)maxSize from:(int)where
  52. {
  53.     minSize->width = 111.0;
  54.     maxSize->width = 111.0;
  55.     minSize->height = 112.0;
  56.     maxSize->height = 112.0;
  57.     return self;
  58. }
  59.  
  60.  
  61. @end
  62.