Creates an embedded OpenGL Valuator control. Selects a value in a limited interval. It inherits from IupGLSubCanvas. It exists only inside an IupGLCanvasBox.
Ihandle* IupGLVal(const char *orientation); [in C]
iup.glval{orientation: string} -> (elem: ihandle) [in Lua]
glval(orientation) [in LED]
orientation: optional orientation of valuator. Can be NULL. See ORIENTATION attribute.
Returns: the identifier of the created element, or NULL if an error occurs.
The IupGLVal element handle 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".
The IupGLVal element handle all callbacks defined for the IupGLSubCanvas control.
VALUECHANGED_CB: Called after the value was interactively changed by the user.
int function(Ihandle *ih); [in C]
elem:valuechanged_cb() -> (ret: number) [in Lua]
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.
int function(Ihandle *ih, int start); [in C]
elem:valuechanging_cb(start: number) -> (ret: number) [in Lua]
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).
The natural size is the height of one character in one direction and the width of 15 characters in the other.