Annotation of Examples/AppKit/Draw/graphicsUndo.subproj/ReorderGraphicsChange.m, revision 1.1.1.1

1.1       root        1: #import "drawundo.h"
                      2: 
                      3: @interface ReorderGraphicsChange(PrivateMethods)
                      4: 
                      5: - undoDetails;
                      6: 
                      7: @end
                      8: 
                      9: @implementation ReorderGraphicsChange
                     10: 
                     11: - saveBeforeChange
                     12: {
                     13:     [super saveBeforeChange];
                     14:     [changeDetails makeObjectsPerform:@selector(recordGraphicPositionIn:) with:[graphicView graphics]];
                     15: 
                     16:     return self;
                     17: }
                     18: 
                     19: - changeDetailClass
                     20: {
                     21:     return [OrderChangeDetail class];
                     22: }
                     23: 
                     24: - undoDetails
                     25: {
                     26:     int count, i;
                     27:     id detail, graphic;
                     28:     List *allGraphics;
                     29: 
                     30:     count = [changeDetails count];
                     31:     allGraphics = [graphicView graphics];
                     32:     for (i = 0; i < count; i++) {
                     33:        detail = [changeDetails objectAt:i];
                     34:        graphic = [detail graphic];
                     35:         [allGraphics removeObject:graphic];
                     36:     }
                     37:     for (i = 0; i < count; i++) {
                     38:        detail = [changeDetails objectAt:i];
                     39:        graphic = [detail graphic];
                     40:         [allGraphics insertObject:graphic at:[detail graphicPosition]];
                     41:     }
                     42:        
                     43:     return self;
                     44: }
                     45: 
                     46: @end

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.