NAME

Fl::ToggleButton - Button that Toggles On and Off

Synopsis

use Fl;
my $button = Fl::ToggleButton->new(0, 0, 100, 200, 'Hello, World!');
$button->callback(sub {print q[It's dat boi]} );

Description

The Fl::ToggleButton class represents a button that needs to be clicked once to toggle on and once more to toggle off.

The toggle button shows the "ON" state by drawing a pushed-in button.

Methods

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

new(...)

my $button_a = Fl::ToggleButton->new(0, 0, 250, 500, 'Important Stuff');
my $button_b = Fl::ToggleButton->new(0, 0, 250, 500);

The constructor creates a new button using the given position, size, and label.

The button's type() is set to FL_TOGGLE_BUTTON by default.

The destructor removes the button.

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>