home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / Examples / AppKit / Draw / graphicsUndo.subproj / BringToFrontGraphicsChange.m < prev    next >
Text File  |  1995-11-28  |  604b  |  33 lines

  1. #import "drawundo.h"
  2.  
  3. @interface BringToFrontGraphicsChange(PrivateMethods)
  4.  
  5. - (void)redoDetails;
  6.  
  7. @end
  8.  
  9. @implementation BringToFrontGraphicsChange
  10.  
  11. - (NSString *)changeName
  12. {
  13.     return BRING_TO_FRONT_OP;
  14. }
  15.  
  16. - (void)redoDetails
  17. {
  18.     int count, i;
  19.     id detail, graphic;
  20.     NSMutableArray *allGraphics;
  21.  
  22.     allGraphics = [graphicView graphics];
  23.     count = [changeDetails count];
  24.     for (i = count; i >= 0; --i) {
  25.     detail = [changeDetails objectAtIndex:i];
  26.     graphic = [detail graphic];
  27.         [allGraphics removeObject:graphic];
  28.         [allGraphics insertObject:graphic atIndex:0];
  29.     } 
  30. }
  31.  
  32. @end
  33.