/* Generated by Interface Builder */

#import "SliderInspector.h"
#import <appkit/Application.h>
#import <appkit/Slider.h>
#import <appkit/Button.h>
#import <appkit/Form.h>
#import <appkit/Matrix.h>

@implementation SliderInspector

+ finishLoading:(struct mach_header *)header 
{
    NIBDidLoadClass(self, header);
    return nil;
}

+ startUnloading 
{
    NIBWillUnloadClass(self);
    return nil;
}

- init
{
    [super init];
    [NXApp loadNibSection:"CubicSliderInspector.nib" owner:self];
    return self;
}
- ok:sender
{
    [object setMinValue:[valuesForm floatValueAt:0]];
    [object setMaxValue:[valuesForm floatValueAt:2]];
    [object setFloatValue:[valuesForm floatValueAt:1]];
    [object setContinuous: 1 - [continuousMatrix selectedRow] ] ;
    [object setEnabled: [enabledSwitch state]] ;
    [object setTag: [tagForm intValueAt:0]];
    return [super ok:sender];
}

- revert:sender
{
    [valuesForm setFloatValue: [object minValue] at:0];	
    [valuesForm setFloatValue: [object maxValue] at:2];	
    [valuesForm setFloatValue:[object floatValue] at:1];
    [continuousMatrix selectCellAt: 1- [object isContinuous]:0];
    [enabledSwitch setState: [object isEnabled]];
    [tagForm setIntValue: [object tag] at:0];
    return [super revert:sender];
}

- performClick:sender
{
	return [super performClick:self];
}

@end
