TABLE OF CONTENTS gradientslider.gadget/--datasheet-- gradientslider.gadget/--datasheet-- gradientslider.gadget/--datasheet-- NAME gradientslider.gadget -- Create gradient slider BOOPSI objects. SUPERCLASS gadgetclass REQUIRES frameiclass DESCRIPTION The gradientslider gadget class is a type of non-proportional slider. The primary feature of the gradient slider is it's appearance. Unlike normal sliders, a gradient slider can display a "spread of colors" or "color gradient" in the slider container box. The "knob" or "thumb" of the slider appears to slide on top of this color gradient. The color gradient effect is built-up using a combination of multiple pens and half-tone dithering. The application must tell the slider exactly which pens to use in creating the gradient effect, and in what order to use them. Essentially, it does this by passing an array of pens (terminated by ~0, just like a PenSpec) to the slider. The first pen in the array is used as the color at the top of the slider (or left, if it is horizontal) and the last color in the array is used at the bottom (or right). The other pens will be used at evenly spaced intervals in between. Dithering is used to smoothly fade between the pens allowing the illusion of a continuous change in color. METHODS OM_NEW -- Passed to superclass, defaults set then OM_SET. OM_DISPOSE -- Passed to superclass. OM_SET -- Passed to superclass then custom tags set & render. OM_GET -- Returns requested setting or passed to superclass. OM_UPDATE -- Passed to superclass then custom tags set & render. GM_DOMAIN -- Returns GDOMAIN_MINIMUM, GDOMAIN_NOMINAL and GDOMAIN_MAXIMUM dimensions. GM_HITTEST -- Determines if gadget was hit. GM_GOACTIVE -- Passed to superclass then activated. GM_HANDLEINPUT -- Overrides superclass. GM_GOINACTIVE -- Passed to superclass then deactivated. GM_RENDER -- Renders the gadget imagery. GM_EXTENT -- Reports gadget rendering extent. All other methods are passed to the superclass. ATTRIBUTES GA_ID (uint16) Unique ID number for the gadget. Defaults to 0. Applicability is (OM_NEW, OM_SET, OM_GET, OM_UPDATE, OM_NOTIFY) GA_UserInput (BOOL) Notification tag indicates this notification is from the active gadget receiving user input. Applicability is (OM_NOTIFY) GA_BackFill (struct Hook *) A layer backfill hook to provide a more complex background pattern. See InstallLayerHook() for more details about the backfill hook. Defaults to NULL. Applicability is (OM_NEW, OM_SET, OM_UPDATE) GA_Disabled (BOOL) Determines whether the gadget is disabled or not. Defaults to FALSE. Applicability is (OM_NEW, OM_SET, OM_UPDATE) GA_HintInfo (CONST_STRPTR) Specify the text to use as the hint info for this gadget. You can change this attribute at any time, and it will over- ride any text specified in the windows HintInfo array. See window.class autodoc for more information. Defaults to NULL. Applicability is (OM_NEW, OM_SET). PGA_FREEDOM (uint32) Determines the orientation of the slider. This can be LORIENT_HORIZ for a horizontal slider or LORIENT_VERT for a vertical one. Defaults to LORIENT_HORIZ. Applicability is (OM_NEW) GRAD_MaxVal (uint32) Set the maximum value that the slider can represent in the range 0 to 0xFFFF. Defaults to 0xFFFF. Applicability is (OM_NEW, OM_SET, OM_UPDATE, OM_GET) GRAD_CurVal (uint32) Set or get the current value of the slider in the range 0 to 0xFFFF. Defaults to 0. Applicability is (OM_NEW, OM_SET, OM_UPDATE, OM_GET, OM_NOTIFY) GRAD_SkipVal (uint32) Set the amount by which the slider should advance whenever the user clicks on either side of the knob. Defaults to 0x1111. Applicability is (OM_NEW, OM_SET, OM_UPDATE, OM_GET) GRAD_KnobPixels (uint16) Set the size of the knob in pixels. Defaults to 5. Applicability is (OM_NEW) GRAD_PenArray (uint16 *) Specifies an array of pens that the slider should use to create its gradient background. The array can contain any number of pens and is terminated with a pen value of ~0. These pens can be allocated as shared since their RGB value is not altered by the slider. The first pen is used on the top or left of the slider and the last pen is used on the bottom or right. All other pens are evenly spaced out and used in between. Dithering is used between the pens to enhance the smoothness of the gradient transition. A NULL pen array causes the background of the slider to be rendered in the screen's background color. A pen array containing only a single pen causes the background to be rendered using that pen. Defaults to NULL. Applicability is (OM_NEW, OM_SET, OM_UPDATE)