IupGetColor

IUP - Portable User Interface

IupSpin and IupSpinBox

This functions will create a control set with a vertical box containing two buttons, one with an up arrow and the other with a down arrow, to be used to increment and decrement values.

Creation

Ihandle* IupSpin(void); [in C]
iupspin{} -> (elem: iuplua_tag) [in IupLua3]
iup.spin{} -> (elem: iuplua_tag) [in IupLua5]

This function returns the identifier of the created box. It is just a IupVbox with two IupButton.

Ihandle* IupSpinbox(Ihandle* ctrl); [in C]
iupspinbox{ctrl: iuplua_tag} -> (elem: iuplua_tag) [in IupLua3]
iup.spinbox{ctrl: iuplua_tag} -> (elem: iuplua_tag) [in IupLua5]

This function returns the identifier of the created box. This will create a IupHbox with the additional control and a IupSpin set.

Callbacks

SPIN_CB: Called each time the user clicks in the buttons. It will increment 1 and decrement -1 by default. Holding Shit will set a factor of 2, holding Ctrl a factor of 10, and both a factor of 100.

int function(Ihandle *self, int inc); [in C]
elem:spincb(inc: number) -> (ret: number) [in IupLua3]
elem:spin_cb(inc: number) -> (ret: number) [in IupLua5]

See Also

IupGetParam