-
-
21 Jan 2020 03:51:59 UTC
- Distribution: Fl
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues
- Testers (86 / 0 / 0)
- Kwalitee
Bus factor: 1- License: artistic_2
- Perl: v5.8.1
- Activity
24 month- Tools
- Download (122.46KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- none
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Fl::CheckButton - Button with a Check Box
Synopsis
use Fl qw[:button]; my $button = Fl::CheckButton->new(0, 0, 100, 200, 'Hello, World!'); $button->callback(sub {print q[It's dat boi]} );
Description
The Fl::CheckButton class represents a button with a visible "checkmark" to show its status.
Buttons generate callbacks when they are clicked by the user. You control exactly when and how by changing the values for
type()
andwhen()
.The Fl::CheckButton subclass displays its "ON" state by showing a checkmark rather than drawing itself as pushed in.
Methods
Fl::CheckButton inherits from Fl::LightButton which in turns inherits from Fl::Button and Fl::Widget. On top of that, it exposes the following methods...
new(...)
my $button_a = Fl::CheckButton->new(0, 0, 250, 500, 'Important Stuff'); my $button_b = Fl::CheckButton->new(0, 0, 250, 500);
The constructor creates a new check button using the given position, size, and label.
The default box type is FL_NO_BOX, which draws the label without a box to the right of the checkmark.
The
selection_color()
sets the color of the checkmark. The default is FL_FOREGROUND_COLOR (usually black).You can use
down_box()
to chane the box type of the checkmark. Default is FL_DOWN_BOX.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>
Module Install Instructions
To install Fl, copy and paste the appropriate command in to your terminal.
cpanm Fl
perl -MCPAN -e shell install Fl
For more information on module installation, please visit the detailed CPAN module installation guide.