Astro-Catalog
view release on metacpan or search on metacpan
lib/Tk/AstroCatalog.pm view on Meta::CPAN
-relief => 'raised',
-width => 7,
-command => sub {
$self->file($catEnt->get);
# reset current array to original list
$self->Catalog->reset_list;
$self->fillWithSourceList ('full');
})->pack(-side => 'right', -padx => '20');
# create the Sort menu
my $sortmenu = $buttonF->Menubutton(-text => 'Sort by', -relief => 'raised', -width => 7);
$sortmenu->command(-label => 'Unsorted', -command => sub {
$self->Catalog->sort_catalog('unsorted');
$self->fillWithSourceList('full');
});
$sortmenu->command(-label => 'Id', -command => sub {
$self->Catalog->sort_catalog('id');
$self->fillWithSourceList('full');
});
$sortmenu->command(-label => 'Ra', -command => sub {
$self->Catalog->sort_catalog('ra');
lib/Tk/AstroCatalog.pm view on Meta::CPAN
});
$sortmenu->command(-label => 'Distance in Az', -command => sub {
$self->Catalog->sort_catalog('distance_az');
$self->fillWithSourceList('full');
});
}
$sortmenu->pack(-side => 'right', -padx => '20');
# create the catalog menu button
my $catB = $buttonF2->Menubutton(-text => 'Catalogs', -relief => 'raised', -width => 8);
$catB->command(-label => 'Default Catalog', -command => sub {
$self->file('default');
$catEnt->delete('0', 'end');
$catEnt->insert(0, $self->file);
# No filename for default
$self->Catalog($self->CatClass->new(
Format => $FORMAT,
ReadOpt => $FORMAT_OPT,
));
$self->fillWithSourceList('full');
lib/Tk/AstroCatalog.pm view on Meta::CPAN
-text => "Dec:"
)->grid(-column => 0, -row => 2);
my $decEnt = $topFrame->Entry(
-relief => 'sunken', -width => 15
)->grid(-column => 1, -row => 2, -padx => 10, -pady => 3);
$topFrame->Label(
-text => 'Distance:'
)->grid(-column => 0, -row => 3);
my $distEnt = '1\'';
my $distB = $topFrame->Menubutton(
-text => $distEnt, -relief => 'raised', -width => 15);
foreach my $dist (sort {$distances{$b} <=> $distances{$a}} keys %distances) {
$distB->command(-label => $dist, -command => sub {
$distB->configure(-text => $dist);
$distEnt = $dist;
});
}
$distB->grid(-column => 1, -row => 3, -padx => 10, -pady => 5, -sticky => 'w');
$topFrame->Label (
-text => "Epoc:"
)->grid(-column => 0, -row => 4, -padx => 5, -pady => 5);
my $epocEnt = 'RJ';
my $epocB = $topFrame->Menubutton(
-text => $epocEnt, -relief => 'raised', -width => 15);
foreach $name (@Epocs) {
$epocB->command(-label => $name, -command => sub {
$epocB->configure(-text => $name);
$epocEnt = $name;
});
}
$epocB->grid(-column => 1, -row => 4, -padx => 10, -pady => 5, -sticky => 'w');
my $buttonF = $Top->Frame->pack(-padx => 10, -pady => 10);
( run in 0.689 second using v1.01-cache-2.11-cpan-49f99fa48dc )