
#import "AnimatedView.h"
#import "Animator.h"

@implementation AnimatedView

- initFrame:(const NXRect *)frm				// initialize instance
{
	[super initFrame:frm];
	[self allocateGState];
	animator = [[Animator alloc] initChronon:0.05 adaptation:0.0 target:self
			action:@selector(autoUpdate:) autoStart:NO eventMask:0];
	return self;
}

- autoUpdate:sender
{
	return self;
}

- start:sender
{
	[animator startEntry];
    return self;
}

- stop:sender
{
	[animator stopEntry];
    return self;
}

- windowWillClose:sender
{
	[self stop:self];
    return self;
}

- free
{
	[[animator stopEntry] free];
	return [super free];
}


@end
