TABLE OF CONTENTS slider.gadget/--datasheet-- slider.gadget/SLIDER_GetClass slider.gadget/--datasheet-- slider.gadget/--datasheet-- NAME slider.gadget -- Create slider BOOPSI objects SUPERCLASS gadgetclass REQUIRES bevel.image DESCRIPTION Slider gadgets are used to control an amount, a level or an intensity such as volume or color. Note that the IntuiMessage.Code field will contain the SLIDER_Level attribute cast to an int16. METHODS OM_NEW -- Create the slider gadget. Passed to superclass. OM_SET -- Set object attributes. Passed to superclass first. OM_DISPOSE -- Disposes object and then passed to superclass. OM_UPDATE -- Update object attributes and pass to superclass. OM_NOTIFY -- Notifies of attribute changes and pass to superclass. OM_GET -- Obtain the value of an attribute. GM_RENDER -- Overrides superclass, renders the gadget imagery. GM_GOACTIVE -- Handles activation. Overrides the superclass. GM_HANDLEINPUT -- All input is processed. Overrides the superclass. GM_GOINACTIVE -- Deactivates input. Overrides the superclass. GM_DOMAIN -- Returns GDOMAIN_MINIMUM, GDOMAIN_NOMINAL and GDOMAIN_MAXIMUM dimensions. GM_CLIPRECT -- Installs ClipRect for virtual group support. GM_LAYOUT -- Calculate relative gadget coordinates. GM_EXTENT -- Reports gadget rendering extent. GM_HITTEST -- Determines if gadget was hit. GM_KEYGOACTIVE -- Handle keyboard activation. (V53.4) GM_KEYGOINACTIVE -- Handle keyboard deactivation. (V53.4) All other methods are passed to the superclass. ATTRIBUTES GA_Disabled (BOOL) Determines whether the slider is disabled or not. Changing disable state will invoke OM_NOTIFY. Defaults to FALSE. Applicability is (OM_NEW, OM_SET, OM_UPDATE, OM_NOTIFY) GA_TextAttr (struct TextAttr *) The font that will be used for the level display. Defaults to NULL (RastPort default font). Applicability is (OM_NEW) 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_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). SLIDER_Level (int32) The current level of a slider. When the level is at its minimum, the knob will be all the way to the left for a horizontal slider or all the way at the top for a vertical one. Conversely, the maximum level corresponds to the knob being to the extreme right or bottom. You may swap the minimum and maximum positions by using the SLIDER_Invert tag. Defaults to 0. Applicability is (OM_NEW, OM_SET, OM_UPDATE, OM_GET, OM_NOTIFY) SLIDER_Min (int32) The minimum slider level. Values smaller than -32768 are not supported. Defaults to 0. Applicability is (OM_NEW, OM_SET, OM_UPDATE, OM_GET, OM_NOTIFY) SLIDER_Max (int32) The maximum slider level. A level beyond 65535 is not supported. Defaults to 0. Applicability is (OM_NEW, OM_SET, OM_UPDATE, OM_GET, OM_NOTIFY) SLIDER_Orientation (uint16) Define orientation of the slider. Accepted values as defined in are: SORIENT_HORIZ SORIENT_VERT Defaults to SORIENT_VERT. Applicability is (OM_NEW) SLIDER_DispHook (struct Hook *) Hook which is invoked whenever the slider's level changes. Your hook function will be called as follows: void Display(struct Hook *hook, APTR slider, struct TagItem *tags); Object is the slider gadget. The message is a tag list with GA_ID, SLIDER_Level, SLIDER_Min, SLIDER_Max, GA_UserInput and (optionally) GA_Disabled. Applicability is (OM_NEW, OM_SET, OM_UPDATE) SLIDER_Ticks (int16) Number of ticks to be displayed along the slider body. For small ranges (depending on the gadget size) you'd set this to SLIDER_Max + 1. Defaults to 0 (no ticks). Applicability is (OM_NEW, OM_SET, OM_UPDATE) SLIDER_ShortTicks (BOOL) Alternate long and short ticks. Defaults to FALSE. Applicability is (OM_NEW, OM_SET, OM_UPDATE) SLIDER_TickSize (int32) Size of slider ticks. Defaults to 5. Applicability is (OM_NEW, OM_SET, OM_UPDATE) SLIDER_KnobImage (struct Image *) Image for slider knob. Must be a BOOPSI object. Applicability is (OM_NEW) SLIDER_BodyImage (struct Image *) Image for slider body. Must be a BOOPSI object. Applicability is (OM_NEW) SLIDER_Gradient (BOOL) SLIDER_PenArray (uint16 *) OBSOLETE DON'T USE! Please use gradientslider.gadget. SLIDER_Invert (BOOL) Flip Min/Max positions. Defaults to FALSE. Applicability is (OM_NEW) SLIDER_KnobDelta (int16) Level step when clicking in the container. Defaults to 1. Applicability is (OM_NEW) SLIDER_LevelFormat (CONST_STRPTR) (V50) Format string for slider level display. May contain up to one format specifier for RawDoFmt(), e.g. "%lu" or "%s", then the SLIDER_LevelHook hook function will be called to query the argument. Applicability is (OM_NEW, OM_SET, OM_UPDATE) SLIDER_LevelPlace (uint32) (V50) Where to display the slider level. Use the PLACETEXT_#? defines from . Applicability is (OM_NEW, OM_SET, OM_UPDATE) SLIDER_LevelJustify (uint32) (V50) Justification of slider level display. Either SLJ_LEFT, SLJ_CENTER or SLJ_RIGHT. Applicability is (OM_NEW, OM_SET, OM_UPDATE) SLIDER_LevelDomain (CONST_STRPTR) (V50) Domain string to determine maximum level extent. Applicability is (OM_NEW, OM_SET, OM_UPDATE) SLIDER_LevelSpace (uint16) (V50) Explicit specification of level display extent. Applicability is (OM_NEW, OM_SET, OM_UPDATE) SLIDER_LevelHook (struct Hook *) (V50) Hook which is invoked to pre-process the level value before it goes through the format string. Your hook function will be called as follows: APTR Level(struct Hook *hook, APTR slider, struct TagItem *tags); Object is the slider gadget. The message is a tag list with GA_ID, SLIDER_Level, SLIDER_Min and SLIDER_Max. The hook should return a type which matches the format specifier. For example, an int32 when SLIDER_LevelFormat contains "%ld" or a CONST_STRPTR when SLIDER_LevelFormat contains "%s". Applicability is (OM_NEW, OM_SET, OM_UPDATE) SLIDER_LevelMaxLen (uint16) (V50) Maximum possible length (in characters) of level. Defaults to 3. Applicability is (OM_NEW, OM_SET, OM_UPDATE) SLIDER_NotifyDisable (BOOL) (V50) Notify GA_Disabled attribute changes to target. Defaults to TRUE. Applicability is (OM_NEW, OM_SET, OM_UPDATE) SLIDER_InitDispHook (BOOL) (V50) Call SLIDER_DispHook whenever a new hook function is passed to the gadget. Defaults to FALSE. Applicability is (OM_NEW, OM_SET, OM_UPDATE) slider.gadget/SLIDER_GetClass slider.gadget/SLIDER_GetClass NAME SLIDER_GetClass -- Gets pointer to the slider class. SYNOPSIS Class * class = SLIDER_GetClass(); FUNCTION This function is deprecated as of V52. Use the "slider.gadget" public class ID instead. RESULT class - Pointer to the slider class.