NAME
AntTweakBar::Type - User-defined variable types (enumerations) for AntTweakBar
SYNOPSIS
my $framework_type = AntTweakBar::Type->new(
"framework_type",
[qw/Mojolicious Kelp Dancer Catalyst/],
);
my $fw_index = 1; # default will be Kelp
$bar->add_variable(
mode => 'rw',
name => "used_framework",
type => $framework_type,
value => \$fw_index,
);
my $gender_type = AntTweakBar::Type->new(
"gender_type",
{ male => 1, female => 2},
);
DESCRIPTION
AntTweakBar::Type
allows to insert into bar variables of custom type. Currently only enumerations are supported.
An perl variable must be refernce to integer; so, the type definition must be eithe array or hashref with integer values.