/* Implementation for Slider class
 *
 * Copyright (C)  1993  The Board of Trustees of  
 * The Leland Stanford Junior University.  All Rights Reserved.
 *
 * Authors: Scott Francis, Paul Kunz, Tom Pavel, Imran Qureshi, and Libing Wang
 *
 * This file is part of an Objective-C class library for a window system
 *
 * Slider.m,v 1.23 1995/12/13 22:33:18 fedor Exp
 */

#include "Slider.h"

/* Required for implementation: */
#include "SliderCell.h"
#include <stdlib.h>

@implementation Slider

+ setCellClass:factoryId
{
  [self notImplemented:_cmd];
  return 0;
}

- initFrame:(const NXRect *)frameRect
{
    [super initFrame:frameRect];
    if (!cell) {
	cell = [[SliderCell alloc] init];
    }
    if (frame.size.width < frame.size.height) {
	[(SliderCell *)cell setVertical:YES];
    } else {
	[(SliderCell *)cell setVertical:NO];
    }
    return self;
}

- sizeToFit
{
  [self notImplemented:_cmd];
  return 0;
}

- (double) minValue
{
    return [(SliderCell *)cell minValue];
}

- setMinValue:(double)aDouble
{
    [(SliderCell *)cell setMinValue:aDouble];

    return self;
}

- (double)maxValue
{
    return [(SliderCell *)cell maxValue];
}

- setMaxValue:(double)aDouble
{
    [(SliderCell *)cell setMaxValue:aDouble];
    return self;
}

- setTitleCell:aCell
{
  [self notImplemented:_cmd];
  return 0;
}

- titleCell
{
  [self notImplemented:_cmd];
  return 0;
}

- setTitleGray:(float)grayVal
{
  [self notImplemented:_cmd];
  return 0;
}

- (float)titleGray
{
  [self notImplemented:_cmd];
  return 0;
}

- setTitleColor:(NXColor)newColor
{
  [self notImplemented:_cmd];
  return 0;
}

- (NXColor)titleColor
{
  NXColor color;
  [self notImplemented:_cmd];
  return color;
}

- setTitleFont:fontObj
{
  [self notImplemented:_cmd];
  return 0;
}

- titleFont
{
  [self notImplemented:_cmd];
  return 0;
}

- (const char *)title
{
  [self notImplemented:_cmd];
  return 0;
}

- setTitle:(const char*)aString
{
    [cell setStringValue:aString];
    return self;
}

- setTitleNoCopy:(const char *)aString
{
  [self notImplemented:_cmd];
  return 0;
}

- setKnobThickness:(NXCoord)aFloat
{
  [self notImplemented:_cmd];
  return 0;
}

- (NXCoord)knobThickness
{
  [self notImplemented:_cmd];
  return 0;
}

- setImage:backgroundImage
{
  [self notImplemented:_cmd];
  return 0;
}

- image
{
  [self notImplemented:_cmd];
  return 0;
}

- (int)isVertical
{
    return [(SliderCell *)cell isVertical];
}

- setEnabled:(BOOL)flag
{
  return [super setEnabled: flag];
}

- mouseDown:(NXEvent *)theEvent
{
  [self notImplemented:_cmd];
  return 0;
}

- (BOOL)acceptsFirstMouse
{
  return YES;
}


@end
