26
26
-foreground=>$config{colors}{activehighlightcolor});
27
27
my @pluck=(-image=>$pluck_X);
29
my $canvas = $parent -> Canvas(-relief=>'flat',
32
-highlightcolor=>$config{colors}{background});
34
my $c = $canvas -> Frame(-relief=>'flat',
29
my $c = $parent -> Frame(-relief=>'flat',
36
-highlightcolor=>$config{colors}{background});
37
$canvas -> createWindow(0,0, -anchor=>'nw', -window => $c, @window_size,);
32
-highlightcolor=>$config{colors}{background})
33
-> pack(-fill=>'both', -expand=>1);
40
my $lfr = $c -> LabFrame(-label=>'Titles',
41
-foreground=>$config{colors}{activehighlightcolor},
42
-labelside=>'acrosstop',
36
my $lfr = $c -> LabFrame(-label => 'Titles',
37
-font => $config{fonts}{med},
38
-foreground => $config{colors}{activehighlightcolor},
39
-labelside => 'acrosstop',
44
41
-> pack(-side=>'top', -padx=>4, -fill=>'x');
45
42
&labframe_help($lfr);
46
43
push @op_text, $lfr;
106
103
-> pack(-side=>'top', -padx=>6, -pady=>0,);
107
104
$fr = $widgets{chi_frame} -> Frame()
108
105
-> pack(-side=>'top');
109
my $left = $fr -> LabFrame(-label=>'Data controls',
110
-foreground=>$config{colors}{activehighlightcolor},
111
-labelside=>'acrosstop',
106
my $left = $fr -> LabFrame(-label => 'Data controls',
107
-font => $config{fonts}{med},
108
-foreground => $config{colors}{activehighlightcolor},
109
-labelside => 'acrosstop',
113
111
-> pack(-side=>'left', -padx=>4, -fill=>'x', -anchor=>'n');
114
112
&labframe_help($left);
115
113
push @op_text, $left;
182
$fr = $fr -> LabFrame(-label=>'Fourier and fit parameters',
183
-foreground=>$config{colors}{activehighlightcolor},
184
-labelside=>'acrosstop',
180
$fr = $fr -> LabFrame(-label => 'Fourier and fit parameters',
181
-font => $config{fonts}{med},
182
-foreground => $config{colors}{activehighlightcolor},
183
-labelside => 'acrosstop',
186
185
-> pack(-side=>'right', -padx=>4, -fill=>'x', -anchor=>'n');
187
186
&labframe_help($fr);
188
187
push @op_text, $fr;
301
300
-> pack(-side=>'bottom', -padx=>12, -pady=>4);
303
302
## fitting space and other fit params
304
$left = $fr -> LabFrame(-label=>'Other parameters',
305
-foreground=>$config{colors}{activehighlightcolor},
306
-labelside=>'acrosstop',
303
$left = $fr -> LabFrame(-label => 'Other parameters',
304
-font => $config{fonts}{med},
305
-foreground => $config{colors}{activehighlightcolor},
306
-labelside => 'acrosstop',
308
308
-> pack(-side=>'left', -padx=>4, -fill=>'x', -anchor=>'n');
309
309
&labframe_help($left);
310
310
push @op_text, $left;
370
my $right = $fr -> LabFrame(-label=>'Fit k-weights',
371
-foreground=>$config{colors}{activehighlightcolor},
372
-labelside=>'acrosstop',
370
my $right = $fr -> LabFrame(-label => 'Fit k-weights',
371
-font => $config{fonts}{med},
372
-foreground => $config{colors}{activehighlightcolor},
373
-labelside => 'acrosstop',
374
375
-> pack(-side=>'right', -padx=>4, -fill=>'x', -anchor=>'n');
375
376
&labframe_help($right);
376
377
push @op_text, $right;
445
446
## fill in the mu(E) tab
446
$fr = $widgets{mu_frame} -> LabFrame(-label=>'Background Removal Parameters',
447
-foreground=>$config{colors}{activehighlightcolor},
448
-labelside=>'acrosstop',)
447
$fr = $widgets{mu_frame} -> LabFrame(-label => 'Background Removal Parameters',
448
-font => $config{fonts}{med},
449
-foreground => $config{colors}{activehighlightcolor},
450
-labelside => 'acrosstop',)
449
451
-> pack(-fill=>'x', -anchor=>'n', -pady=>2);
450
452
$fr -> Label(@start, -text=>'E0')
451
453
-> grid(-row=>0, -column=>0, -sticky=>'e');
898
904
$plot_features{r_pl} ||= 'm';
899
905
$plot_features{r_pl_label} = $parts{$plot_features{r_pl}};
900
$frm -> Label(-text=>'Plot in R: ', -foreground=>$config{colors}{activehighlightcolor})
906
$frm -> Label(-text => 'Plot in R: ',
907
-font => $config{fonts}{med},
908
-foreground => $config{colors}{activehighlightcolor})
901
909
-> grid(-row=>0, -column=>0, -sticky=>'e');
902
910
## $widgets{plot_r} = $frm -> Optionmenu(-textvariable => \$plot_features{r_pl_label},
926
934
$plot_features{q_pl} ||= 'r';
927
935
$plot_features{q_pl_label} = $parts{$plot_features{q_pl}};
928
$frm -> Label(-text=>'Plot in q: ', -foreground=>$config{colors}{activehighlightcolor})
936
$frm -> Label(-text => 'Plot in q: ',
937
-font => $config{fonts}{med},
938
-foreground => $config{colors}{activehighlightcolor})
929
939
-> grid(-row=>$r, -column=>0, -sticky=>'e');
930
940
foreach my $p (@list) {
931
941
$frm -> Radiobutton(-value => $p,
942
952
$plot_features{win} ||= 0;
943
953
$widgets{plot_win} = $container ->
944
Checkbutton(-text=>'Window',
945
-onvalue=>'w', -offvalue=>"",
946
-selectcolor=>$config{colors}{check},
947
-foreground=>$config{colors}{activehighlightcolor},
948
-activeforeground=>$config{colors}{activehighlightcolor},
949
-variable=>\$plot_features{win},
950
-command => sub{&plot($last_plot, 0)}
954
Checkbutton(-text => 'Window',
955
-font => $config{fonts}{med},
958
-selectcolor => $config{colors}{check},
959
-foreground => $config{colors}{activehighlightcolor},
960
-activeforeground => $config{colors}{activehighlightcolor},
961
-variable => \$plot_features{win},
962
-command => sub{&plot($last_plot, 0)}
953
965
$widgets{plot_bkg} = $container ->
954
Checkbutton(-text=>'Background',
955
-onvalue=>'b', -offvalue=>"",
956
-selectcolor=>$config{colors}{check},
957
-activeforeground=>$config{colors}{activehighlightcolor},
958
-foreground=>$config{colors}{activehighlightcolor},
959
-variable=>\$plot_features{bkg},
960
-command => sub{&plot($last_plot, 0)}
966
Checkbutton(-text => 'Background',
967
-font => $config{fonts}{med},
970
-selectcolor => $config{colors}{check},
971
-activeforeground => $config{colors}{activehighlightcolor},
972
-foreground => $config{colors}{activehighlightcolor},
973
-variable => \$plot_features{bkg},
974
-command => sub{&plot($last_plot, 0)}
964
978
$widgets{plot_res} = $container ->
965
Checkbutton(-text=>'Residual',
966
-onvalue=>'z', -offvalue=>"",
967
-selectcolor=>$config{colors}{check},
968
-foreground=>$config{colors}{activehighlightcolor},
969
-activeforeground=>$config{colors}{activehighlightcolor},
970
-variable=>\$plot_features{res},
971
-command => sub{&plot($last_plot, 0)}
979
Checkbutton(-text => 'Residual',
980
-font => $config{fonts}{med},
983
-selectcolor => $config{colors}{check},
984
-foreground => $config{colors}{activehighlightcolor},
985
-activeforeground => $config{colors}{activehighlightcolor},
986
-variable => \$plot_features{res},
987
-command => sub{&plot($last_plot, 0)}
983
999
$plot_features{qmax} ||= 15;
985
1001
foreach my $s (qw(k R q)) {
986
$frm -> Label(-text=>$s.'min:', -foreground=>$config{colors}{activehighlightcolor})
1002
$frm -> Label(-text => $s.'min:',
1003
-font => $config{fonts}{med},
1004
-foreground => $config{colors}{activehighlightcolor})
987
1005
-> grid(-row=>$row, -column=>0);
988
1006
$widgets{'plot_'.lc($s).'min'} = $frm ->
989
1007
Entry(-width=>5, -textvariable=>\$plot_features{lc($s).'min'}, -state=>'normal')
990
1008
-> grid(-row=>$row, -column=>1);
991
$frm -> Label(-text=>$s.'max:', -foreground=>$config{colors}{activehighlightcolor})
1009
$frm -> Label(-text => $s.'max:',
1010
-font => $config{fonts}{med},
1011
-foreground => $config{colors}{activehighlightcolor})
992
1012
-> grid(-row=>$row, -column=>2);
993
1013
$widgets{'plot_'.lc($s).'max'} = $frm ->
994
1014
Entry(-width=>5, -textvariable=>\$plot_features{lc($s).'max'}, -state=>'normal')
1219
1239
foreach ($gsd_menu, $feff_menu, $paths_menu, $data_menu, $sum_menu, $fit_menu) { # , $settings_menu) {
1220
1240
$_ -> configure(-state=>'normal');
1222
$feff_menu -> menu -> entryconfigure($_, -state=>'disabled') for (5..8, 15, 17);
1242
$feff_menu -> menu -> entryconfigure($_, -state=>'disabled') for (5..8, 11, 12, 13, 15, 17);
1223
1243
$paths_menu -> menu -> entryconfigure($_, -state=>'disabled') for (1..3, 5..8, 10..13);
1224
1244
$fit_menu -> menu -> entryconfigure(1, -state=>'disabled', -label=>"Restore this fit model");
1225
1245
$fit_menu -> menu -> entryconfigure($_, -state=>'disabled') for (3..8, 10..11, 14..15);
1308
1328
$path ->packForget(), last SWITCH if ($current_canvas eq 'path');
1309
1329
$logviewer ->packForget(), last SWITCH if ($current_canvas eq 'logview');
1331
$feff->pack(-expand=>1, -fill=>'both');
1312
1332
$current_canvas = 'feff';
1313
1333
populate_feff($current);
1314
map { $feff_menu -> menu -> entryconfigure($_, -state=>'normal') } (5..8, 15, 17);
1334
map { $feff_menu -> menu -> entryconfigure($_, -state=>'normal') } (5..8, 11, 12, 13, 11, 12, 13, 15, 17);
1315
1335
map { $paths_menu -> menu -> entryconfigure($_, -state=>'normal') } (5..8, 13);
1336
## disabled atoms options in theory menu if the atoms data is not present
1337
my $state = $fefftabs -> pagecget("Atoms", "-state");
1338
map { $feff_menu -> menu -> entryconfigure($_, -state=>$state) } (10 .. 13);
1316
1339
} elsif ($anchor =~ /feff\d+\.\d+$/) {
1318
1341
$opparams->packForget(), last SWITCH if ($current_canvas eq 'op');
1320
1343
$feff ->packForget(), last SWITCH if ($current_canvas eq 'feff');
1321
1344
$logviewer ->packForget(), last SWITCH if ($current_canvas eq 'logview');
1346
$path->pack(-expand=>1, -fill=>'both');
1324
1347
$current_canvas = 'path';
1325
1348
populate_path($current);
1326
map { $feff_menu -> menu -> entryconfigure($_, -state=>'normal') } (5..8, 15, 17);
1349
map { $feff_menu -> menu -> entryconfigure($_, -state=>'normal') } (5..8, 11, 12, 13, 15, 17);
1327
1350
map { $paths_menu -> menu -> entryconfigure($_, -state=>'normal') } (1..3, 5..8, 10..13);
1328
1351
$paths_menu -> menu -> entryconfigure(3, -state=>'normal') if $n_feff;
1329
1352
#$show_menu -> menu -> entryconfigure(3, -state=>'normal') if $n_feff;