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

=head1 NAME

FLTK::ValueInput - Text field for inputing a floating-point number

=head1 Description

Controls a single floating point value through a combination of a
L<FLTK::FloatInput|FLTK::FloatInput> and two up/down buttons. Other toolkits
call this a "Spin Box".

Clicking the buttons increments/decrements by the
L<C<linesize( )>|FLTK::Valuator/"linesize">. Holding down any shift key and
clicking increments/decrements by the
L<C<pagesize( )>|FLTK::Valuator/"pagesize">.

The user can type a new value into the input area. If
L<C<step( )>|FLTK::Valuator/"step"> is greater or equal to C<1.0> an
L<FLTK::IntInput|FLTK::IntInput> is used, this prevents the user from typing
anything other than digits. If L<C<step( )>|FLTK::Valuator/"step"> is less
than one then the user can type floating point values with decimal points and
exponents.

The user can type I<any> value they want into the text field, I<including ones
outside the L<C<range( )>|FLTK::Valuator/"range"> or non-multiples of the
L<C<step( )>|FLTK::Valuator/"step">>. If you want to prevent this, make the
callback function reset the value to a legal one.

By default the callback is done when the user moves the slider, when they use
up/down keys to change the number in the text, or if they edit the text, when
they hit the Enter key or they click on another widget or put the focus on
another widget. Changing L<C<when()>|FLTK::Widget/"when"> to
C<FLTK::WHEN_CHANGED> will make it do the callback on every edit of the text.

You can get at the input field by using the public "input" instance variable.
For instance you can clobber the text to a word with
C<$value_input-E<gt>input-C<gt>static_text('word')>.

=head1 Functions

=head2 C<new>
X<new>

=over

=item C<my $input = $valueinput-E<gt>new( $x, $y, $w, $h, $label );>X<my_input_valueinput_E_gt_new_x_y_w_h_label_>



=pod 

=for hackers xs/ValueInput.xs line 67

=back

=head1 Author

Sanko Robinson <sanko@cpan.org> - http://sankorobinson.com/

=head1 License and Legal

Copyright (C) 2008-2010 by Sanko Robinson <sanko@cpan.org>

This program is free software; you can redistribute it and/or modify it under
the terms of
L<The Artistic License 2.0|http://www.perlfoundation.org/artistic_license_2_0>.
See the F<LICENSE> file included with this distribution or
L<notes on the Artistic License 2.0|http://www.perlfoundation.org/artistic_2_0_notes>
for clarification.

When separated from the distribution, all original POD documentation is
covered by the
L<Creative Commons Attribution-Share Alike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/us/legalcode>.
See the
L<clarification of the CCA-SA3.0|http://creativecommons.org/licenses/by-sa/3.0/us/>.


=for git $Id: ValueInput.xs 7483df2 2011-04-09 05:42:22Z sanko@cpan.org $

=cut