home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 18
/
aminetcdnumber181997.iso
/
Aminet
/
dev
/
e
/
EasyGUI_v33b2.lha
/
Docs
/
colorwheel.doc
< prev
next >
Wrap
Text File
|
1996-12-04
|
2KB
|
63 lines
ColorWheel PLUGIN
-----------------
The famous colorwheel from the Palette prefs program. Uses the
'colorwheel.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:
colorwheel(rgb:PTR TO colorwheelrgb,hsb=NIL:PTR TO colorwheelhsb,
box=FALSE,disabled=FALSE)
rgb -> The initial value as RGB
hsb -> The initial value as HSB
box -> Whether to put a bevel box around the wheel
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 colorwheel OF plugin
rgb:PTR TO colorwheelrgb -> Current RGB value
hsb:PTR TO colorwheelhsb -> Current HSB value
disabled -> Disabled or enabled
PRIVATE ...
ENDOBJECT
Only one of rgb and hsb will be valid at any time (the invalid one will
be NIL), depending on which system you used when you last set the
current value.
New methods:
setrgb(rgb=NIL) -> Set the current value using RGB
sethsb(hsb=NIL) -> Set the current value using HSB
getrgb(rgb) -> Get the current RGB value
gethsb(hsb) -> Get the current HSB value
setdisabled(disabled=TRUE) -> Disable/enable the gadget
Note: using setrgb()/sethsb() changes the system that the colorwheel
uses, so after a setrgb() the hsb element will be invalid (NIL).
Note: if NIL is specified for setrgb() or sethsb() then the current one
will be used (in which case it's OK to edit the data in self.rgb
or self.hsb just before calling setXXX()).
Note: getrgb()/gethsb() fill in the colorwheelrgb/hsb that you supply
with the current colorwheel value, but do not change the system
that's being used.
Action functions:
Your action function will be called (or your action value returned by
easygui()) in the following circumstances:
o When the pointer is moved.
Exceptions:
"colw" will be raised by the constructor if the .gadget file can't be
opened.
"colw" will be raised by the render() method if the gadget can't be
created.