
Home / Autodocs
slider.gadget
Create slider BOOPSI objects
FUNCTIONS
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 a WORD.
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)
- 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, OM_UPDATE, 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, OM_UPDATE, 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, OM_UPDATE, OM_GET, OM_NOTIFY)
- SLIDER_Orientation (UWORD)
-
Define orientation of the slider.
Accepted values as defined in gadgets/slider.h 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 Func(struct Hook *hook, APTR slider, struct TagItem *tags);
A0 A2 A1
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 (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, OM_UPDATE)
- SLIDER_ShortTicks (BOOL)
-
Alternate long and short ticks.
Defaults to FALSE.
Applicability is (OM_NEW, OM_SET, OM_UPDATE)
- SLIDER_TickSize (LONG)
-
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 (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 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 (ULONG)
-
(V47) Where to display the slider level. Use the PLACETEXT_#? defines from libraries/gadtools.h.
Applicability is (OM_NEW, 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, OM_UPDATE)
- SLIDER_LevelDomain (CONST_STRPTR)
-
(V47) Domain string to determine maximum level extent.
Applicability is (OM_NEW, OM_SET, OM_UPDATE)
- SLIDER_LevelSpace (UWORD)
-
(V47) Explicit specification of level display extent.
Applicability is (OM_NEW, OM_SET, OM_UPDATE)
- SLIDER_LevelHook (struct Hook *)
-
(V47) 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 Func(
struct Hook *hook, APTR slider,
struct TagItem *tags);
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 when SLIDER_LevelFormat contains "%ld" or a CONST_STRPTR when SLIDER_LevelFormat contains "%s".
Applicability is (OM_NEW, OM_SET, OM_UPDATE)
- SLIDER_LevelMaxLen (UWORD)
-
(V47) Maximum possible length (in characters) of level.
Defaults to 3.
Applicability is (OM_NEW, OM_SET, OM_UPDATE)
- SLIDER_NotifyDisable (BOOL)
-
(V47) Notify GA_Disabled attribute changes to target.
Defaults to TRUE.
Applicability is (OM_NEW, 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, OM_UPDATE)