This is CubicSliderCell.rtf in view mode; [Download] [Up]
Release 1.4 by Raymond Lutz, 24 juin 1993. CubicSliderCell INHERITS FROM SliderCell: ActionCell : Cell : Object DECLARED IN CubicSliderCell.h CLASS DESCRIPTION The CubicSliderCell is used to implement the CubicSlider Control as well as to provide Matrices of CubicSliderCells. INSTANCE VARIABLES Inherited from Object Class isa; Inherited from Cell char *contents; id support; struct _cFlags1 cFlags1; struct _cFlags2 cFlags2; Inherited from ActionCell int tag; id target; SEL action; Inherited from SliderCell double value; double maxValue; double minValue; NXRect trackRect; Declared in CubicSliderCell double A; double xFlat; double yFlat; double absoluteMinValue; double absoluteMaxValue; double newExtremumValue; int extremumType; BOOL absoluteMinValueSet; BOOL absoluteMaxValueSet; BOOL minIsEditable; BOOL maxIsEditable; BOOL mouseIsUp; BOOL cubic; id upTarget; SEL upAction; id minMaxView; id form; id knobButton; id dblButton; DPSTimedEntry teNum; A The cubic polynomial transfer function scaling factor. xFlat The cubic polynomial center x coordinate. yFlat The cubic polynomial center y coordinate. absoluteMinValue The minimum allowable minValue of the slider. absoluteMaxValue The maximum allowable maxValue of the slider. newExtremumValue The next minimum or maximum value. extremumType The new extremum type (1 is maximum, 0 minimum). absoluteMinValueSet Whether the CubicSliderCell has an absoluteMinValue set. absoluteMaxValueSet Whether the CubicSliderCell has an absoluteMaxValue set. minIsEditable Whether the user can edit the minimum value. maxIsEditable Whether the user can edit the maximum value. mouseIsUp Whether the user released the slider knob. cubic Whether the CubicSliderCell has a cubic polynomial transfer function. upTarget The object's notification target on mouseUp. upAction The message to send to the up target. cover A disabled unbordered button masking the slider and intercepting events. minMaxView A view containing the small form and the two buttons. form The popping form. knobButton The button that commands the current slider value to be the newExtremumValue. dblButton The button that commands the range to be doubled. teNum The timed entry function used to extract minMaxView from the view hierarchy. METHOD TYPES Initializing a new CubicSliderCell - init Setting CubicSliderCell Values - doubleValue - floatValue - intValue - linearDoubleValue - linearFloatValue - linearIntValue - maxValue - minValue - setDoubleValue: - setFloatValue: - setIntValue: - setMaxValue: - setMinValue: Tracking the Mouse - startTrackingAt:inView: - stopTracking:at:inView:mouseIsUp: - trackMouse:inRect:ofView: Setting Cell Transfer Function - setCubic: - isCubic Setting User Access - setMinEditable - minIsEditable - setMaxEditable - maxIsEditable Setting Absolute Range - setAbsoluteMinValue - absoluteMinValueSet - absoluteMinValue - clearAbsoluteMinValue - setAbsoluteMaxValue - absoluteMaxValueSet - absoluteMaxValue - clearAbsoluteMaxValue Targets And Actions - upAction - setUpAction: - upTarget: - setUpTarget: - setUpTarget:action: Archiving - read: - write: INSTANCE METHODS init - init Initializes and returns the receiver, a new instance of CubicSliderCell. The value is set to 0.0, the minValue is set to 0.0, the maxValue is set to 1.0, and the CubicSliderCell is continuous and cubic. This method is the designated initializer for CubicSliderCell. See also: ± setContinuous:, ± setMaxValue:, ± setMinValue: setEnabled: - setEnabled:(BOOL)flag If flag is YES, enables the Slider; if NO, disables the Slider. Redraws the interior of the Slider if autodisplay is on and the enabled state has changed. Returns self. minValue - (double)minValue Returns the minimum value of the Slider. setMinValue: - setMinValue:(double)aDouble Sets the minimum value of the CubicSlider. If aDouble conflicts with a set absoluteMinValue (being smaller) then absoluteMinValue will also be set to this specified minimum value. Returns self. See also: ± setAbsoluteMinValue: maxValue - (double)maxValue Returns the maximum value of the Slider. setMaxValue: - setMaxValue:(double)aDouble Sets the maximum value of the CubicSliderCell. If aDouble conflicts with a set absoluteMaxValue (being greater) then absoluteMaxValue will also be set to this specified maximum value. Returns self. See also: ± setAbsoluteMaxValue: setMinEditable: - setMinEditable:(BOOL) aFlag Sets the slider minimum value user access. If flag is YES, the user will be able to specify a new minimum value after a double-click; if NO, a system beep will inform that the minimum value can't be edited. Returns self. See also: ± setAbsoluteMinValue: minIsEditable: - (BOOL) minIsEditable Returns YES if the user can edit the slider minimum value, NO otherwise. setMaxEditable: - setMaxEditable:(BOOL) aFlag Sets the slider maximum value user access. If flag is YES, the user will be able to specify a new maximum value after a double-click; if NO, a system beep will inform that the maximum value can't be edited. Returns self. See also: ± setAbsoluteMaxValue: maxIsEditable: - (BOOL) maxIsEditable Returns YES if the user can edit the slider maximum value, NO otherwise. setAbsoluteMinValue: - setAbsoluteMinValue:(double)aDouble Sets a slider absoluteMinValue: even if the user has access to the slider minimum value, he won't be allowed to set it smaller then aDouble (a system beep will indicate that a limit exists and has been reached). If aDouble conflicts with the current slider minimum value (being greater) then the slider minimum value will also be set to aDouble. Returns self. See also: ± setMinValue, ± absoluteMinValue, ± absoluteMinValueSet, ± clearAbsoluteMinValue absoluteMinValueSet - (BOOL) absoluteMinValueSet Returns YES if an absoluteMinValue has been set, NO otherwise. See also: ± absoluteMinValue, ± setAbsoluteMinValue, ± clearAbsoluteMinValue absoluteMinValue - (double)absoluteMinValue Returns the absoluteMinValue of the Slider (no check done if set or not ). See also: ± setAbsoluteMinValue, ± absoluteMinValueSet, ± clearAbsoluteMinValue clearAbsoluteMinValue - clearAbsoluteMinValue Clears the absoluteMinValue of the Slider. Returns self. See also: ± absoluteMinValue, ± setAbsoluteMinValue, ± AbsoluteMinValueSet setAbsoluteMaxValue: - setAbsoluteMaxValue:(double)aDouble Sets a slider AbsoluteMaxValue: even if the user has access to the slider maximum value, he won't be allowed to set it greater then aDouble (a system beep will indicate that a limit exists and has been reached). If aDouble conflicts with the current slider maximum value (being smaller) then the slider maximum value will also be set to aDouble. Returns self. See also: ± setMaxValue, ± absoluteMaxValue, ± AbsoluteMaxValueSet, ± clearAbsoluteMaxValue absoluteMaxValueSet - (BOOL) absoluteMaxValueSet Returns YES if an absoluteMaxValue has been set, NO otherwise. See also: ± absoluteMaxValue, ± setAbsoluteMaxValue, ± clearAbsoluteMaxValue absoluteMaxValue - (double)absoluteMaxValue Returns the absoluteMaxValue of the Slider (no check done if set or not ). See also: ± setAbsoluteMaxValue, ± AbsoluteMaxValueSet, ± clearAbsoluteMaxValue clearAbsoluteMaxValue - clearAbsoluteMaxValue Clears the absoluteMaxValue of the Slider. Returns self. See also: ± absoluteMaxValue, ± setAbsoluteMaxValue, ± AbsoluteMaxValueSet setCubic: - setCubic:(BOOL) aFlag If flag is YES, the transfer function will be a cubic polynomial; if NO, it will be linear, as its superclass (that is, no transfer function). Returns self. See also: ± linearIntValue, ± linearFloatValue, ± linearDoubleValue isCubic: - (BOOL) isCubic Returns YES if the slider has a cubic polynomial transfer function, NO otherwise (no transfer function). setUpTarget:action: - setUpTarget:anObject action:(SEL)aSelector Sets the receiver's up target and up action method to anObject and aSelector. The later is sent to the former when the slider cell receives a stopTracking:at:inView:mouseIsUp: message (that is, when the user releases the slider knob). Useful when one needs user feedback about transformations too computing intensive to be done continuously: an approximation of the final result can be updated by the standard target and the final result thoroughly determined by this up target. Returns self. See also: ± setUpTarget:, ± setUpAction:, ± mouseIsUp upTarget - target Returns the receiver's target setUpTarget: - setUPTarget:anObject Sets the receiver's upTarget to anObject. Returns self. See also: ± setUpAction: upAction - (SEL)upAction Returns the selector for the receiver's action method. See also: ± setUpAction: setUpAction - setUpAction:(SEL)aSelector Sets the receiver's up action method to aSelector. Returns self. See also: ± setUpTarget: mouseIsUp - (BOOL)mouseIsUp Returns YES if the user released the slider knob, NO if he is still dragging (this is an alternative to setUpTarget:action: and used with a continuous slider). linearDoubleValue - (double)linearDoubleValue Returns the linear value of the CubicSliderCell. floatValue - (float)floatValue Returns the value of the CubicSliderCell as a float. intValue - (int)intValue Returns the value of the CubicSliderCell as an int. doubleValue - (double)doubleValue Returns the value of the CubicSliderCell. setDoubleValue: - setDoubleValue:(double)aDouble Sets the value of the CubicSliderCell to aDouble. Updates the CubicSliderCell knob position to reflect the new value and returns self. setFloatValue: - setFloatValue:(float)aFloat Sets the value of the CubicSliderCell to aDouble. Updates the CubicSliderCell knob position to reflect the new value and returns self. setIntValue: - setIntValue:(int)anInt Sets the value of the CubicSliderCell to anInt. Updates the CubicSliderCell knob position to reflect the new value and returns self. linearFloatValue - (float)linearFloatValue Returns the linear value of the CubicSliderCell as a float. linearIntValue - (int)linearIntValue Returns the linear value of the CubicSliderCell as an int. read: - read:(NXTypedStream *)stream Reads the CubicSliderCell from the typed stream stream. Returns self. write: - write:(NXTypedStream *)stream Writes the receiving CubicSliderCell to the typed stream stream and returns self. METHODS IMPLEMENTED BY TARGETS takeCubicNewSliderStatusFrom: - takeCubicNewSliderStatusFrom: sender This method invoked by CubicSlider (or a Matrix owning CubicSliderCells) when one of its extremum values has been modified by the user or when its transfer function has been toggled between linear and cubic polynomial with an ALT double-click. Targets are the regular cell (or matrix) action target and the additionnal CubicSliderCell upTarget (if any).
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.