IupSpin

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]
iup.spin{} -> (elem: ihandle) [in Lua]

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

Ihandle* IupSpinbox(Ihandle* ctrl); [in C]
iup.spinbox{ctrl: ihandle} -> (elem: ihandle) [in Lua]

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 the Shift key 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:spin_cb(inc: number) -> (ret: number) [in Lua]

See Also

IupGetParam