File:  [NeXTSTEP 3.3 examples] / Examples / AppKit / Draw / graphicsUndo.subproj / ChangeDetail.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:48:38 2018 UTC (8 years, 1 month ago) by root
Branches: NeXT, MAIN
CVS tags: NeXTSTEP33, HEAD
Sample Programs from NeXSTEP 3.3

/*
 * Please refer to external documentation about Draw
 * with Undo for information about what ChangeDetails 
 * are and where they fit in.
 *
 * The ChangeDetail.h and ChangeDetail.m files contain
 * the @interfaces and @implementations for the 11 
 * subclasses of ChangeDetail, as well as for ChangeDetail
 * itself. We grouped all the classes into one pair of 
 * files because the classes are so tiny and their behavior
 * is so similar.
 *
 * ChangeDetail
 *     ArrowChangeDetail
 *     DimensionsChangeDetail
 *     FillColorChangeDetail
 *     FillModeChangeDetail
 *     LineCapChangeDetail
 *     LineColorChangeDetail
 *     LineJoinChangeDetail
 *     LineWidthChangeDetail
 *     MoveChangeDetail
 *     OrderChangeDetail
 * 
 */

@interface ChangeDetail : Object
{
    Graphic	*graphic;	 /* the Graphic that we serve */
    id		change;		 /* the Change object that we belong to */
    List	*detailsDetails; /* If the Graphic that this ChangeDetail
    				  * serves is a Group then detailsDetails
				  * is used to keep track of the
				  * ChangeDetails that serve the component
				  * Graphics of the Group.
				  */
    BOOL	changeExpected;
}

- initGraphic:aGraphic change:aChange;
- free;
- graphic;
- (BOOL)useNestedDetails;
- (BOOL)changeExpected;
- recordDetail;
- undoDetail;
- redoDetail;
- recordIt;
- undoIt;
- redoIt;

@end

@interface ArrowChangeDetail : ChangeDetail
{
    int		oldLineArrow;
}

- recordIt;
- undoIt;
- redoIt;

@end

@interface DimensionsChangeDetail : ChangeDetail
{
    NXRect 	oldBounds;
    NXRect 	newBounds;
}

- (BOOL)useNestedDetails;
- recordDetail;
- undoDetail;
- redoDetail;

@end

@interface FillChangeDetail : ChangeDetail
{
    NXColor	oldFillColor;
    int		oldFillMode;
    NXColor	newFillColor;
    int		newFillMode;
}

- recordIt;
- undoIt;
- redoIt;

@end

@interface LineCapChangeDetail : ChangeDetail
{
    int		oldLineCap;
}

- recordIt;
- undoIt;
- redoIt;

@end

@interface LineColorChangeDetail : ChangeDetail
{
    NXColor	oldColor;
    BOOL	oldIsOutlined;
}

- recordIt;
- undoIt;
- redoIt;

@end

@interface LineJoinChangeDetail : ChangeDetail
{
    int		oldLineJoin;
}

- recordIt;
- undoIt;
- redoIt;

@end

@interface LineWidthChangeDetail : ChangeDetail
{
    float	oldLineWidth;
}

- recordIt;
- undoIt;
- redoIt;

@end

@interface MoveChangeDetail : ChangeDetail
{
}

- (BOOL)useNestedDetails;
- undoDetail;
- redoDetail;

@end

@interface OrderChangeDetail : ChangeDetail
{
    unsigned	graphicPosition;
}

- (BOOL)useNestedDetails;
- recordGraphicPositionIn:graphicList;
- (unsigned)graphicPosition;

@end

unix.superglobalmegacorp.com

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