//
//  MPT_EnjoymentView.m
//  MPT_Rubios
//
//  Created by Andrew Salamon on 2/22/08.
//  Copyright 2008 Machine Perception Laboratory, University of California San Diego.. All rights reserved.
//

#import "MPT_EnjoymentView.h"

#import "MPT_Speedometer.h"

@implementation MPT_EnjoymentView

- (id)initWithFrame:(NSRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code here.
    }
    return self;
}

- (void)awakeFromNib
{
    [cutoffSlider setContinuous:YES];
}

- (void)drawRect:(NSRect)rect
{
	NSSize mySize = [self frame].size;	
	
	NSFrameRect( NSMakeRect( 0.0, 0.0, mySize.width, mySize.height ) );
}

- (void)addValue:(float)value
{
    [valueView setCurValue:value];
    [valueField setFloatValue:value];
}

- (void)addNoValue
{
    [valueView setNoValue:YES];
    [valueField setStringValue:@""];
}

- (void)mouseUp:(NSEvent *)theEvent
{
    // Just suppress it.
}

- (MPT_Speedometer *)valueView {
    return [[valueView retain] autorelease];
}


@end
