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

  1. GradientSlider PLUGIN
  2. ---------------------
  3. The silder that goes with the colorwheel from the Palette prefs program.
  4. Uses the 'gradientslider.gadget' which needs to be in the normal place of
  5. libs:gadgets/ (usually libs: is also assigned to sys:classes/, and .gadget
  6. files should be stored in the sys:classes/gadgets/ directory).
  7.  
  8. Constructors:
  9.  
  10.     gradient(vert=FALSE,curval=0,rel=5,pens=NIL:PTR TO INT,disabled=FALSE)
  11.         vert     -> Whether this gadget is vertical or horizontal
  12.         curval   -> The current value of the slider
  13.         rel      -> The relative size (height if vert, width if not)
  14.         pens     -> The pen array used in the gradient (ends with -1)
  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 button OF plugin
  24.       curval          -> The current value of the slider (0 to $FFFF)
  25.       pens:PTR TO INT -> The current pen array for the gradient
  26.       disabled        -> Disabled or enabled
  27.     PRIVATE ...
  28.     ENDOBJECT
  29.  
  30. New methods:
  31.  
  32.     setcurval(x)                 -> Set the current value of the slider
  33.     setpens(pens=NIL:PTR TO INT) -> Change the pen array
  34.     setdisabled(disabled=TRUE)   -> Disable/enable the gadget
  35.  
  36.     Note: if NIL is specified for setpens() then the current pen array
  37.           will be used (in which case it's OK to edit the data in self.pens
  38.           just before calling setpens()).
  39.  
  40. Action functions:
  41.  
  42.     Your action function will be called (or your action value returned by
  43.     easygui()) in the following circumstances:
  44.       o When the slider is moved or released.
  45.  
  46. Exceptions:
  47.  
  48.     "grad" will be raised by the constructor if the .gadget file can't be
  49.            opened.
  50.     "grad" will be raised by the render() method if the gadget can't be
  51.            created.
  52.