home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1995 August / NEBULA.mdf / SourceCode / NeXTSTEPAdvantage / PlotterPalette / PlotViewInspector.m < prev    next >
Encoding:
Text File  |  1991-06-27  |  1.0 KB  |  54 lines

  1. /* 
  2.  * PlotViewInspector.m -- Implementation file for the PlotViewInspector class 
  3.  *
  4.  * You may freely copy, distribute, and reuse the code in this example.
  5.  * NeXT disclaims any warranty of any kind, expressed or implied, as to its
  6.  * fitness for any particular use.
  7.  *
  8.  */
  9.  
  10. #import "PlotViewInspector.h"
  11. #import "PlotView.h"
  12. #import <appkit/Application.h>
  13. #import <appkit/Slider.h>
  14. #import <appkit/TextField.h>
  15.  
  16. @implementation PlotViewInspector
  17.  
  18. + finishLoading:(struct mach_header *)header 
  19. {
  20.     NIBDidLoadClass(self, header);
  21.     return nil;
  22. }
  23.  
  24. + startUnloading 
  25. {
  26.     NIBWillUnloadClass(self);
  27.     return nil;
  28. }
  29.  
  30. - init
  31. {
  32.     [super init];
  33.     [NXApp loadNibSection:"PlotViewInspector.nib" owner:self];
  34.     lastRadius = [theSlider floatValue];
  35.     return self;
  36. }
  37.  
  38. - ok:sender
  39. {
  40.     lastRadius = [theSlider floatValue];
  41.     [object setRadius:lastRadius];
  42.     return self;
  43. }
  44.  
  45. - revert:sender
  46. {
  47.     [theSlider setFloatValue:lastRadius];
  48.     [theTextField setFloatValue:lastRadius];
  49.     [object setRadius:lastRadius];
  50.     return self;
  51. }
  52.  
  53. @end
  54.