IupColorBrowser - controle

IUP - Portable User Interface

IupColorBrowser

Creates an element for selecting colors from the HLS (Hue Saturation Brightness) model, which allows the user to interactively choose a color. For a dialog that simply returns the selected color, you can use function IupGetColor.

Parameters/Return

Ihandle* IupColorBrowser(void); [in C]
iupcb{} (elem: iuplua_tag) [in IupLua3]
iup.colorbrowser{} (elem: iuplua_tag) [in IupLua5]
colorbrowser() [in LED]
The function returns the identifier of the created colorbrowser, or NULL if an error occurs.

Attributes

RGB: Contains the color selected in the control, in the “rrr ggg bbb” format; r, g and b are integers ranging from 0 to 255. This value can both be consulted and modified.

Callbacks

DRAG_CB: Called several times while the color is being changed by dragging the mouse over the control.

int drag(Ihandle *self, unsigned char r, unsigned char g, unsigned char b); [in C]
elem:drag(r: number, g: number, b: number) -> (ret: number) [in IupLua3]
elem:drag_cb(r: number, g: number, b: number) -> (ret: number) [in IupLua5]

CHANGE_CB: Called when the user releases the left mouse button over the control, defining the selected color.

int change(Ihandle *self, unsigned char r, unsigned char g, unsigned char b); [in C]
elem:change(r: number, g: number, b: number) -> (ret: number) [in IupLua3]
elem:change_cb(r: number, g: number, b: number) -> (ret: number) [in IupLua5]

Examples