|
|
Sample Programs from NeXSTEP 3.3
#import "drawundo.h"
@interface ResizeGraphicsChange(PrivateMethods)
- undoDetails;
- redoDetails;
@end
@implementation ResizeGraphicsChange
- initGraphicView:aGraphicView graphic:aGraphic
{
[super initGraphicView:aGraphicView];
graphic = aGraphic;
return self;
}
- (const char *)changeName
{
return NXLocalStringFromTable("Operations", "Resize", NULL, "The operation of changing the size of a graphical entity by dragging a corner of it with the mouse.");
}
- saveBeforeChange
{
graphics = [[List alloc] init];
[graphics addObject:graphic];
[graphic getBounds:&oldBounds];
return self;
}
- changeDetailClass
{
return nil;
}
- undoDetails
{
[graphic getBounds:&newBounds];
[graphic setBounds:&oldBounds];
return self;
}
- redoDetails
{
[graphic setBounds:&newBounds];
return self;
}
@end
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.