@database "slider_gc"
@master "AMIDEV:NDK/Autodocs/slider_gc.doc"

@Node Main "slider_gc.doc"
@toc "Autodocs/AG/INDEX/Main"
    @{" --datasheet--() " Link "--datasheet--()"}
    @{" SLIDER_GetClass() " Link "SLIDER_GetClass()"}
@EndNode

@Node "--datasheet--()" "slider.gadget/--datasheet--"

@{b}    NAME@{ub}
	slider.gadget -- Create slider BOOPSI objects

@{b}    SUPERCLASS@{ub}
	gadgetclass

@{b}    REQUIRES@{ub}
	bevel.image

@{b}    DESCRIPTION@{ub}
	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 a WORD.

@{b}    METHODS@{ub}
	@{"OM_NEW" Link "tabs_gc/OM_NEW"} -- Create the slider gadget. Passed to superclass.

	@{"OM_SET" Link "tabs_gc/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" Link "tabs_gc/OM_GET"} -- Obtain the value of an attribute.

	@{"GM_RENDER" Link "tabs_gc/GM_RENDER"} -- Overrides superclass, renders the gadget imagery.

	@{"GM_GOACTIVE" Link "tabs_gc/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" Link "INCLUDE:graphics/clip.h/Main" 95} for virtual group support.

	@{"GM_LAYOUT" Link "tabs_gc/GM_LAYOUT"} -- Calculate relative gadget coordinates.

	@{"GM_HITTEST" Link "tabs_gc/GM_HITTEST"} -- Determines if gadget was hit.

	All other methods are passed to the superclass.

@{b}    ATTRIBUTES@{ub}
	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" Link "tabs_gc/OM_SET"}, OM_UPDATE, OM_NOTIFY)

	GA_TextAttr (struct @{"TextAttr" Link "INCLUDE:graphics/text.h/Main" 63} *)
	    The font that will be used for the level display.

	    Defaults to @{"NULL" Link "rexxsupport/NULL"} (RastPort default font).

	    Applicability is (OM_NEW)

	GA_BackFill (struct @{"Hook" Link "INCLUDE:utility/hooks.h/Main" 26} *)
	    A layer backfill hook to provide a more complex background
	    pattern. See @{"InstallLayerHook()" Link "layers/InstallLayerHook()"} for more details about the
	    backfill hook.

	    Defaults to @{"NULL" Link "rexxsupport/NULL"}.

	    Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE)

	SLIDER_Level (WORD)
	    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 can swap
	    the minimum and maximum positions by using the SLIDER_Invert
	    tag.

	    Defaults to 0.

	    Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE, @{"OM_GET" Link "tabs_gc/OM_GET"}, OM_NOTIFY)

	SLIDER_Min (WORD)
	    The minimum slider level. Values smaller than -32768 are
	    not supported.

	    Defaults to 0.

	    Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE, @{"OM_GET" Link "tabs_gc/OM_GET"}, OM_NOTIFY)

	SLIDER_Max (WORD)
	    The maximum slider level. A level beyond 65535 is not
	    supported.

	    Defaults to 0.

	    Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE, @{"OM_GET" Link "tabs_gc/OM_GET"}, OM_NOTIFY)

	SLIDER_Orientation (UWORD)
	    Define orientation of the slider.

	    Accepted values as defined in @{"<gadgets/slider.h>" Link "INCLUDE:gadgets/slider.h/Main" 0} are:
	      SORIENT_HORIZ
	      SORIENT_VERT

	    Defaults to SORIENT_VERT.

	    Applicability is (OM_NEW)

	SLIDER_DispHook (struct @{"Hook" Link "INCLUDE:utility/hooks.h/Main" 26} *)
	    @{"Hook" Link "INCLUDE:utility/hooks.h/Main" 26} which is invoked whenever the slider's level changes.

	    Your hook function will be called as follows:

	    void Func(struct @{"Hook" Link "INCLUDE:utility/hooks.h/Main" 26} *hook, @{"APTR" Link "INCLUDE:exec/types.h/Main" 75} slider, struct @{"TagItem" Link "INCLUDE:utility/tagitem.h/Main" 30} *tags);
	              A0                 A2           A1

	    @{"Object" Link "INCLUDE:intuition/classusr.h/Main" 18} 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" Link "tabs_gc/OM_SET"}, OM_UPDATE)

	SLIDER_Ticks (WORD)
	    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" Link "tabs_gc/OM_SET"}, OM_UPDATE)

	SLIDER_ShortTicks (BOOL)
	    Alternate long and short ticks.

	    Defaults to FALSE.

	    Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE)

	SLIDER_TickSize (LONG)
	    Size of slider ticks.

	    Defaults to 5.

	    Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE)

	SLIDER_KnobImage (struct @{"Image" Link "INCLUDE:intuition/intuition.h/Main" 710} *)
	    @{"Image" Link "INCLUDE:intuition/intuition.h/Main" 710} for slider knob. Must be a BOOPSI object.

	    Applicability is (OM_NEW)

	SLIDER_BodyImage (struct @{"Image" Link "INCLUDE:intuition/intuition.h/Main" 710} *)
	    @{"Image" Link "INCLUDE:intuition/intuition.h/Main" 710} for slider body. Must be a BOOPSI object.

	    Applicability is (OM_NEW)

	SLIDER_Gradient (BOOL)
	SLIDER_PenArray (UWORD *)
	    OBSOLETE DON'T USE! Please use gradientslider.gadget.

	SLIDER_Invert (BOOL)
	    Flip Min/Max positions.

	    Defaults to FALSE.

	    Applicability is (OM_NEW)

	SLIDER_KnobDelta (WORD)
	    Level step when clicking in the container.

	    Defaults to 1.

	    Applicability is (OM_NEW)

	SLIDER_LevelFormat (CONST_STRPTR) (V47)
	    @{"Format" Link "dos/Format()"} string for slider level display. May contain up to
	    one format specifier for @{"RawDoFmt()" Link "exec/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" Link "tabs_gc/OM_SET"}, OM_UPDATE)

	SLIDER_LevelPlace (ULONG) (V47)
	    Where to display the slider level. Use the PLACETEXT_#?
	    defines from @{"<libraries/gadtools.h>" Link "INCLUDE:libraries/gadtools.h/Main" 0}.

	    Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE)

	SLIDER_LevelJustify (ULONG) (V47)
	    Justification of slider level display.
	    Either SLJ_LEFT, SLJ_CENTER or SLJ_RIGHT.

	    Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE)

	SLIDER_LevelDomain (CONST_STRPTR) (V47)
	    Domain string to determine maximum level extent.

	    Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE)

	SLIDER_LevelSpace (UWORD) (V47)
	    Explicit specification of level display extent.

	    Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE)

	SLIDER_LevelHook (struct @{"Hook" Link "INCLUDE:utility/hooks.h/Main" 26} *) (V47)
	    @{"Hook" Link "INCLUDE:utility/hooks.h/Main" 26} 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" Link "INCLUDE:exec/types.h/Main" 75} Func(struct @{"Hook" Link "INCLUDE:utility/hooks.h/Main" 26} *hook, @{"APTR" Link "INCLUDE:exec/types.h/Main" 75} slider, struct @{"TagItem" Link "INCLUDE:utility/tagitem.h/Main" 30} *tags);
	              A0                 A2           A1

	    The 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, a @{"LONG" Link "INCLUDE:exec/types.h/Main" 112} when SLIDER_LevelFormat contains "%ld"
	    or a @{"CONST_STRPTR" Link "INCLUDE:exec/types.h/Main" 146} when SLIDER_LevelFormat contains "%s".

	    Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE)

	SLIDER_LevelMaxLen (UWORD) (V47)
	    Maximum possible length (in characters) of level.

	    Defaults to 3.

	    Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE)

	SLIDER_NotifyDisable (BOOL) (V47)
	    Notify GA_Disabled attribute changes to target.

	    Defaults to TRUE.

	    Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE)

	SLIDER_InitDispHook (BOOL) (V47)
	    Invoke SLIDER_DispHook immediately whenever a new hook function
	    is passed to the gadget. Defaults to FALSE.

	    Applicability is (OM_NEW, @{"OM_SET" Link "tabs_gc/OM_SET"}, OM_UPDATE)

@EndNode

@Node "SLIDER_GetClass()" "slider.gadget/SLIDER_GetClass"

@{b}    NAME@{ub}
	SLIDER_GetClass -- Gets the pointer to the slider class.

@{b}    SYNOPSIS@{ub}
	slider_class = SLIDER_GetClass();
	D0

	Class * SLIDER_GetClass(VOID);

@{b}    FUNCTION@{ub}
	Obtains the pointer to the slider gadget class for use with
	@{"NewObject()" Link "intuition/NewObject()"}.  This function always returns a valid pointer so
	you do not need to check it.  The reason is that if the library
	opens fine, then the pointer returned is already setup.
	(Of course this implies that if opening the library fails, you
	shouldn't be calling this.)

@{b}    INPUTS@{ub}
	Nothing.

@{b}    RESULT@{ub}
	slider_class - Pointer to the slider gadget class.

@{b}    SEE ALSO@{ub}

@EndNode

