Fl::Counter - Controls a Single Floating Point Value with Button or Keyboard Arrows
The Fl::Counter controls a single floating point value with button (or keyboard) arrows. Double arrows buttons achieve larger steps than simple arrows.
The type of an Fl::Counter object can be set using type(...) to:
type(...)
Fl::Counter inherits from Fl::Valuator and Fl::Widget. On top of that, it exposes the following methods...
my $count_a = Fl::Counter->new(0, 0, 250, 500, 'Important Stuff'); my $count_b = Fl::Counter->new(0, 0, 250, 500);
The constructor creates a new widget using the given position, size, and label.
The default type is FL_NORMAL_COUNTER.
The destructor removes the widget.
lstep(...)
$count_a->lstep(1.2);
Sets the increment for the large step buttons.
The default value is 1.0.
1.0
step(...)
$count_a->step(.25, 1);
Sets the increments for both the normal and large step buttons.
$count_a->step(.25);
Sets the increment for the normal step buttons.
Copyright (C) Sanko Robinson.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Sanko Robinson <sanko@cpan.org>
To install Fl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Fl
CPAN shell
perl -MCPAN -e shell install Fl
For more information on module installation, please visit the detailed CPAN module installation guide.