Astro-Catalog
view release on metacpan or search on metacpan
lib/Tk/AstroCatalog.pm view on Meta::CPAN
$cat->fillWithSourceList();
$cat->fillWithSourceList($text, $selected, $task, $index);
$cat->fillWithSourceList($text, $selected, $task);
$cat->fillWithSourceList($text, $selected);
Also triggers the UpDate method.
=cut
sub fillWithSourceList {
my (@bold, @normal);
my $self = shift;
my $T = $self->Text;
my $selected = $self->Selected;
my $task = shift;
my $index = shift;
my @entered = ();
my ($line, $itag);
# Retrieve the objects
# forcing the reference time
lib/Tk/AstroCatalog.pm view on Meta::CPAN
$T->tagDelete('d' . $source->{index});
}
}
# And clear the current selection
@$selected = ();
}
# Set up display styles
if ($T->depth > 1) {
@bold = (-background => "#eeeeee", -relief => 'raised', -borderwidth => 1);
@normal = (-background => undef, -relief => 'flat');
}
else {
@bold = (-foreground => 'white', -background => 'black');
@normal = (-foreground => undef, -background => undef);
}
$T->tag(qw/configure normal -foreground blue/);
$T->tag(qw/configure inactive -foreground black/);
$T->tag(qw/configure selected -foreground red/);
foreach (@COLOR_LIST) {
$T->tag('configure', $_, -foreground => $_);
}
# Get a reference coordinate from the object
lib/Tk/AstroCatalog.pm view on Meta::CPAN
else {
$self->inswt("$line\n", "d$index", 'inactive');
}
}
}
$len = @sources;
for ($itag = 0; $itag < $len; $itag ++) {
my $dtag = "d$itag";
$T->tag('bind', $dtag, '<Any-Enter>' => sub {
shift->tag('configure', $dtag, @bold);
});
$T->tag('bind', $dtag, '<Any-Leave>' => sub {
shift->tag('configure', $dtag, @normal);
});
$T->tag('bind', $dtag, '<ButtonRelease-1>' => sub {
unless ($BUSY) {
unless ($self->isWithin($sources[substr($dtag, 1, 99)], @$selected) ) {
shift->tag('configure', $dtag, -foreground => 'red');
push (@$selected, $sources[substr($dtag, 1, 99)]);
}
( run in 0.460 second using v1.01-cache-2.11-cpan-99c4e6809bf )