App-SeismicUnixGui
view release on metacpan or search on metacpan
lib/App/SeismicUnixGui/big_streams/immodpg.pl view on Meta::CPAN
# CASE 2 BAD MODEL FILE
print("immodpg.pl, CORRUPT immodpg.out (fortran binary model file)\n");
} else {
print("immodpg.pl, unexpected variable\n");
}
=head2 Prepare su file
for input to immodpg.for
generate a binary file
=cut
$premmod->set_binary_strip();
$premmod->out_header_values();
=head2 Establish Main Window
=cut
$mw->deiconify();
$mw->raise();
$mw->geometry("430x280+40+100");
$mw->title("immodpg2");
$mw->configure(
-highlightcolor => 'blue',
-background => $var_L_SU->{_my_purple},
);
$mw->focusFollowsMouse;
=head2 top_settings frame
Contains:
(1) working layer
(2) z inc and V inc in m/s
help goes to superflow bindings
=cut
my $Vlayer_frame = $mw->Frame(
-borderwidth => $var_L_SU->{_no_borderwidth},
-background => $var_L_SU->{_my_purple},
-relief => 'groove',
);
=head2 Create
font types
=cut
my $arial_14 = $mw->fontCreate(
'arial_14',
-family => 'arial',
-weight => 'normal',
-size => -14
);
my $arial_14_bold = $mw->fontCreate(
'arial_14_bold',
-family => 'arial',
-weight => 'bold',
-size => -14
);
my $arial_14_italic = $mw->fontCreate(
'arial_14_italic',
-family => 'arial',
-slant => 'italic',
-weight => 'bold',
-size => -14
);
my $arial_16 = $mw->fontCreate(
'arial_16',
-family => 'arial',
-weight => 'normal',
-size => -16
);
my $arial_16_italic = $mw->fontCreate(
'arial_16_italic',
-family => 'arial',
-slant => 'italic',
-weight => 'bold',
-size => -16
);
my $arial_18 = $mw->fontCreate(
'arial_18',
-family => 'arial',
-weight => 'normal',
-size => -18
);
my $arial_18_italic = $mw->fontCreate(
'arial_italic_18',
-family => 'arial',
-weight => 'normal',
-slant => 'italic',
-size => -18
);
my $arial_18_bold = $mw->fontCreate(
'arial_18_bold',
-family => 'arial',
-weight => 'bold',
-size => -18
);
=head2 Entry widgets
=cut
=head2 VbotEntry
=cut
my $VbotEntry = $mw->Entry(
-font => $arial_18,
-width => $var_L_SU->{_7_characters},
-background => $var_L_SU->{_my_black},
-foreground => $var_L_SU->{_my_white},
-borderwidth => $var_L_SU->{_no_borderwidth},
-textvariable => \$Vbot,
);
# print("main,VbotEntry= $VbotEntry\n");
=head2 VbotEntry
MUST first be created before it can be used by
a callback subroutine
=cut
$immodpg_Tk->{_VbotEntry} = $VbotEntry;
# print("main,immodpg_Tk->{_VbotEntry}= $immodpg_Tk->{_VbotEntry}\n");
$VbotEntry->configure(
-validate => 'focus',
-validatecommand => \&_setVbot,
-invalidcommand => sub { print "VbotEntry_box,ERROR.\n" },
);
=head2 Vbot_upper_layerEntry
=cut
my $Vbot_upper_layerEntry = $mw->Entry(
-font => $arial_18,
-width => $var_L_SU->{_7_characters},
-background => $var_L_SU->{_my_light_grey},
-foreground => $var_L_SU->{_my_black},
-borderwidth => $var_L_SU->{_no_borderwidth},
-textvariable => \$Vbot_upper_layer,
);
=head2 Vbot_upper_layerEntry
MUST first be created before it can be used by
a callback subroutine
=cut
$immodpg_Tk->{_Vbot_upper_layerEntry} = $Vbot_upper_layerEntry;
$Vbot_upper_layerEntry->configure(
-validate => 'focus',
-validatecommand => \&_setVbot_upper_layer,
lib/App/SeismicUnixGui/big_streams/immodpg.pl view on Meta::CPAN
=head2 thickness_mEntry
MUST first be created before it can be used by
a callback subroutine
=cut
$immodpg_Tk->{_thickness_mEntry} = $thickness_mEntry;
$thickness_mEntry->configure(
-validate => 'focus',
-validatecommand => \&_set_thickness_m,
-invalidcommand => sub { print "thickness_increment_box,ERROR.\n" },
);
=head2 thickness_mLabel
=cut
my $thickness_mLabel = $mw->Label(
-font => $arial_18_italic,
-justify => 'right',
-borderwidth => $var_L_SU->{_1_pixel},
-background => $var_L_SU->{_light_gray},
-text => ' thickness (m)',
);
=head2 upper_layerLabel
=cut
my $upper_layerLabel = $mw->Label(
-font => $arial_18,
-justify => 'center',
-width => $var_L_SU->{_4_characters},
-background => $var_L_SU->{_my_light_grey},
-foreground => $var_L_SU->{_my_black},
-borderwidth => $var_L_SU->{_no_borderwidth},
-textvariable => \$upper_layer,
);
=head2 upper_layerLabel widget will be update
in immodpg
=cut
$immodpg_Tk->{_upper_layerLabel} = $upper_layerLabel;
=head2 Buttons widgets
=cut
=head2 Buttons widgets
=cut
=head2
row index=0
=cut
$exit_button = $mw->Button(
-font => $arial_14_bold,
-height => $var_L_SU->{_1_character},
-border => 0,
-padx => 0,
-pady => 0,
-text => 'Exit',
-width => $var_L_SU->{_1_character},
-background => $var_L_SU->{_my_yellow},
-foreground => $var_L_SU->{_my_black},
-disabledforeground => $var_L_SU->{_my_black},
-activeforeground => $var_L_SU->{_my_black},
-activebackground => $var_L_SU->{_my_yellow},
-relief => 'flat',
-state => 'active',
-command => [ \&_set_exit ],
);
=head2
row index
=cut
$move_down_button = $mw->Button(
-font => $arial_14_bold,
-height => $var_L_SU->{_1_character},
-border => 0,
-padx => 0,
-pady => 0,
-text => 'down',
-width => $var_L_SU->{_1_character},
-background => $var_L_SU->{_my_light_grey},
-foreground => $var_L_SU->{_my_black},
-disabledforeground => $var_L_SU->{_my_dark_grey},
-activeforeground => $var_L_SU->{_my_white},
-activebackground => $var_L_SU->{_my_dark_grey},
-relief => 'flat',
-state => 'active',
-command => [ \&_set_move_down ],
);
=head2
row index
=cut
$move_left_button = $mw->Button(
-font => $arial_14_bold,
-height => $var_L_SU->{_1_character},
# -border => 0,
-padx => 0,
-pady => 0,
-text => '<--',
-width => $var_L_SU->{_1_character},
-background => $var_L_SU->{_my_light_grey},
-foreground => $var_L_SU->{_my_black},
-disabledforeground => $var_L_SU->{_my_dark_grey},
-activeforeground => $var_L_SU->{_my_white},
-activebackground => $var_L_SU->{_my_dark_grey},
-relief => 'flat',
-state => 'active',
-command => [ \&_set_move_left ],
);
=head2
row index
=cut
$move_right_button = $mw->Button(
-font => $arial_14_bold,
-height => $var_L_SU->{_1_character},
# -border => 0,
-padx => 0,
-pady => 0,
-text => '-->',
-width => $var_L_SU->{_1_character},
-background => $var_L_SU->{_my_light_grey},
-foreground => $var_L_SU->{_my_black},
-disabledforeground => $var_L_SU->{_my_dark_grey},
-activeforeground => $var_L_SU->{_my_white},
-activebackground => $var_L_SU->{_my_dark_grey},
-relief => 'flat',
-state => 'active',
-command => [ \&_set_move_right ],
);
=head2
row index
=cut
$move_up_button = $mw->Button(
-font => $arial_14_bold,
-height => $var_L_SU->{_1_character},
# -border => 0,
-padx => 0,
-pady => 0,
-text => 'up',
-width => $var_L_SU->{_1_character},
-background => $var_L_SU->{_my_light_grey},
-foreground => $var_L_SU->{_my_black},
-disabledforeground => $var_L_SU->{_my_dark_grey},
-activeforeground => $var_L_SU->{_my_white},
-activebackground => $var_L_SU->{_my_dark_grey},
-relief => 'flat',
-state => 'active',
-command => [ \&_set_move_up ],
);
=head2
row index 1-2 col 3
=cut
$VtopNVbot_upper_layer_plus_button = $mw->Button(
-font => $arial_18_bold,
-height => $var_L_SU->{_1_character},
# -border => 0,
-padx => 0,
-pady => 0,
-text => '+',
-width => $var_L_SU->{_1_character},
-background => $var_L_SU->{_my_light_grey},
-foreground => $var_L_SU->{_my_black},
-disabledforeground => $var_L_SU->{_my_dark_grey},
-activeforeground => $var_L_SU->{_my_white},
-activebackground => $var_L_SU->{_my_dark_grey},
-relief => 'flat',
-state => 'active',
-command => [ \&_setVtopNVbot_upper_layer_plus ],
);
=head2
row index 3-4 col 4
=cut
$VtopNVbot_upper_layer_minus_button = $mw->Button(
-font => $arial_18_bold,
-height => $var_L_SU->{_1_character},
# -border => 0,
-padx => 0,
-pady => 0,
-text => '-',
-width => $var_L_SU->{_1_character},
-background => $var_L_SU->{_my_light_grey},
-foreground => $var_L_SU->{_my_black},
-disabledforeground => $var_L_SU->{_my_dark_grey},
-activeforeground => $var_L_SU->{_my_white},
-activebackground => $var_L_SU->{_my_dark_grey},
-relief => 'flat',
-state => 'active',
-command => [ \&_setVtopNVbot_upper_layer_minus ],
);
=head2
row index 2, col 6
=cut
$Vtop_plus_button = $mw->Button(
-font => $arial_18_bold,
-height => $var_L_SU->{_1_character},
# -border => 0,
-padx => 0,
-pady => 0,
-text => '+',
-width => $var_L_SU->{_1_character},
-background => $var_L_SU->{_my_light_grey},
-foreground => $var_L_SU->{_my_black},
-disabledforeground => $var_L_SU->{_my_dark_grey},
-activeforeground => $var_L_SU->{_my_white},
-activebackground => $var_L_SU->{_my_dark_grey},
-relief => 'flat',
-state => 'active',
-command => [ \&_setVtop_plus ],
);
=head2
row index
=cut
$VbotNtop_plus_button = $mw->Button(
-font => $arial_18_bold,
-height => $var_L_SU->{_1_character},
# -border => 0,
-padx => 0,
-pady => 0,
-text => '+',
-width => $var_L_SU->{_1_character},
-background => $var_L_SU->{_my_light_grey},
-foreground => $var_L_SU->{_my_black},
-disabledforeground => $var_L_SU->{_my_dark_grey},
-activeforeground => $var_L_SU->{_my_white},
-activebackground => $var_L_SU->{_my_dark_grey},
-relief => 'flat',
-state => 'active',
-command => [ \&_setVbotNtop_plus ],
);
=head2
row index
=cut
$Vbot_plus_button = $mw->Button(
-font => $arial_18_bold,
-height => $var_L_SU->{_1_character},
# -border => 0,
-padx => 0,
-pady => 0,
-text => '+',
-width => $var_L_SU->{_1_character},
-background => $var_L_SU->{_my_light_grey},
-foreground => $var_L_SU->{_my_black},
-disabledforeground => $var_L_SU->{_my_dark_grey},
-activeforeground => $var_L_SU->{_my_white},
-activebackground => $var_L_SU->{_my_dark_grey},
-relief => 'flat',
-state => 'active',
# -takefocus => 1,
-command => [ \&_setVbot_plus ],
);
=head2
row index
=cut
$VbotNVtop_lower_layer_plus_button = $mw->Button(
-font => $arial_18_bold,
-height => $var_L_SU->{_one_character},
# -border => 0,
-padx => 0,
-pady => 0,
-text => '+',
-width => $var_L_SU->{_one_character},
-background => $var_L_SU->{_my_light_grey},
-foreground => $var_L_SU->{_my_black},
-disabledforeground => $var_L_SU->{_my_dark_grey},
-activeforeground => $var_L_SU->{_my_white},
-activebackground => $var_L_SU->{_my_dark_grey},
-relief => 'flat',
-state => 'active',
-command => [ \&_setVbotNVtop_lower_layer_plus ],
);
=head2
row index
=cut
$VbotNVtop_lower_layer_minus_button = $mw->Button(
-font => $arial_18_bold,
-height => $var_L_SU->{_one_character},
# -border => 0,
-padx => 0,
-pady => 0,
-text => '-',
-width => $var_L_SU->{_one_character},
-background => $var_L_SU->{_my_light_grey},
-foreground => $var_L_SU->{_my_black},
-disabledforeground => $var_L_SU->{_my_dark_grey},
-activeforeground => $var_L_SU->{_my_white},
-activebackground => $var_L_SU->{_my_dark_grey},
-relief => 'flat',
-state => 'active',
-command => [ \&_setVbotNVtop_lower_layer_minus ],
);
=head2 VbotNtop_multiply_button
row index = 1 col 2
=cut
$VbotNtop_multiply_button = $mw->Button(
-font => $arial_18_bold,
-height => $var_L_SU->{_1_character},
# -border => 0,
-padx => 0,
-pady => 0,
-text => 'x',
-width => $var_L_SU->{_1_character},
-background => $var_L_SU->{_my_light_grey},
-foreground => $var_L_SU->{_my_black},
-disabledforeground => $var_L_SU->{_my_dark_grey},
-activeforeground => $var_L_SU->{_my_white},
-activebackground => $var_L_SU->{_my_dark_grey},
-relief => 'flat',
-state => 'active',
-command => [ \&_setVbotNtop_multiply ],
);
=head2
row index = 1 col 2
=cut
$VbotNtop_minus_button = $mw->Button(
-font => $arial_18_bold,
-height => $var_L_SU->{_1_character},
# -border => 0,
-padx => 0,
-pady => 0,
-text => '-',
-width => $var_L_SU->{_1_character},
-background => $var_L_SU->{_my_light_grey},
-foreground => $var_L_SU->{_my_black},
-disabledforeground => $var_L_SU->{_my_dark_grey},
-activeforeground => $var_L_SU->{_my_white},
-activebackground => $var_L_SU->{_my_dark_grey},
-relief => 'flat',
-state => 'active',
-command => [ \&_setVbotNtop_minus ],
);
=head2
row index = 2 col 7
=cut
$Vtop_minus_button = $mw->Button(
-font => $arial_18_bold,
-height => $var_L_SU->{_one_character},
# -border => 0,
-padx => 0,
-pady => 0,
-text => '-',
-width => $var_L_SU->{_one_character},
-background => $var_L_SU->{_my_light_grey},
-foreground => $var_L_SU->{_my_black},
-disabledforeground => $var_L_SU->{_my_dark_grey},
-activeforeground => $var_L_SU->{_my_white},
-activebackground => $var_L_SU->{_my_dark_grey},
-relief => 'flat',
-state => 'active',
-command => [ \&_setVtop_minus ],
);
=head2
row index = 3 col 7
=cut
$Vbot_minus_button = $mw->Button(
-font => $arial_18_bold,
-height => $var_L_SU->{_one_character},
# -border => 0,
-padx => 0,
-pady => 0,
-text => '-',
-width => $var_L_SU->{_one_character},
-background => $var_L_SU->{_my_light_grey},
-foreground => $var_L_SU->{_my_black},
-disabledforeground => $var_L_SU->{_my_dark_grey},
-activeforeground => $var_L_SU->{_my_white},
-activebackground => $var_L_SU->{_my_dark_grey},
-relief => 'flat',
-state => 'active',
-command => [ \&_setVbot_minus ],
);
=head2
row index
=cut
$thickness_m_minus_button = $mw->Button(
-font => $arial_14_bold,
-height => $var_L_SU->{_1_character},
# -border => 0,
-padx => 0,
-pady => 0,
-text => '-',
-width => $var_L_SU->{_1_character},
-background => $var_L_SU->{_my_light_grey},
-foreground => $var_L_SU->{_my_black},
-disabledforeground => $var_L_SU->{_my_dark_grey},
-activeforeground => $var_L_SU->{_my_white},
-activebackground => $var_L_SU->{_my_dark_grey},
-relief => 'flat',
-state => 'active',
-command => [ \&_set_thickness_m_minus ],
);
=head2
row index
=cut
$thickness_m_plus_button = $mw->Button(
-font => $arial_14_bold,
-height => $var_L_SU->{_1_character},
# -border => 0,
-padx => 0,
-pady => 0,
-text => '+',
-width => $var_L_SU->{_1_character},
-background => $var_L_SU->{_my_light_grey},
-foreground => $var_L_SU->{_my_black},
-disabledforeground => $var_L_SU->{_my_dark_grey},
-activeforeground => $var_L_SU->{_my_white},
-activebackground => $var_L_SU->{_my_dark_grey},
-relief => 'flat',
-state => 'active',
-command => [ \&_set_thickness_m_plus ],
);
=head2
row index=5
=cut
$update_button = $mw->Button(
-font => $arial_14_bold,
-height => $var_L_SU->{_1_character},
-border => 0,
-padx => 0,
-pady => 0,
-text => 'Update',
-width => $var_L_SU->{_1_character},
-background => $var_L_SU->{_my_yellow},
-foreground => $var_L_SU->{_my_black},
-disabledforeground => $var_L_SU->{_my_black},
-activeforeground => $var_L_SU->{_my_black},
-activebackground => $var_L_SU->{_my_yellow},
-relief => 'flat',
-state => 'active',
-command => [ \&_set_update ],
);
=head2 zoom_minus_button
row index 1-2 col 3
=cut
$zoom_minus_button = $mw->Button(
-font => $arial_18_bold,
-height => $var_L_SU->{_1_character},
# -border => 0,
-padx => 0,
-pady => 0,
-text => '-',
-width => $var_L_SU->{_1_character},
-background => $var_L_SU->{_my_light_grey},
-foreground => $var_L_SU->{_my_black},
-disabledforeground => $var_L_SU->{_my_dark_grey},
-activeforeground => $var_L_SU->{_my_white},
-activebackground => $var_L_SU->{_my_dark_grey},
-relief => 'flat',
-state => 'active',
-command => [ \&_set_zoom_minus ],
);
=head2 zoom_plus_button
row index 1-2 col 3
=cut
$zoom_plus_button = $mw->Button(
-font => $arial_18_bold,
-height => $var_L_SU->{_1_character},
# -border => 0,
-padx => 0,
-pady => 0,
-text => '+',
-width => $var_L_SU->{_1_character},
-background => $var_L_SU->{_my_light_grey},
-foreground => $var_L_SU->{_my_black},
-disabledforeground => $var_L_SU->{_my_dark_grey},
-activeforeground => $var_L_SU->{_my_white},
-activebackground => $var_L_SU->{_my_dark_grey},
-relief => 'flat',
-state => 'active',
-command => [ \&_set_zoom_plus ],
);
=head2 Label widgets
=cut
=head2 Label
widget box for Vbot of upper layer
=cut
my $Vbot_upper_label = $mw->Label(
-font => $arial_18,
-pady => $var_L_SU->{_3_pixels},
-height => $var_L_SU->{_1_character},
-width => $var_L_SU->{_4_characters},
-text => 'Vbot',
-borderwidth => $var_L_SU->{_1_pixel},
-background => $var_L_SU->{_light_gray},
);
=head2 Label
widget box for Vincrement
=cut
my $Vincrement_label = $mw->Label(
-font => $arial_16_italic,
-pady => $var_L_SU->{_3_pixels},
-height => $var_L_SU->{_1_character},
-width => $var_L_SU->{_4_characters},
-text => 'Vinc (m/s)',
-borderwidth => $var_L_SU->{_1_pixel},
-background => $var_L_SU->{_light_gray},
);
=head2 Label
#widget box for Vtop
=cut
my $Vtop_label = $mw->Label(
-font => $arial_18_bold,
-pady => $var_L_SU->{_3_pixels},
-height => $var_L_SU->{_1_character},
-width => $var_L_SU->{_4_characters},
-text => 'Vtop',
-borderwidth => $var_L_SU->{_1_pixel},
-background => $var_L_SU->{_light_gray},
);
=head2 Label
widget box for Vtop of lower layer
=cut
my $Vtop_lower_layer_label = $mw->Label(
-font => $arial_18,
-pady => $var_L_SU->{_3_pixels},
-height => $var_L_SU->{_1_character},
-width => $var_L_SU->{_4_characters},
-text => 'Vtop',
-borderwidth => $var_L_SU->{_1_pixel},
-background => $var_L_SU->{_light_gray},
);
=head2 Label
widget box for Vbot
=cut
my $Vbot_label = $mw->Label(
-font => $arial_18_bold,
-pady => $var_L_SU->{_3_pixels},
-height => $var_L_SU->{_1_character},
-width => $var_L_SU->{_4_characters},
-text => 'Vbot',
-borderwidth => $var_L_SU->{_1_pixel},
-background => $var_L_SU->{_light_gray},
);
=head2 Label
factor
=cut
my $VbotNtop_factor_label = $mw->Label(
-font => $arial_16_italic,
-pady => $var_L_SU->{_3_pixels},
-height => $var_L_SU->{_1_character},
-width => $var_L_SU->{_4_characters},
-text => 'Vfactor',
-borderwidth => $var_L_SU->{_1_pixel},
-background => $var_L_SU->{_light_gray},
);
=head2 Label
clip4plot
=cut
my $clip4plot_label = $mw->Label(
-font => $arial_16_italic,
-pady => $var_L_SU->{_3_pixels},
-height => $var_L_SU->{_1_character},
-width => $var_L_SU->{_4_characters},
-text => 'clip',
-borderwidth => $var_L_SU->{_1_pixel},
-background => $var_L_SU->{_light_gray},
);
=head2 Label
widget box for thicknes increment
=cut
my $thickness_increment_m_label = $mw->Label(
-font => $arial_16_italic,
-padx => $var_L_SU->{_3_pixels},
-height => $var_L_SU->{_1_character},
-width => $var_L_SU->{_4_characters},
-text => 'inc (m)',
-borderwidth => $var_L_SU->{_1_pixel},
-background => $var_L_SU->{_light_gray},
);
=head2 Label
empty
=cut
my $empty_label = $mw->Label(
-font => $arial_14,
( run in 0.719 second using v1.01-cache-2.11-cpan-39bf76dae61 )