IupGLValuator

Definition: include pGUI.e

Ihandle ih = IupGLValuator(nullable_string orientation=NULL, [[nullable_string action=NULL,] cbfunc func=NULL,] string attributes="", sequence data={})
Description: Creates an embedded OpenGL Valuator control. Selects a value in a limited interval.
It inherits from IupGLSubCanvas. It exists only inside an IupGLCanvasBox.

orientation: optional orientation of valuator. Can be NULL. See ORIENTATION attribute.
action: Name of the action specified by func, defaults to "ACTION" (you probably need "VALUECHANGED_CB"), ignored if func is NULL.
func: a callback address, usually specified as Icallback("name").
For more information on the attributes and data parameters see IupSetAttributes.
This is a paranormalised function.

Returns: the identifier of the created element.
Notes: The natural size is the height of one character in one direction and the width of 15 characters in the other.

Invokes the C function IupGLVal. In pGUI, IupGLVal() and IupGLValuator() are identical; use whichever you prefer. I (previously) felt there was something a little ambiguous about "IupVal" (eg value/valid), whereas "IupValuator" should cause fewer false assumptions, and obviously the same applies for IupGLVal and IupGLValuator.
Attributes: The IupGLValuator element handles all attributes defined for a IupGLSubCanvas control.
BACKIMAGE (non inheritable) image name to be used as background.
It will be zoomed to fill the background (it does not includes the border).
Use IupSetHandle or IupSetAttributeHandle to associate an image to a name. See also IupImage.

IMPORTANT: for the slider match the handler movement area the backimage must has a transparent space that will have room for the handler, in the extremes this space should be at least half the handler size. (since 3.11.2)
BACKIMAGEHIGHLIGHT (non inheritable) background image name of the element in highlight state.
If it is not defined then the BACKIMAGE is used. (since 3.11.2)
BACKIMAGEINACTIVE (non inheritable) background image name of the element when inactive.
If it is not defined then the BACKIMAGE is used and its colors will be replaced by a modified version creating the disabled effect. (since 3.11.2)
BACKIMAGEPRESS (non inheritable) background image name of the element in pressed state.
If it is not defined then the BACKIMAGE is used. (since 3.11.2)
FGCOLOR Controls the bar color. Can have an alpha component. Default: "200 225 245".
FITTOBACKIMAGE (non inheritable) enable the natural size to be computed from the BACKIMAGE.
If BACKIMAGE is not defined will be ignored.
When set to Yes it will set BORDERWIDTH to 0. Can be Yes or No. Default: No. (since 3.11.2)
HANDLERSIZE (non inheritable) handler size in the same direction of the ORIENTATION. Default: 0.
If set to 0 it will be calculated with half of the dimension opposite to the ORIENTATION.
If IMAGE is used, it will be ignored (since 3.11.2).
When IMAGE is not used the handler size in the opposite direction is the size of the element.
HLCOLOR color used to indicate a highlight state. Can have an alpha component. Default: "190 210 230".
IMAGE (non inheritable) Image name for the handler.
Use IupSetHandle or IupSetAttributeHandle to associate an image to a name. See also IupImage.
If defined the handler will be replaced by the image.
IMAGEHIGHLIGHT (non inheritable) Image name of the element in highlight state.
If it is not defined then the IMAGE is used.
IMAGEINACTIVE (non inheritable) Image name of the element when inactive.
If it is not defined then the IMAGE is used and its colors will be replaced by a modified version creating the disabled effect.
IMAGEPRESS (non inheritable) Image name of the element in pressed state. If it is not defined then the IMAGE is used.
MAX Contains the maximum valuator value. Default is "1". When changed the display will not be updated until VALUE is set.
MIN Contains the minimum valuator value. Default is "0". When changed the display will not be updated until VALUE is set.
ORIENTATION (non inheritable) Informs whether the valuator is "VERTICAL" or "HORIZONTAL".
Vertical valuators are bottom to up, and horizontal valuators are left to right variations of min to max. Default: "HORIZONTAL".
SLIDERSIZE (non inheritable) slider size in the same direction of the ORIENTATION. Default: 5. Ignored when BACKIMAGE is used.
VALUE (non inheritable) Contains a number between MIN and MAX, indicating the valuator position. Default: "0.0".
Callbacks The IupGLValuator element handle all callbacks defined for the IupGLSubCanvas control.
VALUECHANGED_CB Called after the value was interactively changed by the user.

function valuechanged_cb(Ihandle ih)
ih: identifier of the element that activated the event.
VALUECHANGING_CB Called when the value starts or ends to be interactively changed by the user.

function valuechanging_cb(Ihandle ih, integer start)
ih: identifier of the element that activated the event.
start: flag that indicates if the value started to be changed (1) or the change just ended (0).