home *** CD-ROM | disk | FTP | other *** search
/ OpenStep (Enterprise) / OpenStepENTCD.toast / OEDEV / DEV.Z / ChangeDetail.h < prev    next >
Encoding:
Text File  |  1995-08-07  |  2.7 KB  |  157 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 : NSObject
  28. {
  29.     Graphic    *graphic;     /* the Graphic that we serve */
  30.     id        change;         /* the Change object that we belong to */
  31.     NSMutableArray    *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. - (Graphic *)graphic;
  42. - (BOOL)useNestedDetails;
  43. - (BOOL)changeExpected;
  44. - (void)recordDetail;
  45. - (void)undoDetail;
  46. - (void)redoDetail;
  47. - (void)recordIt;
  48. - (void)undoIt;
  49. - (void)redoIt;
  50.  
  51. @end
  52.  
  53. @interface ArrowChangeDetail : ChangeDetail
  54. {
  55.     int        oldLineArrow;
  56. }
  57.  
  58. - (void)recordIt;
  59. - (void)undoIt;
  60. - (void)redoIt;
  61.  
  62. @end
  63.  
  64. @interface DimensionsChangeDetail : ChangeDetail
  65. {
  66.     NSRect     oldBounds;
  67.     NSRect     newBounds;
  68. }
  69.  
  70. - (BOOL)useNestedDetails;
  71. - (void)recordDetail;
  72. - (void)undoDetail;
  73. - (void)redoDetail;
  74.  
  75. @end
  76.  
  77. @interface FillChangeDetail : ChangeDetail
  78. {
  79.     NSColor *    oldFillColor;
  80.     int        oldFillMode;
  81.     NSColor *    newFillColor;
  82.     int        newFillMode;
  83. }
  84.  
  85. - (void)recordIt;
  86. - (void)undoIt;
  87. - (void)redoIt;
  88.  
  89. @end
  90.  
  91. @interface LineCapChangeDetail : ChangeDetail
  92. {
  93.     int        oldLineCap;
  94. }
  95.  
  96. - (void)recordIt;
  97. - (void)undoIt;
  98. - (void)redoIt;
  99.  
  100. @end
  101.  
  102. @interface LineColorChangeDetail : ChangeDetail
  103. {
  104.     NSColor *    oldColor;
  105.     BOOL    oldIsOutlined;
  106. }
  107.  
  108. - (void)recordIt;
  109. - (void)undoIt;
  110. - (void)redoIt;
  111.  
  112. @end
  113.  
  114. @interface LineJoinChangeDetail : ChangeDetail
  115. {
  116.     int        oldLineJoin;
  117. }
  118.  
  119. - (void)recordIt;
  120. - (void)undoIt;
  121. - (void)redoIt;
  122.  
  123. @end
  124.  
  125. @interface LineWidthChangeDetail : ChangeDetail
  126. {
  127.     float    oldLineWidth;
  128. }
  129.  
  130. - (void)recordIt;
  131. - (void)undoIt;
  132. - (void)redoIt;
  133.  
  134. @end
  135.  
  136. @interface MoveChangeDetail : ChangeDetail
  137. {
  138.  
  139. }
  140.  
  141. - (BOOL)useNestedDetails;
  142. - (void)undoDetail;
  143. - (void)redoDetail;
  144.  
  145. @end
  146.  
  147. @interface OrderChangeDetail : ChangeDetail
  148. {
  149.     unsigned    graphicPosition;
  150. }
  151.  
  152. - (BOOL)useNestedDetails;
  153. - (void)recordGraphicPositionIn:graphicList;
  154. - (unsigned)graphicPosition;
  155.  
  156. @end
  157.