IUP::Spin - [GUI element] vertical box containing 2 buttons for incrementing/decrementing values
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.
Unlike the SPIN attribute of the IUP::Text element, the IUP::Spin element can NOT automatically increment the value and it is NOT inserted inside the IUP::Text area.
IUP::Spin is based on IUP::Vbox, and contains two IUP::Button.
$spin = IUP::Spin->new();
Returns: the identifier of the created element, or undef if an error occurs.
undef
NOTE: You can pass to new() other ATTRIBUTE=>'value' or CALLBACKNAME=>\&func pairs relevant to this element - see IUP::Manual::02_Elements.
new()
ATTRIBUTE=>'value'
CALLBACKNAME=>\&func
For more info about concept of callbacks (setting callback handlers etc.) see IUP::Manual::04_Callbacks. Callbacks specific to this element:
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.
Callback handler prototype:
sub spin_cb_handler { my ($self, $inc) = @_; #... }
Unfortunately there are no sample scripts using this element.
IUP::Text, IUP::Vbox, IUP::Hbox, IUP::Button
The original doc: iupspin.html
To install IUP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IUP
CPAN shell
perl -MCPAN -e shell install IUP
For more information on module installation, please visit the detailed CPAN module installation guide.