App-SourcePlot
view release on metacpan or search on metacpan
lib/App/SourcePlot.pm view on Meta::CPAN
)->grid(-column => 0, -row => 1, -padx => 5, -pady => 5);
my $strp = DateTime::Format::Strptime->new(
pattern => '%Y/%m/%d',
time_zone => 'UTC',
on_error => 'croak');
my $dt = $strp->parse_datetime($DATE);
my $monthEnt = $months[$dt->month() - 1];
my $mb = $topFrame->Menubutton(
-text => $monthEnt,
-relief => 'raised',
-width => 10);
foreach $name (@months) {
$mb->command(
-label => $name,
-command => sub {
$mb->configure(-text => $name);
$monthEnt = $name;
lib/App/SourcePlot.pm view on Meta::CPAN
$Top->resizable(0, 0);
my $topFrame = $Top->Frame(
-relief => 'groove',
-borderwidth => 2,
)->pack(-padx => 10, -pady => 10);
# place the telescope menuButton
$topFrame->Label(-text => 'Telescope:')->grid(-column => 0, -row => 0);
my $f = $topFrame->Frame()->grid(-column => 1, -row => 0, -padx => 10, -pady => 5, -sticky => 'w');
my $f2 = $topFrame->Frame()->grid(-column => 1, -row => 1, -padx => 10, -pady => 5, -sticky => 'w');
$tb = $f->Menubutton(
-text => $telEnt,
-relief => 'raised',
-width => 15,
)->pack(-side => 'left');
$tb->cascade(-label => 'A - C', -underline => 0);
$tb->cascade(-label => 'D - F', -underline => 0);
$tb->cascade(-label => 'G - I', -underline => 0);
$tb->cascade(-label => 'J - L', -underline => 0);
$tb->cascade(-label => 'M - O', -underline => 0);
$tb->cascade(-label => 'P - R', -underline => 0);
$tb->cascade(-label => 'S - U', -underline => 0);
$tb->cascade(-label => 'V - X', -underline => 0);
$tb->cascade(-label => 'Y - Z', -underline => 0);
my $cm = $tb->cget('-menu');
my $ac = $cm->Menu;
my $df = $cm->Menu;
my $gi = $cm->Menu;
my $jl = $cm->Menu;
my $mo = $cm->Menu;
my $pr = $cm->Menu;
my $su = $cm->Menu;
my $vx = $cm->Menu;
my $yz = $cm->Menu;
$tb->entryconfigure('A - C', -menu => $ac);
$tb->entryconfigure('D - F', -menu => $df);
$tb->entryconfigure('G - I', -menu => $gi);
$tb->entryconfigure('J - L', -menu => $jl);
$tb->entryconfigure('M - O', -menu => $mo);
$tb->entryconfigure('P - R', -menu => $pr);
$tb->entryconfigure('S - U', -menu => $su);
$tb->entryconfigure('V - X', -menu => $vx);
$tb->entryconfigure('Y - Z', -menu => $yz);
lib/App/SourcePlot.pm view on Meta::CPAN
-textvariable => \$timeEnt,
-width => 10,
)->grid(-column => 1, -row => 2, -padx => 10, -pady => 5);
# place the y-axis menuButton
$topFrame->Label(
-text => 'y-axis:',
)->grid(-column => 0, -row => 4, -padx => 5, -pady => 5);
my $yEnt = $Y_AXIS;
my $yb = $topFrame->Menubutton(
-text => $yEnt,
-relief => 'raised',
-width => 15);
foreach $name (@axes) {
$yb->command(
-label => $name,
-command => sub {
$yb->configure(-text => $name);
$yEnt = $name;
},
lib/App/SourcePlot.pm view on Meta::CPAN
}
$yb->grid(-column => 1, -row => 4, -padx => 10, -pady => 5, -sticky => 'w');
# inserting cascading choices
# place the x-axis menuButton
$topFrame->Label(
-text => 'x-axis:',
)->grid(-column => 0, -row => 3, -padx => 5, -pady => 5);
my $xEnt = $X_AXIS;
my $xb = $topFrame->Menubutton(
-text => $xEnt,
-relief => 'raised',
-width => 15,
);
foreach $name (@axes) {
$xb->command(
-label => $name,
-command => sub {
$xb->configure(-text => $name);
$xEnt = $name;
lib/App/SourcePlot.pm view on Meta::CPAN
my $decEnt = $topFrame->Entry(
-relief => 'sunken',
-width => 15
)->grid(-column => 1, -row => 2, -padx => 10, -pady => 3);
$decEnt->insert(0, $source->dec()) unless $source->is_blank();
$topFrame->Label(
-text => 'Epoc:',
)->grid(-column => 0, -row => 3, -padx => 5, -pady => 5);
my $epocEnt = $source->is_blank() ? $Epocs[0] : $source->epoc();
my $epocB = $topFrame->Menubutton(
-text => $epocEnt,
-relief => 'raised',
-width => 15,
);
foreach $name (@Epocs) {
$epocB->command(
-label => $name,
-command => sub {
$epocB->configure(-text => $name);
lib/App/SourcePlot.pm view on Meta::CPAN
@UNDO_LIST = ();
$undoBut->configure(-state => 'normal') if $EDIT_OPEN;
push @UNDO_LIST, $source;
plot();
}
},
)->pack(-side => 'left');
$balloon->attach($newBut, -balloonmsg => "Press to manually\nadd a source");
# create the planet button
my $planBut = $manipF->Menubutton(
-text => 'Planets',
-width => 7,
-relief => 'raised',
);
{
my $k = 0;
foreach my $plan (@planets) {
my $c = $k;
$planBut->command(
-label => $plan,
( run in 1.163 second using v1.01-cache-2.11-cpan-49f99fa48dc )