home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 18
/
aminetcdnumber181997.iso
/
Aminet
/
dev
/
e
/
EasyGUI_v33b2.lha
/
Docs
/
gradient.doc
< prev
next >
Wrap
Text File
|
1996-12-04
|
2KB
|
52 lines
GradientSlider PLUGIN
---------------------
The silder that goes with the colorwheel from the Palette prefs program.
Uses the 'gradientslider.gadget' which needs to be in the normal place of
libs:gadgets/ (usually libs: is also assigned to sys:classes/, and .gadget
files should be stored in the sys:classes/gadgets/ directory).
Constructors:
gradient(vert=FALSE,curval=0,rel=5,pens=NIL:PTR TO INT,disabled=FALSE)
vert -> Whether this gadget is vertical or horizontal
curval -> The current value of the slider
rel -> The relative size (height if vert, width if not)
pens -> The pen array used in the gradient (ends with -1)
disabled -> Whether this gadget is disabled
Destructor:
END *must* be called for each NEWed object.
Data (should be considered read-only, except as mentioned below):
OBJECT button OF plugin
curval -> The current value of the slider (0 to $FFFF)
pens:PTR TO INT -> The current pen array for the gradient
disabled -> Disabled or enabled
PRIVATE ...
ENDOBJECT
New methods:
setcurval(x) -> Set the current value of the slider
setpens(pens=NIL:PTR TO INT) -> Change the pen array
setdisabled(disabled=TRUE) -> Disable/enable the gadget
Note: if NIL is specified for setpens() then the current pen array
will be used (in which case it's OK to edit the data in self.pens
just before calling setpens()).
Action functions:
Your action function will be called (or your action value returned by
easygui()) in the following circumstances:
o When the slider is moved or released.
Exceptions:
"grad" will be raised by the constructor if the .gadget file can't be
opened.
"grad" will be raised by the render() method if the gadget can't be
created.