ftp.nice.ch/pub/next/developer/resources/palettesfor2.xx/CubicSlider.1.4.s.tar.gz#/CubicSlider/docu/CubicSlider.README

This is the README for CubicSlider.rtf [Download] [Browse] [Up]

{\rtf0\ansi{\fonttbl\f3\fswiss Helvetica;\f2\fmodern Ohlfs;}
\paperw13080
\paperh11400
\margl120
\margr120
{\colortbl\red0\green0\blue100;\red0\green0\blue0;}
\pard\tx1060\tx2120\tx3200\tx4260\tx5320\tx6400\tx7460\tx8540\tx9600\tx10660\f3\b0\i0\ul0\fs72\gray282\fc0 The CubicSlider palette 
\fs36 version 1.4  (juin 93)
\fs24 \

\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fs48\fc1 \
What it is\

\pard\tx1060\tx2120\tx3200\tx4260\tx5320\tx6400\tx7460\tx8540\tx9600\tx10660\fs28\fc1 \
This slider subclass has two 
\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fc1 unrelated
\pard\tx1060\tx2120\tx3200\tx4260\tx5320\tx6400\tx7460\tx8540\tx9600\tx10660\fc1  useful 
\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fc1 features
\pard\tx1060\tx2120\tx3200\tx4260\tx5320\tx6400\tx7460\tx8540\tx9600\tx10660\fc1 :
\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fc1 \
\
[1]	You can set its value with a 
\i very
\i0  high precision. Just drag the knob  to the desired\
	value (when released the knob repositions itself, don't be alarmed: the slider 
\i value \
	
\i0 itself
\i  
\i0 doesn't change, only the transfer function cf How it works). It will take 4 or 5\
	trials to  attain a precision of one part in 1 000 000 with a 160 pixels wide CubicSlider \
	(see the resolution form in the CubicSliderDemo). You can toggle between this behavior \
	and the normal one by ALTERNATE double-clicking on the slider.\
			\
[2] 	You can easily enter new minimum and extremum value by double-clicking the knob: two tiny 	buttons and a tiny form appear, covering exactly the slider area; you can either 
\i enlarge
\i0  	the slider range by typing in a new bigger value (or by pressing the 
\pard\tx1340\tx2680\tx4020\tx5360\tx6720\tx8060\tx9400\tx10740\tx12080\tx13440\fc1 NXscrollMenu
\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fc1 Right(Left)  	button: it will be quadrupled), or 
\i narrow
\i0  it pressing the NXscrollMenuDown button
\b :
\b0   the new 	extremum will then be the 
\i current
\i0  slider value. To exit edit mode without any modification simply\
	press enter, the 
\i unchanged
\i0  selected text in the form will be taken as the extremum value.
\b  
\b0   
\pard\tx1060\tx2120\tx3200\tx4260\tx5320\tx6400\tx7460\tx8540\tx9600\tx10660\fc1 \

\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fc1 \
\

\pard\tx1060\tx2120\tx3200\tx4260\tx5320\tx6400\tx7460\tx8540\tx9600\tx10660\fs48\fc1 How it works\

\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fs28\fc1 \
	Briefly, the knob position (
\i while
\i0  dragging) serves as input to a function with a small flat region surrounding the 
\i initial
\i0  knob position (on mouse up the so called transfer function is redefined). A flat region means that large knob moves give small output value variations... for more details see the source comments, rtf docs and 
\b transferFCT.xygraph
\b0  (The transer function is a 
\b\i cubic
\b0\i0  polynomial...)\

\pard\tx1060\tx2120\tx3200\tx4260\tx5320\tx6400\tx7460\tx8540\tx9600\tx10660\fs48\fc1 \
How to use in your code\

\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fs28\fc1 \
	Well, being a Slider subclass, first use as a Slider! (all the new 
\pard\tx1340\tx2680\tx4020\tx5360\tx6720\tx8060\tx9400\tx10740\tx12080\tx13440\fc1 instance
\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fc1  variables of course can be set within the CubicSlider inspector in Interface Builder). Second, there are these methods you may want to use (see CubicSliderCell.rtf and CubicSlider.rtf for detailed info):\

\pard\tx1340\tx2680\tx4020\tx5360\tx6720\tx8060\tx9400\tx10740\tx12080\tx13440\fc1 \
- (BOOL) 
\b mouseIsUp
\b0 \
\
When the slider action is continuously sent, the target can ask if the user released the mouse, useful when something is too computing intensive to be done continuously, but a user feedback on the final result is desirable (in the demo, the tiny mouse icon is updated with this method). Alternatively you can use the following (from Andrew Stone's DualActingSlider, thanks):\
\
- 
\b setUpTarget
\b0 :anObject 
\b action
\b0 :(SEL)anAction\
- 
\b setUpTarget
\b0 :anObject			- 
\b upTarget
\b0 \
- 
\b setUpAction
\b0 :(SEL)anAction			- (SEL)
\b upAction
\b0 \
\
Connections must be done in your program (in 2.1, same thing in 3.0 I guess).\
\
\
- 
\b setCubic
\b0 :(BOOL) aFlag		- (BOOL) 
\b isCubic
\b0 \
\
This one  controls the slider behavior: when cubic the slider passes the knob position through the cubic polynomial transfer function and returns the resulting non-linear value.\
\
\
- 
\b setMinEditable
\b0 :(BOOL) aFlag	- (BOOL) 
\b minIsEditable	
\b0 \
- 
\b setMaxEditable
\b0 :(BOOL) aFlag	- (BOOL) 
\b maxIsEditable	
\b0 \
\
When editable, an extremum value can be modified by the user  (with a double-click).\
\
\
- 
\b setAbsoluteMinValue
\b0 :(double) aDbl	- (double) 
\b absoluteMinValue  
\b0\i  
\i0 \
- 
\b setAbsoluteMaxValue
\b0 :(double) aDbl	- (double) 
\b absoluteMaxValue	
\b0\i  
\i0 \
\
- (BOOL) 
\b absoluteMinValueSet     	
\b0 -  
\b clearAbsoluteMinValue	\

\b0 - (BOOL) 
\b absoluteMaxValueSet   	
\b0 -  
\b clearAbsoluteMaxValue	
\b0 \
\
Although an extremum can be editable, you can set it an absolute value the user won't be allowed to exceed (a positive value only slider for example will have its 
\i absoluteMinValue
\i0  instance variable set to 0).\
\
\
- (int) 
\b linearIntValue
\b0 \
- (float) 
\b linearFloatValue
\b0 \
- (double) 
\b linearDoubleValue
\b0 \
\
Those query the normal slider values regardless of the cubic state.\
\
Finally, hence the user can interactively modify the slider internal settings, a 
\b takeCubicSliderStatusFrom
\b0 : message is sent to targets when changes are made.\

\pard\tx1060\tx2120\tx3200\tx4260\tx5320\tx6400\tx7460\tx8540\tx9600\tx10660\fs48\fc1 	\

\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fc1 What's missing\

\fs28 \
	A 
\pard\tx1340\tx2680\tx4020\tx5360\tx6720\tx8060\tx9400\tx10740\tx12080\tx13440\fc1 vertical
\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fc1  version. And speech synthesis. Bugs, comments and suggestions welcomed at lutzray@ere.umontreal.ca\

\fs48 \
What you can do with the CubicSlider palette\

\fs28 \
	What you want. BUT if you use it  in your mission critical app, your PD software or anything else, send me a greetings card  (or a plain postcard if it isn't Christmas time) at\
\
		Raymond Lutz\
		670 martel\
		Longueuil QC\
		Canada\
		J4J 1C7
\i\fs32 \
\
\
								and last but not least...
\i0\fs48 \
Who I am\

\fs28 \
	Presently a graduated student in solid state physics completing his M.sc. memoir, and attending courses to be (to have the permit to be hired as) a high school 
\pard\tx1340\tx2680\tx4020\tx5360\tx6720\tx8060\tx9400\tx10740\tx12080\tx13440\fc1 math
\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fc1  and physics teacher.\
\
Many thanks to you out there on the net, answering beginner questions like mine and downloading 
\pard\tx1340\tx2680\tx4020\tx5360\tx6720\tx8060\tx9400\tx10740\tx12080\tx13440\fc1 useful
\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fc1  apps and examples on the archives!... \
\

\pard\tx1060\tx2120\tx3200\tx4260\tx5320\tx6400\tx7460\tx8540\tx9600\tx10660\fc1 Raymond Lutz    lutzray@ere.umontreal.ca    15 mai 1993 
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.