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

NAME

Fl::Counter - Controls a Single Floating Point Value with Button or Keyboard Arrows

Description

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:

FL_NORMAL_COUNTER: Displays a counter with 4 arrow buttons.
FL_SIMPLE_COUNTER: Displays a counter with only 2 arrow buttons.

Methods

Fl::Counter inherits from Fl::Valuator and Fl::Widget. On top of that, it exposes the following methods...

new(...)

    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.

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.

LICENSE

Copyright (C) Sanko Robinson.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

Sanko Robinson <sanko@cpan.org>