FLTK::StatusBarGroup - Create and handle a StatusBar with minimum effort
The FLTK::StatusBarGroup is strip that can be put in the bottom edge of a FLTK::Pack usually it contains a status bar.
It features automatic positioning and resizing adapting to parent FLTK::Group/FLTK::Window.
Only height matters when constructing a FLTK::StatusBarGroup.
You can use the set( ) API's to easily print formatted text at one of the three standard position: left, center, right.
set( )
left
center
You can also setup an optional custom box to the incorporated texts with child _box(), by default FLAT_BOX is used.
_box()
FLAT_BOX
Here's some typical code you can use to create a status bar:
my $status_bar = FLTK::StatusBarGroup->new(); $status_bar->child_box(THIN_DOWN_BOX, FLTK::StatusBarGroup::SBAR_RIGHT()); # ... more code ... # sets a right-aligned formatted text : $status_bar->set('8 items', FLTK::StatusBarGroup::SBAR_RIGHT()); # sets a centered text: $status_bar->set('Hi', FLTK::StatusBarGroup::SBAR_CENTER()); # ... more code ... # undef or 0-len text removes the text box: $status_bar->set('', FLTK::StatusBarGroup::SBAR_CENTER());
child_box
$statusbargroup->child_box( $b );
Set a default box to all texts inside the status bar.
$statusbargroup->child_box( $b, $pos );
Set a default box to text a particular posiiton inside the statusbar.
new
my $group = $statusbargroup->new( $x, $y, $w, $h, $label, $begin );
Constructor. x, y, and w are ignored.
x
y
w
my $group = $statusbargroup->new( $height );
Constructor.
set
$statusbargroup->set( $t, $pos );
Set a simple string in the statusbar at a given position alignment spec.
Sanko Robinson <sanko@cpan.org> - http://sankorobinson.com/
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 The Artistic License 2.0. See the LICENSE file included with this distribution or notes on the Artistic License 2.0 for clarification.
When separated from the distribution, all original POD documentation is covered by the Creative Commons Attribution-Share Alike 3.0 License. See the clarification of the CCA-SA3.0.
To install FLTK, copy and paste the appropriate command in to your terminal.
cpanm
cpanm FLTK
CPAN shell
perl -MCPAN -e shell install FLTK
For more information on module installation, please visit the detailed CPAN module installation guide.