EZwgl (4.35 Gradient Bar)

## 4.35 Gradient Bar

A gradient bar displays a smooth shaded color bar. The color bar is controled by up to 12 colors. A gradient bar behaves more or less like a slider, except it returns both a float point value and color value. The scroll button on a gradient bar has 4 different styles.

### Widget Info

Symbolic widget type | EZ_WIDGET_GRADIENT_BAR
Default class name | "GradientBar"
Default instance name | "gradientBar"

### Widget Interface Routines

`void EZ_SetGradientBarValue(EZ_Widget *widget, float value);`

set gradient bar value.

`float EZ_GetGradientBarValue(EZ_Widget *widget);`

retrieve the gradient bar value.

`float EZ_SetGradientBarRange(EZ_Widget *widget, float frm, float to);`

set gradient bar range.

`void EZ_SetGradientBarColors(EZ_Widget *widget, char **colors, int ncolors);`

set gradient bar colors. `ncolors` is should be smaller than 12.

`void EZ_GetGradientBarColor(EZ_Widget *widget, int *r, int *g, int *b);`

return the selected color.

### Screenshot

### Resources

Config_Option | ResourceName | DefaultValue
EZ_CLASS | class | `"GradientBar"`
EZ_NAME | name | `"gradientBar"`

EZ_X | x |
EZ_Y | y |
EZ_WIDTH | width |
EZ_HEIGHT | height |

EZ_LOCATION | location |
EZ_SIZE | size |
EZ_GEOMETRY | geometry |

EZ_WIDTH_HINT | widthHint |
EZ_HEIGHT_HINT | heightHint |
EZ_SIZE_HINT | sizeHint |

EZ_BORDER_WIDTH | borderWidth | `0`
EZ_BORDER_TYPE | borderType | `none`
EZ_FOCUS_PAD | focusPad | `2`

EZ_EXPAND | expand | `false`
EZ_PROPAGATE | propagate | `true`
EZ_TRANSIENT | transient | `false`

EZ_CURSOR | cursor | `"XC_left_ptr"`
EZ_BUBBLE_STRING | bubbleString | `null`

EZ_CALLBACK | N/A | `null null`
EZ_MOTION_CALLBACK | N/A | `null null`
EZ_DESTROY_CALLBACK | N/A | `null null`
EZ_EVENT_HANDLER | N/A | `null null`

EZ_BACKGROUND | background | `"gray74`
EZ_BG_IMAGE_FILE | bgImageFile | `null`
EZ_BG_PIXMAP | N/A | `none`
EZ_SHAPED_WINDOW | shapedWindow | `false`
EZ_SHAPE_FILE | shapeFile | `NULL`
EZ_SHAPE_PIXMAP | N/A | `NULL`

EZ_BG_IMAGE_FILE_B | bgImageFileB | `null`
EZ_BG_PIXMAP_B | N/A | `none`
EZ_CLIENT_PTR_DATA | N/A | `null`
EZ_CLIENT_INT_DATA | clientIntData | `0`

EZ_DND_DRAG_CURSOR | dndDragCursor | `none`
EZ_DND_BUBBLE_STRING | dndBubbleString | `null`

EZ_BACKING_STORE | backingStore | `true`

EZ_SLIDER_STYLE | sliderStyle | `0`
EZ_SLIDER_INIT_VALUE | sliderInitValue | `0.5`

EZ_BAR_EDITABLE | barEditable | `True`
EZ_BAR_ORIENTATION | barOrientation | `EZ_HORIZONTAL`
EZ_BAR_WIDTH | barWidth | `4`
EZ_BAR_RANGE | barRange | `0.0 1.0`
EZ_BAR_COLOR_N | barColorN | `0,green`
EZ_BAR_COLOR_N | barColorN | `1,yellow`

HTML Documentation Maintainance:`Arturo Espinosa <arturo@nuclecu.unam.mx>`