This is CubicSliderCell.h in view mode; [Download] [Up]
/*
*
*
* CubicSlider 1.2, subclassed by Raymond Lutz mai 1993,
* class description in CubicSliderCell.rtf
*
*
*/
#import <appkit/SliderCell.h>
#import <nib/InterfaceBuilder.h>
@interface CubicSliderCell:SliderCell
{
DPSTimedEntry teNum;
double newExtremumValue;
id cover; // a dumb button to catch events
id minMaxView; // to group the 3 elements below
id form; // where to type in new min or max
id knobButton; // to take the current slider value
id quadButton; // to quadruple the range
id upTarget;
SEL upAction;
int extremumType; // 1 -> max 0 -> min
double absoluteMaxValue;
double absoluteMinValue;
BOOL editing;
BOOL previousClickOnTheKnob;
BOOL absoluteMinValueSet;
BOOL absoluteMaxValueSet;
BOOL minIsEditable;
BOOL maxIsEditable;
BOOL mouseIsUp,cubic;
double A; // the polynomial scaling factor
double yFlat; // y coordinate of the flat region center.
// After mouseUp, made to be the current slider value.
double xFlat; // x coordinate of the flat region center.
// After mouseUp, the knob position is that value.
// Remember: here the slider value != knob position ...
}
- init;
- setMinValue: (double) aDouble;
- setMaxValue: (double) aDouble;
- setCubic: (BOOL) aFlag;
- setFloatValue:(float) aFloat;
- setIntValue:(int) anInt;
- setDoubleValue:(double) aDouble;
- setUpTarget:anObject action:(SEL)anAction;
- setUpTarget:anObject;
- setUpAction:(SEL)anAction;
// the following 3 bypass the cubic polynomial
- (int) linearIntValue;
- (float) linearFloatValue;
- (double) linearDoubleValue;
// those pass through the cubic polynomial (if isCubic)
- (int) intValue;
- (float) floatValue;
- (double) doubleValue;
- (BOOL) mouseIsUp;
- (BOOL) isCubic;
- (BOOL) minIsEditable;
- (BOOL) maxIsEditable;
- (BOOL) absoluteMinValueSet;
- (BOOL) absoluteMaxValueSet;
- (double) absoluteMinValue;
- (double) absoluteMaxValue;
- upTarget;
- (SEL)upAction;
- setMinEditable:(BOOL) aFlag;
- setMaxEditable:(BOOL) aFlag;
- setAbsoluteMinValue:(double) aDouble;
- setAbsoluteMaxValue:(double) aDouble;
- clearAbsoluteMinValue;
- clearAbsoluteMaxValue;
// *** private methods ***
// popping part
- (BOOL)trackMouse:(NXEvent *)theEvent inRect:(const NXRect *)cellFrame ofView:controlView;
- newCover;
- popFormAndButtons;
- takeCurrentSliderValueForNew;
- takeFormValueForNew;
- quadRange;
- popCellAndMakeChangeSoon;
- popCellAndMakeChangeNow;
- stopTimedEntry;
- notifyTargets;
// cubic part
- (BOOL)startTrackingAt:(const NXPoint *)startPoint inView:controlView;
- stopTracking:(NXPoint *)lastPoint at:(NXPoint *)endPoint inView:controlView mouseIsUp: (BOOL)flag;
- calcNewFct;
- flipCubicFlag;
// *** IB methods ***
- (const char*)inspectorName;
- read:(NXTypedStream*)stream;
- write:(NXTypedStream*)stream;
@end
@interface Object(SliderCellTarget)
- takeCubicSliderStatusFrom: sender;
@end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.