The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

IUP::Spin - [GUI element] vertical box containing 2 buttons for incrementing/decrementing values

DESCRIPTION

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.

USAGE

CREATION - new() method

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.

NOTE: You can pass to new() other ATTRIBUTE=>'value' or CALLBACKNAME=>\&func pairs relevant to this element - see IUP::Manual::02_Elements.

CALLBACKS

For more info about concept of callbacks (setting callback handlers etc.) see IUP::Manual::04_Callbacks. Callbacks specific to this element:

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.

Callback handler prototype:

 sub spin_cb_handler {
   my ($self, $inc) = @_;
   #...
 }

EXAMPLES

Unfortunately there are no sample scripts using this element.

SEE ALSO

IUP::Text, IUP::Vbox, IUP::Hbox, IUP::Button

The original doc: iupspin.html