home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Examples / AppKit / Draw / graphicsUndo.subproj / ChangeDetail.h < prev    next >
Text File  |  1992-03-15  |  3KB  |  156 lines

  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. - recordD- undoIt;
  60. - redoIt;
  61.  
  62. @end
  63.  
  64. @interface DimensionsChangeDetail : ChangeDetail
  65. {
  66.     NXRect     oldBounds;
  67.     NXRect     newBounds;
  68. }
  69.  
  70. - (BOOL)useNestedDetails;
  71. - recordDetail;
  72. - undoDetail;
  73. - redoDetail;
  74.  
  75. @end
  76.  
  77. @interface FillChangeDetail : ChangeDetail
  78. {
  79.     NXColor    oldFillColor;
  80.     int        oldFillMode;
  81.     NXColor    newFillColor;
  82.     int        newFillMode;
  83. }
  84.  
  85. - recordIt;
  86. - undoIt;
  87. - redoIt;
  88.  
  89. @end
  90.  
  91. @interface LineCapChangeDetail : ChangeDetail
  92. {
  93.     int        oldLineCap;
  94. }
  95.  
  96. - recordIt;
  97. - undoIt;
  98. - redoIt;
  99.  
  100. @end
  101.  
  102. @interface LineColorChangeDetail : ChangeDetail
  103. {
  104.     NXColor    oldColor;
  105.     BOOL    oldIsOutlined;
  106. }
  107.  
  108. - recordIt;
  109. - undoIt;
  110. - redoIt;
  111.  
  112. @end
  113.  
  114. @interface LineJoinChangeDetail : ChangeDetail
  115. {
  116.     int        oldLineJoin;
  117. }
  118.  
  119. - recordIt;
  120. - undoIt;
  121. - redoIt;
  122.  
  123. @end
  124.  
  125. @interface LineWidthChangeDetail : ChangeDetail
  126. {
  127.     float    oldLineWidth;
  128. }
  129.  
  130. - recordIt;
  131. - undoIt;
  132. - redoIt;
  133.  
  134. @end
  135.  
  136. @interface MoveChangeDetail : ChangeDetail
  137. {
  138. }
  139.  
  140. - (BOOL)useNestedDetails;
  141. - undoDetail;
  142. - redoDetail;
  143.  
  144. @end
  145.  
  146. @interface OrderChangeDetail : ChangeDetail
  147. {
  148.     unsigned    graphicPosition;
  149. }
  150.  
  151. - (BOOL)useNestedDetails;
  152. - recordGraphicPositionIn:graphicList;
  153. - (unsigned)graphicPosition;
  154.  
  155. @end
  156.