Annotation of Examples/AppKit/Draw/graphicsUndo.subproj/ChangeDetail.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Please refer to external documentation about Draw
                      3:  * with Undo for information about what ChangeDetails 
                      4:  * are and where they fit in.
                      5:  *
                      6:  * The ChangeDetail.h and ChangeDetail.m files contain
                      7:  * the @interfaces and @implementations for the 11 
                      8:  * subclasses of ChangeDetail, as well as for ChangeDetail
                      9:  * itself. We grouped all the classes into one pair of 
                     10:  * files because the classes are so tiny and their behavior
                     11:  * is so similar.
                     12:  *
                     13:  * ChangeDetail
                     14:  *     ArrowChangeDetail
                     15:  *     DimensionsChangeDetail
                     16:  *     FillColorChangeDetail
                     17:  *     FillModeChangeDetail
                     18:  *     LineCapChangeDetail
                     19:  *     LineColorChangeDetail
                     20:  *     LineJoinChangeDetail
                     21:  *     LineWidthChangeDetail
                     22:  *     MoveChangeDetail
                     23:  *     OrderChangeDetail
                     24:  * 
                     25:  */
                     26: 
                     27: @interface ChangeDetail : Object
                     28: {
                     29:     Graphic    *graphic;        /* the Graphic that we serve */
                     30:     id         change;          /* the Change object that we belong to */
                     31:     List       *detailsDetails; /* If the Graphic that this ChangeDetail
                     32:                                  * serves is a Group then detailsDetails
                     33:                                  * is used to keep track of the
                     34:                                  * ChangeDetails that serve the component
                     35:                                  * Graphics of the Group.
                     36:                                  */
                     37:     BOOL       changeExpected;
                     38: }
                     39: 
                     40: - initGraphic:aGraphic change:aChange;
                     41: - free;
                     42: - graphic;
                     43: - (BOOL)useNestedDetails;
                     44: - (BOOL)changeExpected;
                     45: - recordDetail;
                     46: - undoDetail;
                     47: - redoDetail;
                     48: - recordIt;
                     49: - undoIt;
                     50: - redoIt;
                     51: 
                     52: @end
                     53: 
                     54: @interface ArrowChangeDetail : ChangeDetail
                     55: {
                     56:     int                oldLineArrow;
                     57: }
                     58: 
                     59: - recordIt;
                     60: - undoIt;
                     61: - redoIt;
                     62: 
                     63: @end
                     64: 
                     65: @interface DimensionsChangeDetail : ChangeDetail
                     66: {
                     67:     NXRect     oldBounds;
                     68:     NXRect     newBounds;
                     69: }
                     70: 
                     71: - (BOOL)useNestedDetails;
                     72: - recordDetail;
                     73: - undoDetail;
                     74: - redoDetail;
                     75: 
                     76: @end
                     77: 
                     78: @interface FillChangeDetail : ChangeDetail
                     79: {
                     80:     NXColor    oldFillColor;
                     81:     int                oldFillMode;
                     82:     NXColor    newFillColor;
                     83:     int                newFillMode;
                     84: }
                     85: 
                     86: - recordIt;
                     87: - undoIt;
                     88: - redoIt;
                     89: 
                     90: @end
                     91: 
                     92: @interface LineCapChangeDetail : ChangeDetail
                     93: {
                     94:     int                oldLineCap;
                     95: }
                     96: 
                     97: - recordIt;
                     98: - undoIt;
                     99: - redoIt;
                    100: 
                    101: @end
                    102: 
                    103: @interface LineColorChangeDetail : ChangeDetail
                    104: {
                    105:     NXColor    oldColor;
                    106:     BOOL       oldIsOutlined;
                    107: }
                    108: 
                    109: - recordIt;
                    110: - undoIt;
                    111: - redoIt;
                    112: 
                    113: @end
                    114: 
                    115: @interface LineJoinChangeDetail : ChangeDetail
                    116: {
                    117:     int                oldLineJoin;
                    118: }
                    119: 
                    120: - recordIt;
                    121: - undoIt;
                    122: - redoIt;
                    123: 
                    124: @end
                    125: 
                    126: @interface LineWidthChangeDetail : ChangeDetail
                    127: {
                    128:     float      oldLineWidth;
                    129: }
                    130: 
                    131: - recordIt;
                    132: - undoIt;
                    133: - redoIt;
                    134: 
                    135: @end
                    136: 
                    137: @interface MoveChangeDetail : ChangeDetail
                    138: {
                    139: }
                    140: 
                    141: - (BOOL)useNestedDetails;
                    142: - undoDetail;
                    143: - redoDetail;
                    144: 
                    145: @end
                    146: 
                    147: @interface OrderChangeDetail : ChangeDetail
                    148: {
                    149:     unsigned   graphicPosition;
                    150: }
                    151: 
                    152: - (BOOL)useNestedDetails;
                    153: - recordGraphicPositionIn:graphicList;
                    154: - (unsigned)graphicPosition;
                    155: 
                    156: @end

unix.superglobalmegacorp.com

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