home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / dev / e / EasyGUI_v33b2.lha / Docs / colorwheel.doc < prev    next >
Text File  |  1996-12-04  |  2KB  |  63 lines

  1. ColorWheel PLUGIN
  2. -----------------
  3. The famous colorwheel from the Palette prefs program.  Uses the
  4. 'colorwheel.gadget' which needs to be in the normal place of libs:gadgets/
  5. (usually libs: is also assigned to sys:classes/, and .gadget files should
  6. be stored in the sys:classes/gadgets/ directory).
  7.  
  8. Constructors:
  9.  
  10.     colorwheel(rgb:PTR TO colorwheelrgb,hsb=NIL:PTR TO colorwheelhsb,
  11.                box=FALSE,disabled=FALSE)
  12.         rgb      -> The initial value as RGB
  13.         hsb      -> The initial value as HSB
  14.         box      -> Whether to put a bevel box around the wheel
  15.         disabled -> Whether this gadget is disabled
  16.  
  17. Destructor:
  18.  
  19.     END *must* be called for each NEWed object.
  20.  
  21. Data (should be considered read-only, except as mentioned below):
  22.  
  23.     OBJECT colorwheel OF plugin
  24.       rgb:PTR TO colorwheelrgb  -> Current RGB value
  25.       hsb:PTR TO colorwheelhsb  -> Current HSB value
  26.       disabled                  -> Disabled or enabled
  27.     PRIVATE ...
  28.     ENDOBJECT
  29.  
  30.     Only one of rgb and hsb will be valid at any time (the invalid one will
  31.     be NIL), depending on which system you used when you last set the
  32.     current value.
  33.  
  34. New methods:
  35.  
  36.     setrgb(rgb=NIL)            -> Set the current value using RGB
  37.     sethsb(hsb=NIL)            -> Set the current value using HSB
  38.     getrgb(rgb)                -> Get the current RGB value
  39.     gethsb(hsb)                -> Get the current HSB value
  40.     setdisabled(disabled=TRUE) -> Disable/enable the gadget
  41.  
  42.     Note: using setrgb()/sethsb() changes the system that the colorwheel
  43.           uses, so after a setrgb() the hsb element will be invalid (NIL).
  44.     Note: if NIL is specified for setrgb() or sethsb() then the current one
  45.           will be used (in which case it's OK to edit the data in self.rgb
  46.           or self.hsb just before calling setXXX()).
  47.     Note: getrgb()/gethsb() fill in the colorwheelrgb/hsb that you supply
  48.           with the current colorwheel value, but do not change the system
  49.           that's being used.
  50.  
  51. Action functions:
  52.  
  53.     Your action function will be called (or your action value returned by
  54.     easygui()) in the following circumstances:
  55.       o When the pointer is moved.
  56.  
  57. Exceptions:
  58.  
  59.     "colw" will be raised by the constructor if the .gadget file can't be
  60.            opened.
  61.     "colw" will be raised by the render() method if the gadget can't be
  62.            created.
  63.