This is LockGraphicsChange.m in view mode; [Download] [Up]
#import "drawundo.h"
@interface LockGraphicsChange(PrivateMethods)
- redoDetails;
@end
@implementation LockGraphicsChange
- (const char *)changeName
{
return NXLocalStringFromTable("Operations", "Lock", NULL, "The operation of locking down all selected graphics so that they can't be edited in anyway until they are unlocked.");
}
- undoChange
{
[graphics makeObjectsPerform:@selector(unlock)];
[graphics makeObjectsPerform:@selector(select)];
[graphicView resetLockedFlag];
[graphicView getSelection];
return [super undoChange];
}
- changeDetailClass
{
return nil;
}
- redoDetails
{
int i, count;
List *selectedGraphics;
id graphic;
selectedGraphics = [graphicView selectedGraphics];
count = [graphics count];
for (i = 0; i < count; i++) {
graphic = [graphics objectAt:i];
[graphic lock];
[graphic deselect];
[selectedGraphics removeObject:graphic];
}
[graphicView resetLockedFlag];
return self;
}
@endThese are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.