home *** CD-ROM | disk | FTP | other *** search
/ OpenStep (Enterprise) / OpenStepENTCD.toast / OEDEV / DEV.Z / LockGraphicsChange.m < prev    next >
Text File  |  1995-11-28  |  857b  |  49 lines

  1. #import "drawundo.h"
  2.  
  3. @interface LockGraphicsChange(PrivateMethods)
  4.  
  5. - (void)redoDetails;
  6.  
  7. @end
  8.  
  9. @implementation LockGraphicsChange
  10.  
  11. - (NSString *)changeName
  12. {
  13.     return LOCK_OP;
  14. }
  15.  
  16. - (void)undoChange
  17. {
  18.     [graphics makeObjectsPerform:@selector(unlock)];
  19.     [graphics makeObjectsPerform:@selector(select)];
  20.     [graphicView resetLockedFlag];
  21.     [graphicView getSelection];
  22.  
  23.     [super undoChange]; 
  24. }
  25.  
  26. - (Class)changeDetailClass
  27. {
  28.     return nil;
  29. }
  30.  
  31. - (void)redoDetails
  32. {
  33.     int i, count;
  34.     NSMutableArray *selectedGraphics;
  35.     id graphic;
  36.     
  37.     selectedGraphics = [graphicView selectedGraphics];
  38.     count = [graphics count];
  39.     for (i = 0; i < count; i++) {
  40.         graphic = [graphics objectAtIndex:i];
  41.     [graphic unlockGraphic];
  42.     [graphic deselect];
  43.     [selectedGraphics removeObject:graphic];
  44.     }
  45.     [graphicView resetLockedFlag]; 
  46. }
  47.  
  48. @end
  49.