home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Examples / AppKit / Draw / graphicsUndo.subproj / ResizeGraphicsChange.m < prev    next >
Text File  |  1992-02-09  |  855b  |  51 lines

  1. #import "drawundo.h"
  2.  
  3. @interface ResizeGraphicsChange(PrivateMethods)
  4.  
  5. - undoDetails;
  6. - redoDetails;
  7.  
  8. @end
  9.  
  10. @implementation ResizeGraphicsChange
  11.  
  12. - initGraphicView:aGraphicView graphic:aGraphic
  13. {
  14.     [super initGraphicView:aGraphicView];
  15.     graphic = aGraphic;
  16.     return self;
  17. }
  18.  
  19. - (const char *)changeName
  20. {
  21.     return NXLocalStringFromTable("Operations", "Resize", NULL, "The operation of changing the size of a graphical entity by dragging a corner of it with the mouse.");
  22. }
  23.  
  24. - saveBeforeChange
  25. {
  26.     graphics = [[List alloc] init];
  27.     [graphics addObject:graphic];
  28.     [graphic getBounds:&oldBounds];
  29.     return self;
  30. }
  31.  
  32. - changeDetailClass
  33. {
  34.     return nil;
  35. }
  36.  
  37. - undoDetails
  38. {
  39.     [graphic getBounds:&newBounds];
  40.     [graphic setBounds:&oldBounds];
  41.     return self;
  42. }
  43.  
  44. - redoDetails
  45. {
  46.     [graphic setBounds:&newBounds];
  47.     return self;
  48. }
  49.  
  50. @end
  51.