App-SeismicUnixGui

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

lib/App/SeismicUnixGui/messages/null_messages.pm
lib/App/SeismicUnixGui/messages/project_selector_messages.pm
lib/App/SeismicUnixGui/messages/run_button_messages.pm
lib/App/SeismicUnixGui/messages/save_button_messages.pm
lib/App/SeismicUnixGui/messages/SuMessages.pm
lib/App/SeismicUnixGui/messages/superflow_messages.pm
lib/App/SeismicUnixGui/misc/a2su.pm
lib/App/SeismicUnixGui/misc/algebra_by.pm
lib/App/SeismicUnixGui/misc/array.pm
lib/App/SeismicUnixGui/misc/big_streams_param.pm
lib/App/SeismicUnixGui/misc/binding.pm
lib/App/SeismicUnixGui/misc/blue_flow.pm
lib/App/SeismicUnixGui/misc/check_buttons.pm
lib/App/SeismicUnixGui/misc/cmpcc.pm
lib/App/SeismicUnixGui/misc/color_listbox.pm
lib/App/SeismicUnixGui/misc/conditions4big_streams.pm
lib/App/SeismicUnixGui/misc/conditions4flows.pm
lib/App/SeismicUnixGui/misc/config_superflows.pm
lib/App/SeismicUnixGui/misc/control.pm
lib/App/SeismicUnixGui/misc/copyNclean_sgy_up.pl
lib/App/SeismicUnixGui/misc/count.pm

MANIFEST.bak  view on Meta::CPAN

lib/App/SeismicUnixGui/messages/null_messages.pm
lib/App/SeismicUnixGui/messages/project_selector_messages.pm
lib/App/SeismicUnixGui/messages/run_button_messages.pm
lib/App/SeismicUnixGui/messages/save_button_messages.pm
lib/App/SeismicUnixGui/messages/SuMessages.pm
lib/App/SeismicUnixGui/messages/superflow_messages.pm
lib/App/SeismicUnixGui/misc/a2su.pm
lib/App/SeismicUnixGui/misc/algebra_by.pm
lib/App/SeismicUnixGui/misc/array.pm
lib/App/SeismicUnixGui/misc/big_streams_param.pm
lib/App/SeismicUnixGui/misc/binding.pm
lib/App/SeismicUnixGui/misc/blue_flow.pm
lib/App/SeismicUnixGui/misc/check_buttons.pm
lib/App/SeismicUnixGui/misc/cmpcc.pm
lib/App/SeismicUnixGui/misc/color_listbox.pm
lib/App/SeismicUnixGui/misc/conditions4big_streams.pm
lib/App/SeismicUnixGui/misc/conditions4flows.pm
lib/App/SeismicUnixGui/misc/config_superflows.pm
lib/App/SeismicUnixGui/misc/control.pm
lib/App/SeismicUnixGui/misc/copyNclean_sgy_up.pl
lib/App/SeismicUnixGui/misc/count.pm

Makefile  view on Meta::CPAN

	lib/App/SeismicUnixGui/misc/PID.pm \
	lib/App/SeismicUnixGui/misc/Project_Variables.pm \
	lib/App/SeismicUnixGui/misc/SeismicUnix.pm \
	lib/App/SeismicUnixGui/misc/a2su.pm \
	lib/App/SeismicUnixGui/misc/algebra_by.pm \
	lib/App/SeismicUnixGui/misc/archive/L_SU_global_constants.pm \
	lib/App/SeismicUnixGui/misc/archive/L_SU_global_constants.pm_bck \
	lib/App/SeismicUnixGui/misc/archive/L_SU_path.pm \
	lib/App/SeismicUnixGui/misc/archive/Point.pm \
	lib/App/SeismicUnixGui/misc/archive/backup_project_selector.pm \
	lib/App/SeismicUnixGui/misc/archive/binding2.pm \
	lib/App/SeismicUnixGui/misc/archive/canvas_data.pm \
	lib/App/SeismicUnixGui/misc/archive/canvas_graph.pm \
	lib/App/SeismicUnixGui/misc/archive/control.pm \
	lib/App/SeismicUnixGui/misc/archive/pdl_su.pm \
	lib/App/SeismicUnixGui/misc/archive/segdread.pm \
	lib/App/SeismicUnixGui/misc/archive/t \
	lib/App/SeismicUnixGui/misc/array.pm \
	lib/App/SeismicUnixGui/misc/big_streams_param.pm \
	lib/App/SeismicUnixGui/misc/binding.pm \
	lib/App/SeismicUnixGui/misc/blue_flow.pm \
	lib/App/SeismicUnixGui/misc/check_buttons.pm \
	lib/App/SeismicUnixGui/misc/cmpcc.pm \
	lib/App/SeismicUnixGui/misc/color_listbox.pm \
	lib/App/SeismicUnixGui/misc/conditions4big_streams.pm \
	lib/App/SeismicUnixGui/misc/conditions4flows.pm \
	lib/App/SeismicUnixGui/misc/config_superflows.pm \
	lib/App/SeismicUnixGui/misc/control.pm \
	lib/App/SeismicUnixGui/misc/copyNclean_sgy_up.pl \
	lib/App/SeismicUnixGui/misc/count.pm \

Makefile  view on Meta::CPAN

	  'lib/App/SeismicUnixGui/misc/PID.pm' 'blib/lib/App/SeismicUnixGui/misc/PID.pm' \
	  'lib/App/SeismicUnixGui/misc/Project_Variables.pm' 'blib/lib/App/SeismicUnixGui/misc/Project_Variables.pm' \
	  'lib/App/SeismicUnixGui/misc/SeismicUnix.pm' 'blib/lib/App/SeismicUnixGui/misc/SeismicUnix.pm' \
	  'lib/App/SeismicUnixGui/misc/a2su.pm' 'blib/lib/App/SeismicUnixGui/misc/a2su.pm' \
	  'lib/App/SeismicUnixGui/misc/algebra_by.pm' 'blib/lib/App/SeismicUnixGui/misc/algebra_by.pm' \
	  'lib/App/SeismicUnixGui/misc/archive/L_SU_global_constants.pm' 'blib/lib/App/SeismicUnixGui/misc/archive/L_SU_global_constants.pm' \
	  'lib/App/SeismicUnixGui/misc/archive/L_SU_global_constants.pm_bck' 'blib/lib/App/SeismicUnixGui/misc/archive/L_SU_global_constants.pm_bck' \
	  'lib/App/SeismicUnixGui/misc/archive/L_SU_path.pm' 'blib/lib/App/SeismicUnixGui/misc/archive/L_SU_path.pm' \
	  'lib/App/SeismicUnixGui/misc/archive/Point.pm' 'blib/lib/App/SeismicUnixGui/misc/archive/Point.pm' \
	  'lib/App/SeismicUnixGui/misc/archive/backup_project_selector.pm' 'blib/lib/App/SeismicUnixGui/misc/archive/backup_project_selector.pm' \
	  'lib/App/SeismicUnixGui/misc/archive/binding2.pm' 'blib/lib/App/SeismicUnixGui/misc/archive/binding2.pm' 
	$(NOECHO) $(ABSPERLRUN) -MExtUtils::Install -e 'pm_to_blib({@ARGV}, '\''$(INST_LIB)/auto'\'', q[$(PM_FILTER)], '\''$(PERM_DIR)'\'')' -- \
	  'lib/App/SeismicUnixGui/misc/archive/canvas_data.pm' 'blib/lib/App/SeismicUnixGui/misc/archive/canvas_data.pm' \
	  'lib/App/SeismicUnixGui/misc/archive/canvas_graph.pm' 'blib/lib/App/SeismicUnixGui/misc/archive/canvas_graph.pm' \
	  'lib/App/SeismicUnixGui/misc/archive/control.pm' 'blib/lib/App/SeismicUnixGui/misc/archive/control.pm' \
	  'lib/App/SeismicUnixGui/misc/archive/pdl_su.pm' 'blib/lib/App/SeismicUnixGui/misc/archive/pdl_su.pm' \
	  'lib/App/SeismicUnixGui/misc/archive/segdread.pm' 'blib/lib/App/SeismicUnixGui/misc/archive/segdread.pm' \
	  'lib/App/SeismicUnixGui/misc/archive/t' 'blib/lib/App/SeismicUnixGui/misc/archive/t' \
	  'lib/App/SeismicUnixGui/misc/array.pm' 'blib/lib/App/SeismicUnixGui/misc/array.pm' \
	  'lib/App/SeismicUnixGui/misc/big_streams_param.pm' 'blib/lib/App/SeismicUnixGui/misc/big_streams_param.pm' \
	  'lib/App/SeismicUnixGui/misc/binding.pm' 'blib/lib/App/SeismicUnixGui/misc/binding.pm' \
	  'lib/App/SeismicUnixGui/misc/blue_flow.pm' 'blib/lib/App/SeismicUnixGui/misc/blue_flow.pm' \
	  'lib/App/SeismicUnixGui/misc/check_buttons.pm' 'blib/lib/App/SeismicUnixGui/misc/check_buttons.pm' \
	  'lib/App/SeismicUnixGui/misc/cmpcc.pm' 'blib/lib/App/SeismicUnixGui/misc/cmpcc.pm' \
	  'lib/App/SeismicUnixGui/misc/color_listbox.pm' 'blib/lib/App/SeismicUnixGui/misc/color_listbox.pm' \
	  'lib/App/SeismicUnixGui/misc/conditions4big_streams.pm' 'blib/lib/App/SeismicUnixGui/misc/conditions4big_streams.pm' \
	  'lib/App/SeismicUnixGui/misc/conditions4flows.pm' 'blib/lib/App/SeismicUnixGui/misc/conditions4flows.pm' \
	  'lib/App/SeismicUnixGui/misc/config_superflows.pm' 'blib/lib/App/SeismicUnixGui/misc/config_superflows.pm' \
	  'lib/App/SeismicUnixGui/misc/control.pm' 'blib/lib/App/SeismicUnixGui/misc/control.pm' \
	  'lib/App/SeismicUnixGui/misc/copyNclean_sgy_up.pl' 'blib/lib/App/SeismicUnixGui/misc/copyNclean_sgy_up.pl' \
	  'lib/App/SeismicUnixGui/misc/count.pm' 'blib/lib/App/SeismicUnixGui/misc/count.pm' \

lib/App/SeismicUnixGui/big_streams/immodpg.pl  view on Meta::CPAN

);
$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

lib/App/SeismicUnixGui/big_streams/pre_built_big_stream.pm  view on Meta::CPAN

our $VERSION = '0.1.0';

extends 'App::SeismicUnixGui::misc::gui_history' => { -version => 0.0.2 };
use aliased 'App::SeismicUnixGui::misc::gui_history';
my $pre_built_big_stream_href_sub_ref;    # $pre_built_big_stream_href->{_sub_ref} does not transfer in namespace between subs
use aliased 'App::SeismicUnixGui::misc::L_SU_global_constants';
use aliased 'App::SeismicUnixGui::misc::L_SU_local_user_constants';
use aliased 'App::SeismicUnixGui::messages::message_director';
use aliased 'App::SeismicUnixGui::misc::whereami';
use aliased 'App::SeismicUnixGui::misc::param_widgets4pre_built_streams';
use aliased 'App::SeismicUnixGui::misc::binding';
use aliased 'App::SeismicUnixGui::misc::program_name';  # instead of name
use aliased 'App::SeismicUnixGui::misc::config_superflows';

=head2 Instantiation

=cut

my $get 					  = L_SU_global_constants->new();
my $param_widgets 	          = param_widgets4pre_built_streams->new();
my $whereami      			  = whereami->new();

lib/App/SeismicUnixGui/big_streams/pre_built_big_stream.pm  view on Meta::CPAN

   	
 foreach my $key (sort keys %$pre_built_big_stream_href) {
         print (" pre_built_big_stream,key is $key, value is $pre_built_big_stream_href->{$key}\n");
 }
 
=cut

sub select {
    my ($self) = @_;

    my $binding            				= binding->new();
    my $program_name               		= program_name->new();
    my $pre_built_big_stream_messages 	= message_director->new();
    my $config_superflows  				= config_superflows->new();
    my $Project            				= 'Project';

    my $prog_name_sref = $pre_built_big_stream_href->{_prog_name_sref};
    
    # for internal purposes, convert external names from the gui into internal name
    # TODO needs its own function  
    my $external_name = $$prog_name_sref;

lib/App/SeismicUnixGui/big_streams/pre_built_big_stream.pm  view on Meta::CPAN

    $param_widgets->redisplay_check_buttons();

    # print("2 pre_built_big_stream,superflow_select,chkb=@{$pre_built_big_stream_href->{_check_buttons_settings_aref}}\n");
    # put focus on first entry widget in new value and paramter list
    my @Entry_widget = @{ $param_widgets->get_values_w_aref() };

    # print("L_SU,flow_select,Entry_widgets@Entry_widget\n");
    $Entry_widget[0]->focus;

    # print("3 pre_built_big_stream,superflow_select,chkb=@{$pre_built_big_stream_href->{_check_buttons_settings_aref}}\n");
    # Here is where you rebind the different buttons depending on the
    # program name that is selected (i.e. through *_spec.pm)
    # send superflow names through an alias filter
    # that links their GUI name to their program name
    # e.g., iVelAnalysis (GUI) is actually IVA.pm (shortened)

     my $run_name = $internal_name;;
    
#    print("pre_built_big_stream,select,run_name: $run_name\n");

    $binding->set_prog_name_sref( \$run_name );
    $binding->set_values_w_aref( $param_widgets->get_values_w_aref );

    # print("pre_built_big_stream, select sub_ref: $pre_built_big_stream_href_sub_ref\n");
    $binding->setFileDialog_button_sub_ref($pre_built_big_stream_href_sub_ref);
    $binding->set();

    # print("4 pre_built_big_stream,superflow_select,chkb=@{$pre_built_big_stream_href->{_check_buttons_settings_aref}}\n");

    # in order to export this private hash we need to send if back via a private variable
    # values_aref that will be assigned in pre_built_big_stream, get_hash_ref.
    $values_aref = $pre_built_big_stream_href->{_values_aref};

    # print("4. pre_built_big_stream,select,values=@{$pre_built_big_stream_href->{_values_aref}}\n");

    # gui_history->set_gui_widgets($pre_built_big_stream_href);

lib/App/SeismicUnixGui/developer/code/sunix/README.pm  view on Meta::CPAN

~/developer/Stripped/group_name/program_name_changes.txt

See for example ~/developer/Stripped/migration/sukdmig3d_changes.txt

3 su
2 bin
4 su
7 bin

The number points to the parameter label seen in the gui
The data type abbreviation binds a clicking action to
open the correct directory for that file type. For example,
su will open $DATA_SEISMIC_SU

2. Also check to see in
~/configs/

program_name.config

e.g.,
~/configs/statsMath/suop.config

lib/App/SeismicUnixGui/developer/code/sunix/sudoc2pm_pt1.pl  view on Meta::CPAN

developer category in L_SU_global_constants.pm 
L 234

define program in two locations within
L_SU_path for hash and the colon definitions

After running this script
and before running sudoc2pm_pt2.pl:
modify "module".config file , as needed

modify *_spec to include bindings to directories


=head4 Examples:

perl sudoc2pm_pt1.pl

=head3 NOTES

 Program group array and the directory names:

lib/App/SeismicUnixGui/developer/code/sunix/sudoc2pm_pt2.pl  view on Meta::CPAN

=head1 DOCUMENTATION

=head2 SYNOPSIS

PROGRAM NAME:  sudoc2pm_pt2.pl							

 AUTHOR: Juan Lorenzo
 DATE:   Septmber 11, 2021 
 DESCRIPTION: update 
 			  spec-file to include correct
 			  bindings of the screen parameters 
 			  
 Version: 0.0.1

=head2 USE

=head3 NOTES

A *changes file in required

=head4 Examples

lib/App/SeismicUnixGui/developer/code/sunix/sunix_spec.pm  view on Meta::CPAN


sub _get_version_section {
 	my ($self) = @_;
	my @head;
 	$head[0] = ("our \$VERSION = '0.0.1';\n");

 	return (\@head);
}


=head2  sub _sub_binding_index_aref

=cut

 sub _sub_binding_index_aref {
	my ($self) = @_;
	
	my @section;	
	my $package_name = $sunix_spec->{_package_name}; 
  
	$section[0] = '=head2  sub binding_index_aref'."\n\n".
	'=cut'."\n\n".
	' sub binding_index_aref {'."\n\n".
	"\t".'my $self 	= @_;'."\n\n".
	"\t".'my @index;'."\n\n".	
	"\t".'# e.g., first binding index (index=0)'."\n".
    "\t".'# connects to third item (index=2)'."\n".
    "\t".'# in the parameter list'."\n".
    "#\t".'$index[0] = 1; # inbound item is  bound '."\n".
	"#\t".'$index[1]	= 2; # inbound item is  bound'."\n".
	"#\t".'$index[2]	= 8; # outbound item is  bound'."\n\n".		
	"\t".'$'.$package_name.'_spec ->{_binding_index_aref} = \@index;'."\n".	
	"\t".'return();'."\n\n".
 	' }'."\n\n\n";
 
 	return(\@section);
		
 }
  
 
=head2  sub _sub_file_dialog_type_aref

=cut

 sub _sub_file_dialog_type_aref {
	my ($self) = @_;
	
	my @section;	
	my $package_name = $sunix_spec->{_package_name}; 
  
	$section[0] = '=head2  sub file_dialog_type_aref'."\n\n".
	'type of dialog (Data, Flow, SaveAs) is needed by binding'."\n".
	'one type of dialog for each index'."\n".
	'=cut'."\n\n".
	' sub file_dialog_type_aref {'."\n\n".
	"\t".'my $self 	= @_;'."\n\n".
	"\t".'my @type;'."\n\n".
	 "\t".'my $index_aref = get_binding_index_aref();'."\n".
	"\t".'my @index      = @$index_aref;'."\n\n".
	"\t".'# bound index will look for data'."\n".
	"\t".'$type[0]	= \'\';'."\n".
	"#\t".'$type[$index[0]] = $file_dialog_type->{_Data};'."\n".
	"#\t".'$type[$index[1]]	=  $file_dialog_type->{_Data};'."\n".
	"#\t".'$type[$index[2]]	=  $file_dialog_type->{_Data};'."\n\n".
	"\t".'$'.$package_name.'_spec ->{_file_dialog_type_aref} = \@type;'."\n".	
	"\t".'return();'."\n\n".
 	' }'."\n\n\n";
 

lib/App/SeismicUnixGui/developer/code/sunix/sunix_spec.pm  view on Meta::CPAN

	"\t".'$type[0]	= $flow_type->{_user_built};'."\n\n".
	"\t".'$'.$package_name.'_spec ->{_flow_type_aref} = \@type;'."\n".	
	"\t".'return();'."\n\n".
 	' }'."\n\n\n";
 
 	return(\@section);
		
 }


=head2  sub _sub_get_binding_length

=cut

 sub _sub_get_binding_length {
	my ($self) = @_;
	
	my @section;	
	my $package_name = $sunix_spec->{_package_name};
	
	$section[0] = '=head2 sub get_binding_length'."\n\n".
	'=cut'."\n\n".
	' sub get_binding_length{'."\n\n".
	"\t".'my $self 	= @_;'."\n\n".	
	"\t".'if ($'.$package_name.'_spec->{_binding_index_aref} ) {'."\n\n".
	"\t\t".'my $binding_length= scalar @{$'.$package_name.'_spec->{_binding_index_aref}};'."\n".
	"\t\t".'return($binding_length);'."\n\n".		
	"\t".'} else {'."\n".
	"\t\t".'print("'.$package_name.'_spec, get_binding_length, missing binding_length\n");'."\n".
	"\t\t".'return();'."\n".
	"\t".'}'."\n\n".
	"\t".'return();'."\n".
 	' }'."\n\n\n";
 
 	return(\@section);
		
 }   
 
 

lib/App/SeismicUnixGui/developer/code/sunix/sunix_spec.pm  view on Meta::CPAN

	"\t\t".'return();'."\n".
	"\t".'}'."\n\n".
	"\t".'return();'."\n".
 	' }'."\n\n\n";
 
 	return(\@section);
		
 }  


=head2 sub sub_get_binding_index_aref

=cut
 
 sub _sub_get_binding_index_aref {
	my ($self) = @_;
	
	my @section;	
	my $package_name = $sunix_spec->{_package_name};
	
	$section[0] = '=head2 sub get_binding_index_aref'."\n\n".
	'=cut'."\n\n".
	' sub get_binding_index_aref{'."\n\n".
	"\t".'my $self 	= @_;'."\n".
	"\t".'my @index;'."\n\n".	
	"\t".'if ($'.$package_name.'_spec->{_binding_index_aref} ) {'."\n\n".
	"\t\t".'my $index_aref = $'.$package_name.'_spec->{_binding_index_aref};'."\n".
	"\t\t".'return($index_aref);'."\n\n".		
	"\t".'} else {'."\n".
	"\t\t".'print("'.$package_name.'_spec, get_binding_index_aref, missing binding_index_aref\n");'."\n".
	"\t\t".'return();'."\n".
	"\t".'}'."\n\n".
	"\t".'my $index_aref = $'.$package_name.'_spec->{_binding_index_aref};'."\n".
 	' }'."\n\n\n";
 
 	return(\@section);
		
 }
 
 
 sub _sub_get_flow_type_aref {
	my ($self) = @_;
	

lib/App/SeismicUnixGui/developer/code/sunix/sunix_spec.pm  view on Meta::CPAN

	'sections of an output Poop flow.'."\n\n".
	'prefixes and suffixes to parameter labels'."\n".
	'are filtered by sunix_pl'."\n\n".	
	'=cut'."\n\n".
	' sub prefix_aref {'."\n\n".
	"\t".'my $self 	= @_;'."\n\n".
	"\t".'my @prefix;'."\n\n".
	"\t".'for (my $i=0; $i < $max_index; $i++) {'."\n\n".
	"\t\t".'$prefix[$i]	= $empty_string;'."\n\n".
	"\t".'}'."\n\n".
	"#\t".'my $index_aref = get_binding_index_aref();'."\n".	
	"#\t".'my @index       = @$index_aref;'."\n\n".
	"\t".'# label 2 in GUI is input xx_file and needs a home directory'."\n".
	"#\t".'$prefix[ $index[0] ] = \'$DATA_SEISMIC_BIN\' . ".\'/\'.";' ."\n\n".
	"\t".'# label 3 in GUI is input yy_file and needs a home directory'."\n".
	"#\t".'$prefix[ $index[1] ] = \'$DATA_SEISMIC_TXT\' . ".\'/\'.";' ."\n\n".	
	"\t".'# label 9 in GUI is input zz_file and needs a home directory'."\n".
	"#\t".'$prefix[ $index[2] ] = \'$DATA_SEISMIC_SU\' . ".\'/\'.";' ."\n\n".	
	"\t".'$'.$package_name.'_spec ->{_prefix_aref} = \@prefix;'."\n".	
	"\t".'return();'."\n\n".
 	' }'."\n\n\n";

lib/App/SeismicUnixGui/developer/code/sunix/sunix_spec.pm  view on Meta::CPAN

	$section[0] = '=head2  sub suffix_aref'."\n\n".
	'Initialize suffixes as empty'."\n".
	'values'."\n\n".
	'=cut'."\n\n".
	' sub suffix_aref {'."\n\n".
	"\t".'my $self 	= @_;'."\n\n".
	"\t".'my @suffix;'."\n\n".
	"\t".'for (my $i=0; $i < $max_index; $i++) {'."\n\n".
	"\t\t".'$suffix[$i]	= $empty_string;'."\n\n".
	"\t".'}'."\n\n".
	"#\t".'my $index_aref = get_binding_index_aref();'."\n".	
	"#\t".'my @index       = @$index_aref;'."\n\n".
	"\t".'# label 2 in GUI is input xx_file and needs a home directory'."\n".
	"#\t".'$suffix[ $index[0] ] = \'\'.\'\' . \'$suffix_bin\';'."\n\n".
	"\t".'# label 3 in GUI is input yy_file and needs a home directory'."\n".
	"#\t".'$suffix[ $index[1] ] = \'\'.\'\' . \'$suffix_bin\';'."\n\n".
	"\t".'# label 9 in GUI is output zz_file and needs a home directory'."\n".
	"#\t".'$suffix[ $index[2] ] = \'\'.\'\' . \'$suffix_su\';'."\n\n".
	"\t".'$'.$package_name.'_spec ->{_suffix_aref} = \@suffix;'."\n".	
	"\t".'return();'."\n\n".
 	' }'."\n\n\n";

lib/App/SeismicUnixGui/developer/code/sunix/sunix_spec.pm  view on Meta::CPAN

#	my $hash_ref = $sunix_spec;
#	return ($hash_ref);
#}

  
#    my @file_dialog 		= @{_sub_file_dialog_type_aref()}; 
#    my @get_max_index		= @{_sub_get_max_index()}; 
#    my @get_file_dialog 	= @{_sub_get_file_dialog_type_aref()};
#    my @flow_type			= @{_sub_flow_type_aref()};
#    my @get_flow_type		= @{_sub_get_flow_type_aref()};
#    my @get_binding_length 	= @{_subget_binding_length()};
#    my @variables			= @{_sub_variables()};


=head2 sub get_body_section

 a small section of the file
 print ("sunix_package_header,section:name $name\n");

=cut

sub get_body_section {
 	my ($self) = @_;
	my @head;
	my $package_name;
	$package_name = $sunix_spec->{_package_name};
	
    $head[0]    = '	my $'.$package_name.'_spec'.' = {'."\n";
    $head[1]    = '		_CONFIG		            => $PL_SEISMIC,'."\n";
    $head[2]    = '		_DATA_DIR_IN		    => $DATA_SEISMIC_BIN,'."\n";
    $head[3]    = '	 	_DATA_DIR_OUT		    => $DATA_SEISMIC_SU,'."\n";
    $head[4]    = '		_binding_index_aref	    => \'\','."\n";
    $head[5]    = '	 	_suffix_type_in			=> $su,'."\n";
    $head[6]    = '		_data_suffix_in			=> $suffix_su,'."\n";
    $head[7]    = '		_suffix_type_out		=> $su,'."\n";
    $head[8]    = '	 	_data_suffix_out		=> $suffix_su,'."\n";
 	$head[9]    = '		_file_dialog_type_aref	=> \'\','."\n";
	$head[10]    = '		_flow_type_aref			=> \'\','."\n";		
    $head[11]   = '	 	_has_infile				=> $true,'."\n";
    $head[12]   = '	 	_has_outpar				=> $false,'."\n";	   
    $head[13]   = '	 	_has_pipe_in			=> $true,	'."\n";
    $head[14]    = '	 	_has_pipe_out           => $true,'."\n";	 

lib/App/SeismicUnixGui/developer/code/sunix/sunix_spec.pm  view on Meta::CPAN


=cut

sub get_subroutine_section {
 	my ($self,$name) = @_;
	my @head;
	
	my $package_name;
	$package_name 			= $sunix_spec->{_package_name} ;
		
 	my @binding 			= @{_sub_binding_index_aref()};	
	my @file_dialog 		= @{_sub_file_dialog_type_aref()}; 
    my @flow_type			= @{_sub_flow_type_aref()};  
    my @get_binding 		= @{_sub_get_binding_index_aref()};
    my @get_binding_length 	= @{_sub_get_binding_length()};
    my @get_file_dialog 	= @{_sub_get_file_dialog_type_aref()};    
    my @get_flow_type		= @{_sub_get_flow_type_aref()};
    my @get_incompatibles   = @{_sub_get_incompatibles()};
    my @get_prefix          = @{_sub_get_prefix_aref()};
    my @get_suffix          = @{_sub_get_suffix_aref()};    
    my @prefix          	= @{_sub_prefix_aref()}; 
    my @suffix          	= @{_sub_suffix_aref()};    
#    my @get_max_index		= @{_sub_get_max_index()}; 
#    my @variables			= @{_sub_variables()}; 
          
    $head[0]    = $binding[0];
    $head[1]    = $file_dialog[0];
	$head[2]	= $flow_type[0];
    $head[3]    = $get_binding[0];
	$head[4]    = $get_binding_length[0];
    $head[5]    = $get_file_dialog[0]; 
    $head[6]    = $get_flow_type[0];
    $head[7]    = $get_incompatibles[0];
    $head[8]    = $get_prefix[0];
    $head[9]    = $get_suffix[0];   
 	$head[10]   = $prefix[0];
  	$head[11]   = $suffix[0];   
#    $head[3]    = $get_max_index[0];
#    $head[5]    = $flow_type[0];
#    $head[8]    = $variables[0];        

lib/App/SeismicUnixGui/developer/code/sunix/update.pm  view on Meta::CPAN


=cut

my $update = {
	_directory                   => '',
	_program_name                => '',
	_spec_changes_base_file_name => '',
	_spec_label_number_aref      => '',
	_spec_suffix_type_aref       => '',
	_group_number                => '',
	_start_binding_index_line    => '',
	_end_binding_index_line      => '',
	_start_file_dialog_type_line => '',
	_end_file_dialog_type_line   => '',
	_start_prefix_line           => '',
	_end_prefix_line             => '',
	_start_suffix_line           => '',
	_end_suffix_line             => '',
};

=head2 Import packages

lib/App/SeismicUnixGui/developer/code/sunix/update.pm  view on Meta::CPAN

sub clear {

	my ($self) = @_;

	$update->{_directory}                   = '';
	$update->{_program_name}                = '';
	$update->{_spec_changes_base_file_name} = '';
	$update->{_spec_label_number_aref}      = '';
	$update->{_spec_suffix_type_aref}       = '';
	$update->{_group_number}                = '';
	$update->{_start_binding_index_line}    = '';
	$update->{_end_binding_index_line}      = '';
	$update->{_start_file_dialog_type_line} = '';
	$update->{_end_file_dialog_type_line}   = '';
	$update->{_start_prefix_line}           = '';
	$update->{_end_prefix_line}             = '';
	$update->{_start_suffix_line}           = '';
	$update->{_end_suffix_line}             = '';

}

=head2 sub _get_spec_changes

lib/App/SeismicUnixGui/developer/code/sunix/update.pm  view on Meta::CPAN

		my $group_number = $update->{_group_number};
		$prog_doc2pm->set_group_directory($group_number);
		$path_in4specs[0] = $prog_doc2pm->get_path_out4specs();

=head2 define

search lines

=cut

		my ( $start_binding_index_line,    $end_binding_index_line );
		my ( $start_file_dialog_type_line, $end_file_dialog_type_line );
		my ( $start_prefix_line,           $end_prefix_line );
		my ( $start_suffix_line,           $end_suffix_line );

		my $start_binding_index_line2find = '# e.g., first binding index \(index=0\)';
		my $end_binding_index_line2find   = '= 8; # outbound item is  bound';
		my $end_file_dialog_type_line2find =
		  '#	\$type\[\$index\[2\]\]	=  \$file_dialog_type->\{_Data\};';
		my $start_file_dialog_type_line2find =
		  '# bound index will look for data';
		my $start_prefix_line2find = 'sub prefix_aref \{';
		my $end_prefix_line2find =
		  '\t# label 9 in GUI is input zz_file and needs a home directory';
		my $end_suffix_line2find =
		  '#	\$suffix\[ \$index\[2\] \] = \'\'.\'\' . \'\$suffix_su\';';
		my $start_suffix_line2find = 'sub suffix_aref \{';

lib/App/SeismicUnixGui/developer/code/sunix/update.pm  view on Meta::CPAN

my $additional_suffix_change  	=

=cut

		for ( my $i = 0 ; $i < $length_of_slurp ; $i++ ) {

#			print("update,All sunix documentation $slurp[$i]\n");

			my $string = $slurp[$i];

			if ( $string =~ /$start_binding_index_line2find/ ) {

				$start_binding_index_line = $i + 4;

   #		 		print("update,
   #		 a spec success at start_binding_index_line: $start_binding_index_line \n"
   #		 				);
			}

			if ( $string =~ /$end_binding_index_line2find/ ) {

				$end_binding_index_line = $i + 3;

   #	   		 				print("update,
   #	   		 a spec success at end_binding_index_line: $end_binding_index_line \n"
   #	   		 				);
			}

			if ( $string =~ /$start_file_dialog_type_line2find/ ) {

				$start_file_dialog_type_line = $i + 2;

#				print(
#"update, a spec success at start_file_dialog_type_line:$start_file_dialog_type_line \n"
#				);

lib/App/SeismicUnixGui/developer/code/sunix/update.pm  view on Meta::CPAN


				$end_suffix_line = $i + 3;

				print(
"update, a spec success at end_suffix_line:$end_suffix_line \n"
				);
			}
		}

		my @result = (
			$start_binding_index_line,    $end_binding_index_line,
			$start_file_dialog_type_line, $end_file_dialog_type_line,
			$start_prefix_line,           $start_suffix_line,
			$end_suffix_line,             $end_prefix_line
		);

		$update->{_start_binding_index_line}    = $start_binding_index_line;
		$update->{_end_binding_index_line}      = $end_binding_index_line;
		$update->{_start_file_dialog_type_line} = $start_file_dialog_type_line;
		$update->{_end_file_dialog_type_line}   = $end_file_dialog_type_line;
		$update->{_start_prefix_line}           = $start_prefix_line;
		$update->{_start_suffix_line}           = $start_suffix_line;
		$update->{_end_suffix_line}             = $end_suffix_line;
		$update->{_end_prefix_line}             = $end_prefix_line;

		return ();

	}

lib/App/SeismicUnixGui/developer/code/sunix/update.pm  view on Meta::CPAN


sub spec_changes {

	my ($self) = @_;

	my $changes_aref = _get_spec_changes();

	if (    length $update->{_program_name} && length $update->{_group_number}
		and length $update->{_spec_changes_base_file_name}
		and length $changes_aref
		and length $update->{_start_binding_index_line}
		and length $update->{_start_prefix_line}
		and length $update->{_start_suffix_line}
		and length $update->{_end_suffix_line}
		and length $update->{_end_prefix_line} )

	{

		my $sudoc       = sudoc->new();
		my $prog_doc2pm = prog_doc2pm->new();
		my ( @path_in4specs, @path_out4specs );

lib/App/SeismicUnixGui/developer/code/sunix/update.pm  view on Meta::CPAN

		my @changes                    = @$changes_aref;
		my $prefix_spec_aref           = $changes[1];
		my $suffix_spec_aref           = $changes[0];
		my $label_number_aref          = $changes[2];
		my @label                      = @$label_number_aref;
		my $label_number_of            = scalar @$label_number_aref;
		my @suffix_spec                = @$suffix_spec_aref;
		my @prefix_spec                = @$prefix_spec_aref;
		my $line_bump_suffix           = 0;
		my $line_bump_prefix           = 0;
		my $line_bump_binding_index    = 0;
		my $line_bump_file_dialog_type = 0;
		my $new_length_of_slurp;

		my ( @temp_array_suffix,        @temp_array_prefix );
		my ( @temp_array_binding_index, @temp_array_file_dialog_type );

		my $temp_array_length_suffix;
		my $temp_array_length_prefix;
		my $temp_array_length_binding_index;
		my $temp_array_length_file_dialog_type;

		#		print("update, spec_changes, suffix_spec:@$suffix_spec_aref\n");
		print("update, spec_changes, prefix_spec:@$prefix_spec_aref\n");
		print("update, spec_changes, label_number: @$label_number_aref\n");
		print("update, spec_changes, label_number_of: $label_number_of\n");

=head2 Reading in package file (
 "program"_spec.pm)

lib/App/SeismicUnixGui/developer/code/sunix/update.pm  view on Meta::CPAN


		#		print("update,spec_changes, temp_array = @temp_array\n");

=head2  overwrite or add new lines

to suffix_aref

=cut

		$slurp[ ($start_suffix_line) ] =
		  ("\tmy \$index_aref = get_binding_index_aref();");
		$slurp[ ( $start_suffix_line + 1 ) ] =
		  ("\tmy \@index       = \@\$index_aref;");

		# recursively modify *_spec.pm file
		for ( my $i = 0 ; $i < $label_number_of ; $i++ ) {

			#			print("label_number=$label[$i]\n");

			$slurp[ ( $start_suffix_line + ( ( $i + 1 ) * 3 ) ) ] =
			  (

lib/App/SeismicUnixGui/developer/code/sunix/update.pm  view on Meta::CPAN

		$temp_array_length_prefix = $new_length_of_slurp - $end_prefix_line;

#		print("update,spec_changes, new_length_of_slurp   = $new_length_of_slurp\n");
#		print("update,spec_changes, prefix_aref temp_array_length_prefix = $temp_array_length_prefix\n");
		@temp_array_prefix[ 0 .. ( $temp_array_length_prefix - 1 ) ] =
		  @slurp[ $end_prefix_line .. $new_length_of_slurp ];

	  #		print("update,spec_changes, temp_array_prefix = @temp_array_prefix\n");

		$slurp[ ($start_prefix_line) ] =
		  ("\tmy \$index_aref = get_binding_index_aref();");
		$slurp[ ( $start_prefix_line + 1 ) ] =
		  ("\tmy \@index       = \@\$index_aref;");

		# recursively modify *_spec.pm file
		for ( my $i = 0 ; $i < $label_number_of ; $i++ ) {

		   #			print("update, spec_changes, L 1365, label_number=$label[$i]\n");

			$slurp[ ( $start_prefix_line + ( ( $i + 1 ) * 3 ) ) ] =
			  (

lib/App/SeismicUnixGui/developer/code/sunix/update.pm  view on Meta::CPAN

		else {
			print(
"update, spec_changes, for file_dialog_type_aref unexpected value \n"
			);
		}

#################################################################################

=head2 add to

sub binding_index_aref lines in *_spec.pm file

=cut

		my $start_binding_index_line = $update->{_start_binding_index_line};
		my $end_binding_index_line   = $update->{_end_binding_index_line};

		print(
"update, spec_changes, start_binding_index_line =$update->{_start_binding_index_line}\n"
		);

		print(
"update, spec_changes, end_binding_index_line =$update->{_end_binding_index_line}\n"
		);

=head2 Add lines to

binding_index_aref lines in *_spec.pm file
Intentionally start from the end of the *.spec file

=cut

		$start_binding_index_line = $update->{_start_binding_index_line} - 1;
		$end_binding_index_line   = $update->{_end_binding_index_line} - 1;

=head2 save latter portion for addendum

to binding_index_aref

If file_dialog_type does not have more than 3 entries the line_bump_* = 0

=cut

		$new_length_of_slurp =
		  $length_of_slurp +
		  $line_bump_suffix +
		  $line_bump_prefix +
		  $line_bump_file_dialog_type;

		$temp_array_length_binding_index =
		  $new_length_of_slurp - $end_binding_index_line;
		print(
"update,spec_changes, new_length_of_slurp   = $new_length_of_slurp\n"
		);
		print(
"update,spec_changes, binding_index_aref temp_array_length_binding_index = $temp_array_length_binding_index\n"
		);
		@temp_array_binding_index[ 0 .. ( $temp_array_length_binding_index - 1 )
		] = @slurp[ $end_binding_index_line .. $new_length_of_slurp ];

#		print("update,spec_changes, temp_array_binding_index = @temp_array_binding_index\n");

		# recursively modify *_spec.pm file
		for ( my $i = 0 ; $i < $label_number_of ; $i++ ) {

		  #				print("update, spec_changes, L 1591, label_number=$label[$i]\n");
			my $index_out = $label[$i] - 1;
			$slurp[ ( $start_binding_index_line + $i ) ] =
			  ("\t\$index[$i] = $index_out; # inbound/outbound item is bound");
		}

=head2 Add saved text lines

to binding_index_aref
if we have more than 4 input/output interactions 

=cut			

		if ( $label_number_of > 4 ) {

			$line_bump_binding_index = ( $label_number_of - 4 );

			my $new_length_of_slurp =
			  $length_of_slurp +
			  $line_bump_suffix +
			  $line_bump_prefix +
			  $line_bump_file_dialog_type +
			  $line_bump_binding_index;

			my $new_end_binding_index_line =
			  $end_binding_index_line + $line_bump_binding_index + 1;

			print(
"update, spec_changes,new_length_of_slurp, binding_index_aref=$new_length_of_slurp\n"
			);
			print(
"update, spec_changes,new_end_binding_index_line= $new_end_binding_index_line\n"
			);

			@slurp[ ( $new_end_binding_index_line - 1 )
			  .. ( $new_length_of_slurp - 1 ) ] =
			  @temp_array_binding_index[ 0 .. (
				  $temp_array_length_binding_index - 1 ) ];
		}
		elsif ( $label_number_of <= 4 ) {

			#               NADA;
		}
		else {
			print(
"update, spec_changes, for binding_index_aref unexpected value \n"
			);
		}

#################################################################################

=head2 write out

updated spec file

=cut

lib/App/SeismicUnixGui/developer/code/sunix/update.pm  view on Meta::CPAN

	}
	else {
		print("update,spec_changes, a needed variable is missing\n");
		print("update,spec_changes,program_name=$update->{_program_name}\n");
		print("update,spec_changes,group_number=$update->{_group_number}\n");
		print(
"update,spec_changes,spec_changes_base_file_name=$update->{_spec_changes_base_file_name}\n"
		);
		print("update,spec_changes,$changes_aref=changes_aref\n");
		print(
"update,spec_changes,start_binding_index_line=$update->{_start_binding_index_line}\n"
		);
		print(
"update,spec_changes,start_prefix_line=$update->{_start_prefix_line}\n"
		);
		print(
"update,spec_changes,start_suffix_line=$update->{_start_suffix_line}\n"
		);
		print(
			"update,spec_changes,end_suffix_line=$update->{_end_suffix_line}\n"
		);

lib/App/SeismicUnixGui/doc/FAQ_SeismicUnixGui  view on Meta::CPAN

There are two sets of dialogs for interacting with files and directories.

The "Run" and "Save" have their OWN logic-separated paths:
	L_SU, run_button and L_SU, save_button
for superflows versus user-built flows, including parameter_widgets etc.

The SaveAs and Data and Flow buttons have their own logic path through 

L_SU, FileDialog_button

If there are superflow bindings for opening data files, then these use 
	L_SU, pre_built_superflows,
 			pre_built_big_stream->select( )
 			_FileDialog_button,
 			pre_built_big_stream,select,binding->set() (where actual binding takes place!)
 			
 			sub _FileDialog {
 			
In file_dialog,
       iFile->get_Path gets directory path binding uses.

BINDINGS-for DEVELOPERS
User-built programs containing bindings (e.g., MB3) (e.g.,those that use sunix programs) 
sunix programs use _FileDialog_button to find files. 
 	'color'_flow
		_FileDialog_button module lies within each of the 'colored' flows: e.g. grey_flow.pm, pink_flow.pm, etc.
		The type of files that can be opened are (1) user_built flows {_Flow}, 
		2) data files e.g. su, binary, par, and plain text files {_Data} [_Data_PL_SEISMIC}
		and (3) pre_built superflows and directories {_Path}
		
Q. For a sunix program with a binding how does the FileDialog get activated?
 
 Individual programs can have bindings, e.g. segyread has the file|tape option
 bound to automatically open the directories that contain segy files 
 (See Project_config.pm for a 
 full description of the many pre-defined directory locations)
 
 Q. What are the differences between the Save methods between user-built flows and superflows
 A. Superflows use L_SU->save_button
 A. user-built flows use color_flow.pm->save_button
 
     The sequence of programs during a 'Save' is as follows:
 
      main
       L_SU
       color_flow.pm->save_button
 
 Q. What are MB1 bindings for colored listboxes?
 Q. How are colored flow listboxes selected?
 Q. how do I select a colored flow listbox?
 
 When MB1 is clicked over a colored listbox flow (grey, pink, green or blue)
  then that colored flow is selected;
 e.g. 	L_SUV0.X.C,_L_SU_flow_bindings(color,flow_select); 
 		            L_SU->user_built_flows(flow_select), grey_flow->flow_select


Differences between the following packages:

whereami: temporarily establish the widget you are in
  and determine which condition you are using in a namespace 
  outside that of the main program
 
(inherited by gui_history)

lib/App/SeismicUnixGui/doc/FAQ_SeismicUnixGui  view on Meta::CPAN

		   
		     control, set_file_name, 
				remove_su_suffix4sref;  
					get_w_single _quotes(remove suffix, add single quotes);


Opening a Data file from within a superflow can follow two routes:

Route 1:  Directly from the GUI menu selection of "File/Data" (deprecated)

Route 2: Indirectly, via bindings defined in spec files:
	L_SU, _FileDialog_button (for MB3 bindings)
	
Superflow bindings use this subroutine exclusively:

binding, set 
    binding is called when the dialog type = Data and we are dealing with a superflow

How do we separate namespaces between pre-built superflow usage and user-built flows?

Some dialog widgets are used exclusively for superflows ( superflow selection) 
Other widgets are used exclusively for user-built flows (sunix selection,add2flow ), Flows and SaveAs

Color distinguishes regular user-built flows where sunix-selection is marked with a neutral color.

Some options have no color (Flow) but do have a flow-type assigned within LSU.

lib/App/SeismicUnixGui/doc/FAQ_SeismicUnixGui  view on Meta::CPAN

            "suwind",
            "supef",
            );
            
9. verify by adding to flow in L_SU

10. when the new module has an internal call for a data set, modify the *_spec.pm file

e.g., for segyread_spec.pm

sub binding_index_aref {

	my $self 	= @_;

	my @index;

	$index[0]	= 8;

	$segyread_spec ->{_binding_index_aref} = \@index;
	return();

 }


sub file_dialog_type_aref {

	my $self 	= @_;

	my @type;

lib/App/SeismicUnixGui/doc/FAQ_SeismicUnixGui  view on Meta::CPAN

	 	These changes are considered twice. First, when iFile (_get_DATA_DIR_IN) selects the opening directory
	 	for File_Dialog,
	 	 and  a second time, when the perl script  is being prepared to be written out: oop_prog_params
	 	
	 	See oop_
	 	
	 	
	 	2 previous are used by
	 	  			iFile,_get_DATA_DIR_IN
  					iFile,_get_DATA_DIR_OUT
		_binding_index_aref	    unused
	 	_data_type_in			data type by suffix
		_data_suffix_in			exact suffix used for files read by the program							
		_data_type_out			data type by suffix 
	 	_data_suffix_out		exact suffix used, e..g., '.su instead of only 'su'
	 	
	 	
	 	: for stdin/stdout and when this program is assembled with others 
	 	to form a flow
     	_file_dialog_type_aref	unused
     	_flow_type_aref			unused

lib/App/SeismicUnixGui/doc/FAQ_SeismicUnixGui  view on Meta::CPAN

	What program sets the directory as a function of the data type (format type) being used? e.g.m
	segy, text, su etc.:
	iFile
	
	What does iFile.pm or iFile do?
	
	A. iFile.pm->get_Data_path

Q. How does Project Tool update the gui parameter values?

1. When user makes a selection of a new file or folder via bindings
		
	 Superflow bindings use the private ('_') subroutine.
     Opening a file of folder for a superflow uses _FileDialog_button
     FileDialog_button is mainly used for user-built flows but directs superflows
	 to _FileDialog_button
	 
[	 binding to the dialog types for each MB3 click takes place within L_SU

  L_SU.pm	 
	 pre_built_superflows
   		# for binding to file dialog options
		my $sub_ref = \&_FileDialog_button;
		   $pre_built_big_stream->set_sub_ref($sub_ref);
		   $pre_built_big_stream->select();
		        binding->set (where binding actually takes place)  ]
		     
	  _FileDialog_button
 
 		file_dialog	
			FileDialog_director
			
			# collects the file name or folder and displays it				
			_pre_built_superflow_close_path
				
				param_widgets4pre_built_streams

lib/App/SeismicUnixGui/doc/FAQ_SeismicUnixGui  view on Meta::CPAN

	
Q. What else does iFile do?
	
	iFile sets the PATHS for data and programs used both in superflow parameters 
	and in user-built flows.
	
Q How does iFile get selected?

 For superflows:
L_SU
	# for binding to file dialog options
	my $sub_ref = \&_FileDialog_button;
    pre_built_big_stream->select();


 For user-built flows
 color_flow
	FileFialog_button
	  e.g., when file_dialog_type->{_Data}
	  
	  file_dialog,

lib/App/SeismicUnixGui/doc/FAQ_SeismicUnixGui  view on Meta::CPAN

					parse
						param_sunix
					
					# read in variables from the perl flow file
					sunix_pl
						get_good_sunix_params
	 	

	   
	   
What does binding do? 
	
	 sets the binding indices and data types BEFORE the programs are employed by any user,

	    
10-1-2018 
	How does the GUI know which directory to open when MB3 is clicked?
	Q. Where does binding take place for parameters of sunix programs within user-built flows
	
	 binding, set, reads program_name_spec->binding_index_aref
	       
      iFile defines what the directory is to search
	 
	 indices bound to the right mouse-button click are listed in program_name_spec->binding_index_aref
	 the input and output directores are defined in the hash 'variable'  which can be exported.
	 
	 Within each program_name_spec.pm file the following subroutines must be populated: 
	 
	 e.g., for suop2_spec.pm: sub binding_index_aref and sub file_dialog_type_aref :
	 
	 
=head2  sub file_dialog_type_aref

  The type of dialog (Data, Path, Flow, SaveAs) is needed during MB3 binding
  Use one type of dialog for each index
  
  'Flow' will go to PL_SEISMIC by default
  'Flow' creates a directory path on the parameter value in GUI (why -- TODO)
  
  'Data' will go to seismic su data by default or
  whatever the *_spec file defines the DATA_DIR_IN or DATA_DIR_OUT which could be,
  e.g. PL_SEISMIC
  'Data' does not create a directory path on the parameter value in GUI (why -- TODO)
  

lib/App/SeismicUnixGui/doc/FAQ_SeismicUnixGui  view on Meta::CPAN

	my @type;

	$type[0]	= $file_dialog_type->{_Data};
	$type[1]	= $file_dialog_type->{_Data};

	$suop2_spec ->{_file_dialog_type_aref} = \@type;
	return();
 
 } 

=head2  sub binding_index_aref

=cut

 sub binding_index_aref {

	my $self 	= @_;

	my @index;

	$index[0]	= 0;   # first item is bound to DATA_DIR_IN
					   # i.e. $file_dialog_type->{_Data}
	$index[1]	= 1;   # second item is bound to DATA_DIR_IN
					   # i.e. $file_dialog_type->{_Data}	
	$suop2_spec ->{_binding_index_aref} = \@index;
	return();

 }
 


 }
 
 Q. Where are _DATA_DIR_IN and DATA_DIR_OUT used?
 

lib/App/SeismicUnixGui/doc/FAQ_SeismicUnixGui  view on Meta::CPAN

          i/p 'ivpicks_old'.'_'.'sorted'
          o/p 'ivint_old'.'_'.$sufile_in[1].$suffix[3];

 3. generate a data file for plotting
          o/p 'plot'.'_'.'ivint_old'.'_'.$sufile_in[1].$suffix[3];
          
    iVA,icp_sorted2oldpicks
    iVpicks2par
    
    for user-built flows:
    Additional bindings are activated when a flow has more than one program .... at index=0 e.g.. sumute.pl
    mutiple flows cause programs parameters to repeat 
    
    Q In what sequence are the listboxes filled, starting from a completely empty listboxes?
    gray->pink->green->blue
    
    Q In what sequence are the listboxes filled, after all the listboxes are empty?
    Only grey listbox wil have its flow sequence completely replaced
    
     
    Q.Which program keeps track of the listbox currently in use?
    
    Q What is the sequence of modules that are run when an sunix program is called:
    
    param_sunix, 
    	defaults; e.g. in neutral_flow for examples
    		su_param, get; readfiles,configs
   
	 
	 Main
	  L_SU_sunix_bindings 
	  	( e.g., for xk, method=sunix_select, neutral=color, group=shell)	  	
	  	
	  	L_SU
	  		user_built_flows
	  			neutral_flow
	  				sunix_select
	  					param_sunix
	  						_defaults
	  						su_param ( sets which global library to use )
	  							developer ( sets the sub-program category)

lib/App/SeismicUnixGui/doc/FAQ_SeismicUnixGui  view on Meta::CPAN

 	Also create specs/immodpg_spec.pm for superflows
 	Update the values in the $immodpg.pm
 
 Also update config_superflows
     -> save
     
     
 Also update program_name definitions
 
 #########################################################################  
   Q. Inside each spec file, What does binding_index_aref ?
   
    Marks the index of the parameter value,
    visible in the GUI, that is bound to MB3
    e.g., 
   	first element in the binding array (= 0)
	connects to second item (=1) in the paramter list
	$index[0]	= 1;
	If there is one item that is bound via MB3 to some action,
	such as selection of a file or directory, this item
	is first in the array and has an index of 0.
	
	Q Inside each spec file, What does file_dialog_type_aref do?
	Indentifies the type of binding operation..
	which can be of 5 (?) types
	The type of dialog (Data, Path, Flow, SaveAs, ) is needed during MB3 binding
    Use one type of dialog for each index
  
	'Flow' will go to PL_SEISMIC by default
  
	'Data' will go to seismic su data by default
  
	'Path' searches for only a PATH
	
	'last_dir_in_path' searches for the last directory in PATH
	

lib/App/SeismicUnixGui/doc/FAQ_SeismicUnixGui  view on Meta::CPAN

	  	(decisions? TODO)
	  	pre_built_superflow
	  
	  			
	Q How to use the spec files for user-built flows and pre-built big streams 
	 NOTE Filedialog uses iFile for opening directories based on second entry label (ps, bin, segy, txt etc)
	  	  
	 For bound indices in programs (e.g. curve in suximage, or mpicks in suximage),
	 FileDialog also uses DATA_DIR_IN from the "spec" files for locating input files = DATA_SEISMIC_TXT
	 
	 Note that spec-file binding indices is used to determine which indices can have access to FileDialog
	 Once an index is determined the directory to be opened is in the hash value: _DATA_DIR_OUT
	 specific directories in the "spec" files are used to build perl files Setups
	 
	 For example, if file_dialog_type= Data, Data is informed by DATA_DIR_IN and DATA_DIR_OUT
	 
	 Non-standard uses:	
	 But, file_dialog_type= Data_PL_SEISMIC, is NOT informed by DATA_DIR_IN and DATA_DIR_OUT
		$file_dialog_type[0] = 'Data_PL_SEISMIC',

	

lib/App/SeismicUnixGui/doc/FAQ_SeismicUnixGui  view on Meta::CPAN

		The type of files that can be opened are 
		(1) user_built flows {_Flow}, 
		(2) data files e.g. su, binary, par, and plain text files {_Data}, and
		(3) pre_built superflows
		
		Q What is developer package?
		
Hard codes relative location of directories for configuration files, parameter files which are
not accessible via the PERL5LIB global variable or @INC array.

Q. What are the different "flow types" used to bind MB3 clicks 
when using the spec files:

   {_Data}  	...	open pre-existing data file
   {_Flow} 		...	open pre-existing user-built flow
   {_SaveAs} 	...	save a new user-built flow
   {_Save} 	    ...	re-save a user-built flow 
   {_Data_PL_SEISMIC} ... data file but inside  PL_SEISMIC directory
   {_Path}      ...	is a directory


  The type of dialog (Data, Path, Flow, SaveAs) is needed during MB3 binding
  Use one type of dialog for each index
  

  'Flow' will go only to to PL_SEISMIC
  'Flow' creates a directory path on the parameter value in GUI (why -- TODO)
  
    used by:
 	file_dialog
 		_user_built_flow_open_perl_file
 	

lib/App/SeismicUnixGui/doc/FAQ_SeismicUnixGui  view on Meta::CPAN

	 text  is usually                       txt
	 SEG-Y files is usually             sgy
	 Seismic Unix files is always    su
	 binary files								bin 
	 
	Extra:  "no extension" means go to the PL_SEISMIC directory to search for or deposit files
	 
	 
	 Q. How does L_SU know on which line to put a selected file name in the parameter list?
	  
	  (1) _spec files bind the index of the appropriate line in the list to a directory which will be openened.
	  TODO: A click in the first line always will take the user to a data directory 
	  
	  TODO: make ALL links via bindings
	  defined in *_spec files.
	  
	  (2) 
	  
	  Q. How do I add another default directory to be created when a new project is saved and run?
	  For examples a new directory call 'png' for image files of that type?
	  
	  Follow the examples:
	   in: ~/configs/big_streams/Project_config.pm   where all used and unused definitions are kept
	   and in in ~big_streams/SetProject.pl where we can see how some are implemented but others are

lib/App/SeismicUnixGui/doc/FAQ_SeismicUnixGui  view on Meta::CPAN

	 I also had to ALSO import new variables into the module:
	 
	~ L 6
	 use App::SeismicUnixGui::misc::SeismicUnix qw($su $suffix_su $bin $suffix_bin);
	  
	 ~L 21
	  my $DATA_SEISMIC_BIN= $Project->DATA_SEISMIC_BIN();    # output data directory
	   
	   
	   In the GUI for vel2stiff, there are many files (14) that have to be defined
	  by the user (using MB3). The MB3 callback are programmed as bindings.
	  Bindings are named within this same module (vel2stiff_specs.pm) for each
	  of the 14 files, in a method/subroutine:
	  sub binding_index_aref
	   e.g., ~L77:
	   $index[10] = 10;       # second item is bound to DATA_DIR_IN
	   
	  We also need to know for the purpose of the widget that allows the user to select
	  or name the file that the files to be opened contain "Data"
	  
	  sub file_dialog_type_aref
	  e.g., ~L110:
	  $type[10] = $file_dialog_type->{_Data};
	  

lib/App/SeismicUnixGui/doc/FAQ_SeismicUnixGui  view on Meta::CPAN

	  
	   A.  ~misc/L_SU_global_constants.pm
          ~ L. 442 
           In alphabetical order, include the program name within the following list :
  my @sunix_par_programs = ( "suplane", "susynlv", "unif2", "suea2df", "sufctanismod","sufdmod1", "sufdmod2" );
  
      
      Q. What happens if I just default type[0] to nothing, an empty string?       	
     A.      	$type[0] ='';  Is it a local text file?
     
       Q. What happens if I just default binding to $index[0]?       	
     A.      	TODO
     
      For bindings in the *_spec files
      The values within the @index array do not need to bear the same
      number as the index sequence itself, e.g.
      $index[22] = 24;
      $index[40] = 61;
      
     
      Q. Where does binding take place for parameters of sunix programs within user-built flows
      
       binding, set, reads program_name_spec->binding_index_aref
      iFile defines what the directory is to search
      
      Q. How are output file names selected when writing user-built scripts?
      
      files_LSU
      
      color_flow
      
         FileDialog
             file_dialog, get_perl_flow_name_in();

lib/App/SeismicUnixGui/doc/FAQ_SeismicUnixGui  view on Meta::CPAN

     always  searches for the default
     value of _DATA_DIR_IN
     CASE B: For stdin and stdout also use only _DATA_DIR_IN and _DATA_DIR_OUT
     CASE C: For additional directories when there are "internal" files required by the programs, 
     override directory names using $prefix values which are found in _spec files.        
     Note: flow_type from the *_spec files is not being used in L_SU ... TODO... ??     
     
     TODO: oop_declare_data_out and oop_declare_data_in have a lot of unneeded subs?      
     
     A2.For pre-built super flows
     If there are superflow bindings for opening data files, then these use 
	L_SU, pre_built_superflows,
 			pre_built_big_stream->select( )
 			_FileDialog_button,
 			pre_built_superflow,select,binding->set() (where actual binding takes place!)
 			
 			_pre_built_superflow_open_data_file uses iFile->get_data_path  is used to determine the correct data path (directory)
 			
 			[	 binding to the dialog types for each MB3 click takes place within:
L_SU	 
	 pre_built_superflows
   		# for binding to file dialog options
		my $sub_ref = \&_FileDialog_button;
		   $pre_built_big_stream->set_sub_ref($sub_ref);
		   $pre_built_big_stream->select();
		        binding->set (where binding actually takes place)  ]
		        
		        
sumedian filter for VSP (filters)
sueipol- eignevalue based polar filter (filters)
pahse inversion deconvolution


Q. How does project-selector run in general terms"?

	L_SU_project_selector.pl

lib/App/SeismicUnixGui/doc/FAQ_SeismicUnixGui  view on Meta::CPAN

     
     ctrlstrip, the "program group name" is "data" and all the "data" modules 
     will be found in $SeismicUnixGui/sunix/data
      
      e.g.,  $SeismicUnixGui/sunix/data/ctrlstrip.pm
  
    This is possible because for any Seismic Unix program selected, 
  	the following sequence of instructions are enacted:
  	
  	   in main
  	     _L_SU_sunix_bindings, which
  	     
  	        stores group name, e.g., data or transform or migration, etc.
  	        $gui_history->set_sunix_prog_group($prog_group);
  	        
  	        stores which colored flow chart is being selected:
			$gui_history->set_sunix_prog_group_color($color);
			
			stores which button is being selected. The "$button"
			will have either a value of "sunix_select" if MB1 is clicked
			or "get_help" if MB3 is clicked.

lib/App/SeismicUnixGui/doc/FAQ_SeismicUnixGui  view on Meta::CPAN

			
			provides all the gui information to the module L_SU in a hash
		    $L_SU->set_hash_ref($main_href);
		    
		    provides user-built-flows the type of method being used, e.g. is it
		    just a selection (MB1) of a program or we looking for help (MB3) on this module
			$L_SU->user_built_flows($method);
  
  e.g., 

	$sunix_data_programs_listbox->bind(
		'<3>' => [ \&_L_SU_sunix_bindings, 'get_help', 'neutral', 'data' ]    #TODO return to 'neutral'
	);
	
	
Q. How is the help accessed, i.e. reading the program comments written in the 
    pod markup language, within a module?

A.  Following on from the previous questions, if MB3 selected,

     L_SU
       user_built_flows

lib/App/SeismicUnixGui/doc/FAQ_SeismicUnixGui  view on Meta::CPAN

  
  When we open a new sunix program, the param_widgets are updated
  But if we reselect an open color flow the param_widgets
  are reoccupied by what was stored in color_href. In this manner we
  can minimize memory usage for param_widgets
  
  Q. When I select a superflow or big stream, what are some of the subs are used?
  
    L_SU.pm	 
	 pre_built_superflows
   		# for binding to file dialog options
		my $sub_ref = \&_FileDialog_button;
		   $pre_built_big_stream->set_sub_ref($sub_ref);
		   $pre_built_big_stream->select();
		   
		   
   Q. What do the different names in superflows/Tools/pre-built flows/big streams mean?
   
   While using L_SU_global_constants.pm:
   
   CASE of    $alias_superflow_names_h,       (used by sub alias_superflow_names_h),

lib/App/SeismicUnixGui/fortran/src/immodpg.for  view on Meta::CPAN

500     format(' 1-  VTOP = ',f7.5,',            2-  VBOT = ',f7.5,' (km
     +/s)')
502     format(' 3-  DZ   = ',f7.5,' (km)',',       4-  VTOP and VBOT')
503     format(' 7-  Increment = ',f7.5,' (km or km/s)')
504     format(' 9-  Clip for data,            10- DP = ',f9.6,
     +' (s/km)')
        end
        
      ! usleep.f90
      module posix
       use, intrinsic :: iso_c_binding, only: c_int, c_int32_t
       implicit none

       interface
        ! int usleep(useconds_t useconds)
        function c_usleep(useconds) bind(c, name='usleep')
         import :: c_int, c_int32_t
         integer(kind=c_int32_t), value :: useconds
          integer(kind=c_int)            :: c_usleep
        end function c_usleep
       end interface
      end module posix
       

lib/App/SeismicUnixGui/fortran/src/stdsleep.f  view on Meta::CPAN

      subroutine stdsleep
!program stdsleep
! uses unistd.h for Fortran standard compliant sleep.
! sleep() is a GNU extension, not standard Fortran.
      use, intrinsic:: iso_c_binding, only: c_int
      implicit none

      interface
      
       subroutine usleep(us) bind (C)
        import c_int
        integer(c_int), value :: us
       end subroutine usleep
       
      end interface



      integer(c_int), parameter :: us=500000

lib/App/SeismicUnixGui/misc/L_SU.pm  view on Meta::CPAN

	_my_dialogs_ans4ok     => $my_dialogs_ans4ok_default,

};

# print("1. init L_SU_gui->{_occupied_listbox} = @{$L_SU_gui->{_occupied_listbox_aref }}\n");
# print("1. init L_SU_gui->{_vacant_listbox} = @{$L_SU_gui->{_vacant_listbox_aref }}\n");

=head2

	Opening a file of folder for a superflow
	Only superflow bindings use this private (' _') subroutine.
	Superflows that are opening Data files from GUI are directed here
	
	FileDialog_button is mainly used for user-built flows 
	and directs superflows
	to _FileDialog_button
	
	For safety, place set_hash_ref first
	$$dialog_type_sref can be Data, Save or SaveAs
	
	print(" 43 L_SU,_FileDialog_button, dialog type: $L_SU_href->{_dialog_type}\n");

lib/App/SeismicUnixGui/misc/L_SU.pm  view on Meta::CPAN

	if ( length $dialog_type_sref ) {

		$L_SU_href->{_dialog_type} = $$dialog_type_sref;
		$file_dialog->set_hash_ref($L_SU_href);
		$file_dialog->FileDialog_director();
		$L_SU_href = $file_dialog->get_hash_ref();

	}
	else {
		print(
"L_SU, for superflows only, _FileDialog_button (binding),option type missing "
		);
	}
	return ();
}

=head2 sub _get_flow_color

=cut 

sub _get_flow_color {

lib/App/SeismicUnixGui/misc/L_SU.pm  view on Meta::CPAN

	# = neutral,  when superflow Data is chosen
##			$color_listbox->set_flow_listbox_color_reservation( _get_flow_color() );
##			my $reservation_color = $color_listbox->get_flow_listbox_color_reservation( );
		#
		if (   $L_SU_href->{_is_flow_listbox_grey_w}
			&& $color eq 'grey' )
		{    # for added certainty

			# CASE 3A
			# mark the neutral-colored flow as unused
			# helps bind flow parameters to the opening files

			$color_listbox->set_next_available_flow_listbox_color($color);
			my $which_color =
			  $color_listbox->get_next_available_flow_listbox_color();

#				print(
#               "CASE 3A L_SU, FileDialog_button, the next available listbox color is set as: $color\n"
#				);

#	            print("1.  L_SU,FileDialog_button, color is $L_SU_href->{_flow_color}\n");

lib/App/SeismicUnixGui/misc/L_SU.pm  view on Meta::CPAN

#					);

			}

		}
		elsif ($L_SU_href->{_is_flow_listbox_pink_w}
			&& $color eq 'pink' )
		{    # for added certainty
			 # CASE 3B - pink flow box
			 # mark the neutral-colored flow as unused
			 # helps bind flow parameters to the opening files

			$color_listbox->set_next_available_flow_listbox_color($color);
			my $which_color =
			  $color_listbox->get_next_available_flow_listbox_color();

#				print("CASE 3B _SU, FileDialog_button, the next available listbox color is set as: $color\n");
#	print("1.  L_SU,FileDialog_button, color is $L_SU_href->{_flow_color}\n");
#				print("CASE 3B 1.L_SU,FileDialog_button, $which_color will be occupied\n");

			# opens file and populates GUI

lib/App/SeismicUnixGui/misc/L_SU.pm  view on Meta::CPAN

#					);

			}

		}
		elsif ($L_SU_href->{_is_flow_listbox_green_w}
			&& $color eq 'green' )
		{    # more certainty
			 # CASE 3C - green flow box
			 # mark the neutral-colored flow as unused
			 # helps bind flow parameters to the opening files

			$color_listbox->set_next_available_flow_listbox_color($color);
			my $which_color =
			  $color_listbox->get_next_available_flow_listbox_color();

#				print("CASE 3C L_SU, _SU, FileDialog_button, the next available listbox color is set as: $color\n");;
#	            print("1.  L_SU,FileDialog_button, color is $L_SU_href->{_flow_color}\n");
#				print("CASE 3C 1.L_SU,FileDialog_button, $which_color will be occupied\n");
#
# opens file and populates GUI

lib/App/SeismicUnixGui/misc/L_SU.pm  view on Meta::CPAN

#						"Non-Successful read Case 3C L_SU,FileDialog_button, L_SU_gui->{_vacant_listbox_aref},@{$L_SU_gui->{_vacant_listbox_aref}}\n"
#					);
			}

		}
		elsif ($L_SU_href->{_is_flow_listbox_blue_w}
			&& $color eq 'blue' )
		{    # more certainty
			 # CASE 3D - blue flow box
			 # mark the neutral-colored flow as unused
			 # helps bind flow parameters to the opening files

			$color_listbox->set_next_available_flow_listbox_color($color);
			my $which_color =
			  $color_listbox->get_next_available_flow_listbox_color();

#	print("CASE 3D L_SU, FileDialog_button, the next available listbox color is set as: $color\n");
#	print("1.  L_SU,FileDialog_button, color is $L_SU_href->{_flow_color}\n");
#   print("CASE 3D 1.L_SU,FileDialog_button, $which_color will be occupied\n");

			# opens file and populates GUI

lib/App/SeismicUnixGui/misc/L_SU.pm  view on Meta::CPAN

     print("LSU_Tk,superflow_select,prog_name: ${$L_SU_href->{_prog_name_sref}}\n");
    array reference:
      print("LSU_Tk,superflow_select: _names_aref @{$L_SU_href->{_names_aref}}\n");
      sets flow type = pre-built superflow
      
      # print complete hash
 		while (my ( $key,$value ) = each %{$L_SU_href} ){
 			print ("$key \t\t=> $value\n");
 		}

 		 binding needs:
 		  	$pre_built_big_stream	->select(); 
			$pre_built_big_stream	->set_sub_ref
		$pre_built_big_stream	->set_flowNsuperflow_name_w  displays superflow name at top of gui 
			
	);

  	 	foreach my $key (sort keys %$L_SU_href) {
 		print (" file_dialog,key is $key, value is $L_SU_href->{$key}\n");
    			
=cut

lib/App/SeismicUnixGui/misc/L_SU.pm  view on Meta::CPAN

		$L_SU_href->{_prog_name_sref} = $superflow_name_sref;
		$gui_history->set_hash_ref($L_SU_href);
		$gui_history->set4superflow_open_data_file_start();
		$L_SU_href = $gui_history->get_hash_ref();
		$pre_built_big_stream->set_hash_ref($L_SU_href);

		# displays superflow name at top of gui
		$pre_built_big_stream->set_flowNsuperflow_name_w(
			$flowNsuperflow_name_w);

		# for binding to file dialog options
		my $sub_ref = \&_FileDialog_button;
		$pre_built_big_stream->set_sub_ref($sub_ref);

		# print("41 L_SU,pre_built_superflows, gui_history.txt\n");
		# $gui_history->view();

		# display parameters values and names
		# of a chosen superflow
		# but do not write them to a file
		$pre_built_big_stream->select();

lib/App/SeismicUnixGui/misc/L_SU.pm  view on Meta::CPAN

 sunix_listbox get_help (MB3)
 flow-item selection ('flow_select') (MB1)

if neutral-colored stored parameters exist
they have to be transferred from 
neutral_flow to either grey, pink, green, or blue, _flow
 		 			
displays superflow name at top of gui
 		$pre_built_big_stream	->set_flowNsuperflow_name_w($flowNsuperflow_name_w);	

needed for binding to file dialog options
 		$grey_flow	->set_sub_ref(\&_FileDialog_button);
 		
Display of all the parameters and names occurs via select method
 		$pre_built_big_stream	->select();  
 		
return changes to $L_SU_href without altering other original values
 		$L_SU_href 					= $pre_built_big_stream->get_hash_ref();	
 			
 listbox color is selected, e.g., with a MB1 click in Main

lib/App/SeismicUnixGui/misc/L_SU.pm  view on Meta::CPAN

			# This module is used by delete_from_flow_button,
			# and delete_whole_flow_button, which
			# deletes the whole flow completely
			# e.g., when deleting the last item in a flow
			# or deleting the whole flow at once
			# This option is also used for moving item up or down a flow

			if ( @{ $L_SU_gui->{_occupied_listbox_aref} }[0] == $true ) {

				# flow already exists
				# bind flow parameters to the opening files
				$grey_flow->set_hash_ref($L_SU_href);
				$grey_flow->set_occupied_listbox_aref(
					$L_SU_gui->{_occupied_listbox_aref} );
				$grey_flow->set_vacant_listbox_aref(
					$L_SU_gui->{_vacant_listbox_aref} );

				if ( $method eq 'flow_select' ) {

					my $prior_flow_color =
					  ( $L_SU_href->{_flow_select_color_href} )->{_prior};

lib/App/SeismicUnixGui/misc/L_SU.pm  view on Meta::CPAN

			# e.g., when deleting the last item in a flow
			# or deleting the whole flow at once
			# Also used for moving item up or down a flow
			# Dealing with the pink flow
			# Is pink flow listbox occupied ?
			# Skip the listbox if there is a flow already in it

			if ( @{ $L_SU_gui->{_occupied_listbox_aref} }[1] == $true ) {

				# flow already exists
				#  bind flow parameters to the opening files
				# This flow listbox color is available

				$pink_flow->set_hash_ref($L_SU_href);
				$pink_flow->set_occupied_listbox_aref(
					$L_SU_gui->{_occupied_listbox_aref} );
				$pink_flow->set_vacant_listbox_aref(
					$L_SU_gui->{_vacant_listbox_aref} );

#				print("L_SU, user_built_flows, pink, occupied listboxes are: @{$L_SU_gui->{_occupied_listbox_aref}}\n ");

lib/App/SeismicUnixGui/misc/binding.pm  view on Meta::CPAN

package App::SeismicUnixGui::misc::binding;

=head1 DOCUMENTATION

=head2 SYNOPSIS 

 PERL PROGRAM NAME: binding.pm 
 AUTHOR: Juan Lorenzo
 DATE: May 21 2018 

 DESCRIPTION: 
 
Create bindings
between values and buttons an actions
Make a binding based on the paramters
 inside the spec file for that progam
 (prog_name = $package)
 e.g. a package can be data_in_spec.pm
 $length is the number of bound Entry/Values widgets
 Each value or Entry widget is bound by MB3 to a
 FileDialog_button such as 'Data' = opening a data file
 The suffix type of file to open or save (e.g. *su or text or bin etc.
 ) also exists in the _spec file
 and can be used later (TODO)
 
 calls FileButton within this package
 otherwise well-encapsulated
     
 USED FOR: 

 BASED ON:

 NEEDS:

 for binding, we need to know 
 the program name
 the program.spec requirements
 connect bindings of a specific file to the 
 parameter wiudget value/Entry
 Not all programs have these bindings
 the bindig type may be for opening a data file
 or for saving a file
 or for plotting a file
 the binding has a data type:
 	package binding_superflows
 	package bindings_flows
 	set_program_name
 	set the widget handles locally
 	set values
 	set_labels
 	
 a_ref = get_binding_types  <ButtonRelease-3>
 a_ref = get_suffix_types     su / text
 a_ref = get_command names    open/save/view/plot etc.
 a_ref = get_command_settings 1,2,3,4  etc. or empty

=cut

=head2 Modules in use

=cut

lib/App/SeismicUnixGui/misc/binding.pm  view on Meta::CPAN

=head2 Declare local variables

=cut

my $empty_string = $var->{_empty_string};

=head2 private hash

=cut

my $binding = {
	_prog_name_sref => '',
	_sub_ref        => '',
	_values_w_aref  => '',
};

=head2 sub set_prog_name_sref

Know which _spec file to read for
behaviors
	
=cut

sub set_prog_name_sref {
	my ( $self, $name_sref ) = @_;

	if ($name_sref) {
		$binding->{_prog_name_sref} = $name_sref;

#		print("binding, set_prog_name_sref , ${$binding->{_prog_name_sref}}\n");

	}
	else {
		print("binding, set_prog_name_sref , missing name\n");
	}
	return ();
}

=head2 sub setFileDialog_button_sub_ref 

Set reference to a subroutine in upper levels 
i.e., L_SU, _FileDialog_button, 
that connects to the Filebutton for opening directories

=cut

sub setFileDialog_button_sub_ref {
	my ( $self, $sub_ref ) = @_;

	if ($sub_ref) {

		# print("binding  set_sub_ref, $sub_ref\n");
		$binding->{_sub_ref} = $sub_ref;

	}
	else {
		print("binding, set_FileDialog_button_sub_ref, missing sub ref\n");
	}

	return ();
}

=head2  sub set_values_w_aref

=cut

sub set_values_w_aref {
	my ( $self, $values_w_aref ) = @_;

	if ($values_w_aref) {
		$binding->{_values_w_aref} = $values_w_aref;

		#print("binding, set_values_w_aref, $binding->{_values_w_aref}\n");

	}
	else {
		print("binding, set_values_w_aref, missing values\n");
	}
	return ();
}

=head2  sub set 

Bring in a different module for each binding
each module has its own rules through *_spec.pm
as a program gets used.

superflow bindings for dial_type e.g., = Data
use _FileDialog_button, a method within L_SU

User-built programs (e.g., sunix programs)
which use dial_type = Data
use _FileDialog_button, a method within 
each grey_flow, pink_flow etc.

=cut

sub set {
	my ($self) = @_;

	my $program_name = ${ $binding->{_prog_name_sref} };
#	print("binding $program_name\n");
	$L_SU_path->set_program_name($program_name);

	my $pathNmodule_spec_w_slash_pm  = $L_SU_path->get_pathNmodule_spec_w_slash_pm();
	my $pathNmodule_spec_w_colon     = $L_SU_path->get_pathNmodule_spec_w_colon();

	require $pathNmodule_spec_w_slash_pm;

	# INSTANTIATE
	my $package = $pathNmodule_spec_w_colon->new();

	$package->binding_index_aref();
	$package->flow_type_aref();
	$package->file_dialog_type_aref();

	# Bind each entry: empty text for only the case of data_in (label) to MB3
	my $values_w_aref = $binding->{_values_w_aref};
	my @values_w      = @$values_w_aref;

	my $sub_ref 	  = $binding->{_sub_ref};

	my $binding_index_aref = $package->get_binding_index_aref();
	my @index              = @$binding_index_aref;
#	print("binding,set,file_dialog_type,indices for user-flows and big streams: @index\n");

	my $file_dialog_type_aref = $package->get_file_dialog_type_aref();
	my @file_dialog_type      = @$file_dialog_type_aref;

	# from *_spec.pm file,  belonging to either a pre_built_superflow,
	# or a user_built_flow

	my $length = $package->get_binding_length();

#	print("binding,set,file_dialog_type,length : $length\n");
	for ( my $i = 0 ; $i < $length ; $i++ ) {

		my $dial_type = $file_dialog_type[ $index[$i] ];

#				print("3A. binding,set,prog_name: ${$binding->{_prog_name_sref}}\n");
#			    print("3B. binding,set,file_dialog_type: $dial_type\n");
			    # print("3B. binding,set,file_dialog_type: i=$i\n");

		# ACTUAL binding takes place here...
		# TODO dynamic binding as a function of input from user in flow
		if ( length $dial_type ) {

			# print("binding,set,file_dialog_type: $dial_type at index=$i \n");
			# print("2. binding,set, no. bound items=$length\n");

			$values_w[ $index[$i] ]
			  ->bind( '<ButtonRelease-3>' => [ $sub_ref, \$dial_type ], );

   # sub_ref can be: "L_SU, _FileDialog_button" for superflows
   # sub_ref can be: "grey_flow, _FileDialog_button" for  a user-built flow that
   # lies in the grey list box

		}
		else {
			# print("4. binding,set, no bindings NADA\n");
		}
	}
}

1;

lib/App/SeismicUnixGui/misc/blue_flow.pm  view on Meta::CPAN


extends 'App::SeismicUnixGui::misc::gui_history' => { -version => 0.0.2 };
use aliased 'App::SeismicUnixGui::misc::gui_history';

use App::SeismicUnixGui::misc::param_widgets_blue '0.0.2';
use aliased 'App::SeismicUnixGui::misc::param_widgets_blue';

use App::SeismicUnixGui::misc::param_flow_blue '0.0.5';
use aliased 'App::SeismicUnixGui::misc::param_flow_blue';

use aliased 'App::SeismicUnixGui::misc::binding';

use App::SeismicUnixGui::misc::control '0.0.3';
use aliased 'App::SeismicUnixGui::misc::control';

use App::SeismicUnixGui::misc::decisions '1.0.0';
use aliased 'App::SeismicUnixGui::misc::decisions';

use aliased 'App::SeismicUnixGui::misc::dirs';
use aliased 'App::SeismicUnixGui::misc::file_dialog';
use aliased 'App::SeismicUnixGui::misc::files_LSU';

lib/App/SeismicUnixGui/misc/blue_flow.pm  view on Meta::CPAN


	# remove all sunix program names from the flow listbox
	# in "color"_flow namespace
	my $_flow_listbox_color_w = _get_flow_listbox_color_w();
	$flow_widgets->clear($_flow_listbox_color_w);

}

=head2 sub _FileDialog_button

Only cases with MB binding use this private ('_') subroutine
e.g., sunix programs displayed in the parameter boxes during
flow construction.
sub binding is responsible
Other cases that select the GUI file buttons directly (user click) use: FileDialog_button instead.
Once the file name is selected the parameter value is updated in the GUI

	 	 foreach my $key (sort keys %$color_flow) {
   			print (" color_flowkey is $key, value is $color_flow->{$key}\n");
  		}
  	print ("color_flow,_FileDialog_button(binding), _is_flow_listbox_color_w: $color_flow_href->{_is_flow_listbox_color_w} \n");
  	
=cut 

sub _FileDialog_button {

	my ( $self, $flow_dialog_type_sref ) = @_;

	if ($flow_dialog_type_sref) {

		# flow dialog type can be

lib/App/SeismicUnixGui/misc/blue_flow.pm  view on Meta::CPAN


# print("2. color_flow, _FileDialog_button, last_flow_index_touched $color_flow_href->{_last_flow_index_touched}\n");
# print("10. color_flow, _FileDialog_button, last_flow_color:$color_flow_href->{_last_flow_color}\n");
# Changes made with another instance of param_widgets (in file_dialog) will require
# that we update the namespace of the current param_flow
# We make this change inside _save_most_recent_param_flow
		_save_most_recent_param_flow();

	}
	else {
		print("color_flow,_FileDialog_button (binding),option type missing ");
	}
	return ();
}

=head2 sub _clear_items_version_aref 

	clear items_versions_aref
	used when last item is removed from the listbox

=cut

lib/App/SeismicUnixGui/misc/blue_flow.pm  view on Meta::CPAN


	$param_flow_color_pkg->clear_flow_items_version_aref();

}

=head2 sub _flow_select_director

Private alias for flow_select
both color and button are set as
per the flow_select called by an active click
from Main, in_L_SU_flow_bindings

=cut

sub _flow_select_director {

	my ($type) = @_;

	if ( defined $type ) {
		$gui_history->set_flow_select_color($this_color);

lib/App/SeismicUnixGui/misc/blue_flow.pm  view on Meta::CPAN


	$decisions->set_hash_ref($color_flow_href);

#	print("color_flow, flow_select2save_most_recent_param_flow, view stored flow parameters BEFORE update\n");
#	$param_flow_color_pkg->view_data();

	my $pre_req_ok = $decisions->get4flow_select();

	if ($pre_req_ok) {

		my $binding = binding->new();
		my $here;

		# consider previous flow-color changes
		# unticked strings from GUI are corrected within
		_updateNsave_most_recent_param_flow();

#	print("color_flow, flow_select2save_most_recent_param_flow, view stored flow parameters AFTER update\n");
#	$param_flow_color_pkg->view_data();

#					print(

lib/App/SeismicUnixGui/misc/blue_flow.pm  view on Meta::CPAN

			$param_widgets->redisplay_check_buttons();
			$param_widgets->set_entry_change_status($false);

	   # unxpectedly  Entry focus is delayed until the end of this method before
	   # completion;
	   # that is we get to gui_history->view before we can update the focus
	   # mysterious!!!!!
			$param_widgets->set_focus_on_Entry_w(0)
			  ;    # put focus on first entry widget, index=0

			# Here is where you rebind the different buttons depending on the
			# program name that is selected (i.e., through spec.pm)
			$binding->set_prog_name_sref( $color_flow_href->{_prog_name_sref} );
			$binding->set_values_w_aref( $param_widgets->get_values_w_aref );

			# reference to local subroutine that will be run when MB3 is pressed
			$binding->setFileDialog_button_sub_ref( \&_FileDialog_button );
			$binding->set();

			$gui_history->set_hash_ref($color_flow_href);
			$gui_history->set4end_of_flow_select($flow_color);
			$gui_history->set_flow_index_last_touched($index);
			$color_flow_href = $gui_history->get_hash_ref()
			  ;    # now color_flow= 0; flow_type=user_built

# Update the entry button value that displays the currently active
# flow or superflow name, by using the currently selected program name from the flow list
# e.g. data_in, suximage, suxgraph etc.

lib/App/SeismicUnixGui/misc/blue_flow.pm  view on Meta::CPAN

#	print("3. color_flow, _flow_select2save_most_recent_param_flow: writing gui_history.txt\n");
#	$gui_history->view();

# print("3. color_flow,_flow_select2save_most_recent_param_flow, last_flow_index_touched:$color_flow_href->{_last_flow_index_touched}\n");
#$param_flow_color_pkg->view_data();

	my $pre_req_ok = $decisions->get4flow_select();

	if ($pre_req_ok) {

		my $binding = binding->new();
		my $here;

		$gui_history->set_button('flow_select');

		# consider prior flow-color changes
		# unticked strings from GUI are corrected here

	  #		print(" 8, color_flow, before _updatenNsave_most_recent_param_flow\n");

#		$param_flow_color_pkg->view_data();

lib/App/SeismicUnixGui/misc/blue_flow.pm  view on Meta::CPAN


#		print(
#"122 color_flow, END _flow_select2save_most_recent_param_flow,color_flow_href->{_values_aref} =@{$color_flow_href->{_values_aref}}\n"
#		);

# $color_flow_href->{_last_parameter_index_touched_color} = 0;
# the changed parameter value in the Entry widget should force an update of stored values
# in the current flow item (not the last flow item touched)
# _save_most_recent_param_flow(); # is only active if
# $color_flow_href->{_last_parameter_index_touched_color} >= 0
# Here is where you rebind the different buttons depending on the
# program name that is selected (i.e., through *_spec.pm)
		$binding->set_prog_name_sref( $color_flow_href->{_prog_name_sref} );
		$binding->set_values_w_aref( $param_widgets->get_values_w_aref );

		# reference to local subroutine that will be run when MB3 is pressed
		$binding->setFileDialog_button_sub_ref( \&_FileDialog_button );
		$binding->set();

		$gui_history->set_hash_ref($color_flow_href);
		$gui_history->set4end_of_flow_select($flow_color);
		$gui_history->set_flow_index_last_touched($index);
		$color_flow_href = $gui_history->get_hash_ref();

# Update the entry button value that displays the currently active
# flow or superflow name, by using the currently selected program name from the flow list
# e.g. data_in, suximage, suxgraph etc.
		( $color_flow_href->{_flowNsuperflow_name_w} )

lib/App/SeismicUnixGui/misc/blue_flow.pm  view on Meta::CPAN

			# remove quotes upon input
			$color_flow_href->{_values_aref} =
			  $control->get_no_quotes4array( $color_flow_href->{_values_aref} );

			# in case parameter values have been displayed stringless
			$color_flow_href->{_values_aref} =
			  $control->get_string_or_number4aref(
				$color_flow_href->{_values_aref} );

#			print(
#				"color_flow,FileDialog_button(binding), flow_listbox_color_w: $color_flow_href->{_flow_listbox_color_w} \n"
#			);
			$file_dialog->set_flow_color( $color_flow_href->{_flow_color} );
			$file_dialog->set_hash_ref($color_flow_href);
			$file_dialog->FileDialog_director();

#			print(
#				"color_flow,FileDialog_button(binding), last_parameter_index_touched_color: $color_flow_href->{_last_parameter_index_touched_color} \n"
#			);

			# update to parameter values occurs in file_dialog
			$color_flow_href->{_values_aref} = $file_dialog->get_values_aref();

			# set up this flow listbox item as the last item touched
			my $_flow_listbox_color_w =
			  _get_flow_listbox_color_w();    # user-built_flow in current use
			my $current_flow_listbox_index =
			  $flow_widgets->get_flow_selection($_flow_listbox_color_w);

			#			$color_flow_href->{_last_flow_index_touched} =
			#				$current_flow_listbox_index;    # for next time
			#			$color_flow_href->{$_is_last_flow_index_touched_color} = $true;

# print("color_flow,FileDialog_button(binding), last_flow_index_touched:$color_flow_href->{_last_flow_index_touched} \n");

# Changes made with another instance of param_widgets (in file_dialog) will require
# that we also update the namespace of the current param_flow
# We make this change inside _save_most_recent_param_flow
			_save_most_recent_param_flow();

		}
		else {
			print("1. color_flow, FileDialog_button, missing topic \n");

lib/App/SeismicUnixGui/misc/blue_flow.pm  view on Meta::CPAN

	my $_flow_listbox_color_w = _get_flow_listbox_color_w();

	$color_flow_href->{_prog_name_sref} =
	  $flow_widgets->get_current_program( \$_flow_listbox_color_w );

	$decisions->set_hash_ref($color_flow_href);
	my $pre_req_ok = $decisions->get4flow_select();

	if ($pre_req_ok) {

		my $binding = binding->new();
		my ( $ans, $ans1 );

		$gui_history->set_button('flow_select');

		my $prior_flow_type =
		  ( ( $gui_history->get_defaults )->{_flow_type_href} )->{_prior};
		my $prior_flow_select_color =
		  ( ( $gui_history->get_defaults )->{_flow_select_color_href} )
		  ->{_prior};
		my $most_recent_flow_select_color =

lib/App/SeismicUnixGui/misc/blue_flow.pm  view on Meta::CPAN

	   # mysterious!!!!!
		$param_widgets->set_focus_on_Entry_w(0)
		  ;    # put focus on first entry widget, index=0

# $color_flow_href->{_last_parameter_index_touched_color} = 0;
# the changed parameter value in the Entry widget should force an update of stored values
# in the current flow item (not the last flow item touched)
# _save_most_recent_param_flow(); # is only active if
# $color_flow_href->{_last_parameter_index_touched_color} >= 0

		# Here is where you rebind the different buttons depending on the
		# program name that is selected (i.e., through spec.pm)
		$binding->set_prog_name_sref( $color_flow_href->{_prog_name_sref} );
		$binding->set_values_w_aref( $param_widgets->get_values_w_aref );

		# reference to local subroutine that will be run when MB3 is pressed
		$binding->setFileDialog_button_sub_ref( \&_FileDialog_button );
		$binding->set();
		$gui_history->set_hash_ref($color_flow_href);
		$gui_history->set4end_of_flow_select($flow_color);
		$gui_history->set_flow_index_last_touched($index);
		$color_flow_href = $gui_history->get_hash_ref();

# Update thre entry button value that displays the currently active
# flow or superflow name, by using the currently selected program name from the flow list
# e.g. data_in, suximage, suxgraph etc.
		( $color_flow_href->{_flowNsuperflow_name_w} )
		  ->configure( -text => ${ $color_flow_href->{_prog_name_sref} } );

lib/App/SeismicUnixGui/misc/file_dialog.pm  view on Meta::CPAN

			$file_dialog_type->{_Open}   => \&_user_built_flow_open_perl_file,
			$file_dialog_type->{_Path}   => \&_user_built_flow_open_path,
			$file_dialog_type->{_Delete} => \&_user_built_flow_Delete_perl_file,
			$file_dialog_type->{_SaveAs} => \&_user_built_flow_SaveAs_perl_file,
		};

		$dispatch->{$topic}->();
	}
	else {
		print(
			"file_dialog,_set_FileDialog2user_built_flow, missing bindings\n");
	}

	# print("file_dialog, End of _set_FileDialog2user_built_flow \n");
	return ($empty_string);
}

sub _set_FileDialog2pre_built_superflow {
	my ($self) = @_;

	my $topic = _get_dialog_type();

lib/App/SeismicUnixGui/misc/file_dialog.pm  view on Meta::CPAN

			
			$file_dialog_type->{_last_dir_in_path} =>
			  \&_big_stream_last_dir_in_path,
		};

		$dispatch->{$topic}->();

	}
	else {
		print(
"file_dialog,_set_FileDialog2pre_built_superflow, missing bindings\n"
		);
	}
#
#		if ( $topic eq $file_dialog_type->{_Data_PL_SEISMIC} ) {
#
#	# print("file_dialog,_set_FileDialog2pre_built_superflow, topic= $topic\n");
#			_pre_built_superflow_open_data_file();
#
#		}
#		elsif ( $topic eq $file_dialog_type->{_Data_SEISMIC_TXT} ) {

lib/App/SeismicUnixGui/misc/file_dialog.pm  view on Meta::CPAN

}

=head2 sub set_file_dialog_sub_ref 

=cut

sub set_file_dialog_sub_ref {
	my ( $self, $sub_ref ) = @_;

	if ($sub_ref) {
		print("binding  set_file_dialog_sub_ref, $sub_ref\n");
		$file_dialog->{_sub_ref} = $sub_ref;

	}
	else {
		print("file_dialog, set_FileDialog_button_sub_ref, missing sub ref\n");
	}

	return ($empty_string);
}

lib/App/SeismicUnixGui/misc/green_flow.pm  view on Meta::CPAN


extends 'App::SeismicUnixGui::misc::gui_history' => { -version => 0.0.2 };
use aliased 'App::SeismicUnixGui::misc::gui_history';

use App::SeismicUnixGui::misc::param_widgets_green '0.0.2';
use aliased 'App::SeismicUnixGui::misc::param_widgets_green';

use App::SeismicUnixGui::misc::param_flow_green '0.0.5';
use aliased 'App::SeismicUnixGui::misc::param_flow_green';

use aliased 'App::SeismicUnixGui::misc::binding';

use App::SeismicUnixGui::misc::control '0.0.3';
use aliased 'App::SeismicUnixGui::misc::control';

use App::SeismicUnixGui::misc::decisions '1.0.0';
use aliased 'App::SeismicUnixGui::misc::decisions';

use aliased 'App::SeismicUnixGui::misc::dirs';
use aliased 'App::SeismicUnixGui::misc::file_dialog';
use aliased 'App::SeismicUnixGui::misc::files_LSU';

lib/App/SeismicUnixGui/misc/green_flow.pm  view on Meta::CPAN


	# remove all sunix program names from the flow listbox
	# in "color"_flow namespace
	my $_flow_listbox_color_w = _get_flow_listbox_color_w();
	$flow_widgets->clear($_flow_listbox_color_w);

}

=head2 sub _FileDialog_button

Only cases with MB binding use this private ('_') subroutine
e.g., sunix programs displayed in the parameter boxes during
flow construction.
sub binding is responsible
Other cases that select the GUI file buttons directly (user click) use: FileDialog_button instead.
Once the file name is selected the parameter value is updated in the GUI

	 	 foreach my $key (sort keys %$color_flow) {
   			print (" color_flowkey is $key, value is $color_flow->{$key}\n");
  		}
  	print ("color_flow,_FileDialog_button(binding), _is_flow_listbox_color_w: $color_flow_href->{_is_flow_listbox_color_w} \n");
  	
=cut 

sub _FileDialog_button {

	my ( $self, $flow_dialog_type_sref ) = @_;

	if ($flow_dialog_type_sref) {

		# flow dialog type can be

lib/App/SeismicUnixGui/misc/green_flow.pm  view on Meta::CPAN


# print("2. color_flow, _FileDialog_button, last_flow_index_touched $color_flow_href->{_last_flow_index_touched}\n");
# print("10. color_flow, _FileDialog_button, last_flow_color:$color_flow_href->{_last_flow_color}\n");
# Changes made with another instance of param_widgets (in file_dialog) will require
# that we update the namespace of the current param_flow
# We make this change inside _save_most_recent_param_flow
		_save_most_recent_param_flow();

	}
	else {
		print("color_flow,_FileDialog_button (binding),option type missing ");
	}
	return ();
}

=head2 sub _clear_items_version_aref 

	clear items_versions_aref
	used when last item is removed from the listbox

=cut

lib/App/SeismicUnixGui/misc/green_flow.pm  view on Meta::CPAN


	$param_flow_color_pkg->clear_flow_items_version_aref();

}

=head2 sub _flow_select_director

Private alias for flow_select
both color and button are set as
per the flow_select called by an active click
from Main, in_L_SU_flow_bindings

=cut

sub _flow_select_director {

	my ($type) = @_;

	if ( defined $type ) {
		$gui_history->set_flow_select_color($this_color);

lib/App/SeismicUnixGui/misc/green_flow.pm  view on Meta::CPAN


	$decisions->set_hash_ref($color_flow_href);

#	print("color_flow, flow_select2save_most_recent_param_flow, view stored flow parameters BEFORE update\n");
#	$param_flow_color_pkg->view_data();

	my $pre_req_ok = $decisions->get4flow_select();

	if ($pre_req_ok) {

		my $binding = binding->new();
		my $here;

		# consider previous flow-color changes
		# unticked strings from GUI are corrected within
		_updateNsave_most_recent_param_flow();

#	print("color_flow, flow_select2save_most_recent_param_flow, view stored flow parameters AFTER update\n");
#	$param_flow_color_pkg->view_data();

#					print(

lib/App/SeismicUnixGui/misc/green_flow.pm  view on Meta::CPAN

			$param_widgets->redisplay_check_buttons();
			$param_widgets->set_entry_change_status($false);

	   # unxpectedly  Entry focus is delayed until the end of this method before
	   # completion;
	   # that is we get to gui_history->view before we can update the focus
	   # mysterious!!!!!
			$param_widgets->set_focus_on_Entry_w(0)
			  ;    # put focus on first entry widget, index=0

			# Here is where you rebind the different buttons depending on the
			# program name that is selected (i.e., through spec.pm)
			$binding->set_prog_name_sref( $color_flow_href->{_prog_name_sref} );
			$binding->set_values_w_aref( $param_widgets->get_values_w_aref );

			# reference to local subroutine that will be run when MB3 is pressed
			$binding->setFileDialog_button_sub_ref( \&_FileDialog_button );
			$binding->set();

			$gui_history->set_hash_ref($color_flow_href);
			$gui_history->set4end_of_flow_select($flow_color);
			$gui_history->set_flow_index_last_touched($index);
			$color_flow_href = $gui_history->get_hash_ref()
			  ;    # now color_flow= 0; flow_type=user_built

# Update the entry button value that displays the currently active
# flow or superflow name, by using the currently selected program name from the flow list
# e.g. data_in, suximage, suxgraph etc.

lib/App/SeismicUnixGui/misc/green_flow.pm  view on Meta::CPAN

#	print("3. color_flow, _flow_select2save_most_recent_param_flow: writing gui_history.txt\n");
#	$gui_history->view();

# print("3. color_flow,_flow_select2save_most_recent_param_flow, last_flow_index_touched:$color_flow_href->{_last_flow_index_touched}\n");
#$param_flow_color_pkg->view_data();

	my $pre_req_ok = $decisions->get4flow_select();

	if ($pre_req_ok) {

		my $binding = binding->new();
		my $here;

		$gui_history->set_button('flow_select');

		# consider prior flow-color changes
		# unticked strings from GUI are corrected here

	  #		print(" 8, color_flow, before _updatenNsave_most_recent_param_flow\n");

#		$param_flow_color_pkg->view_data();

lib/App/SeismicUnixGui/misc/green_flow.pm  view on Meta::CPAN


#		print(
#"122 color_flow, END _flow_select2save_most_recent_param_flow,color_flow_href->{_values_aref} =@{$color_flow_href->{_values_aref}}\n"
#		);

# $color_flow_href->{_last_parameter_index_touched_color} = 0;
# the changed parameter value in the Entry widget should force an update of stored values
# in the current flow item (not the last flow item touched)
# _save_most_recent_param_flow(); # is only active if
# $color_flow_href->{_last_parameter_index_touched_color} >= 0
# Here is where you rebind the different buttons depending on the
# program name that is selected (i.e., through *_spec.pm)
		$binding->set_prog_name_sref( $color_flow_href->{_prog_name_sref} );
		$binding->set_values_w_aref( $param_widgets->get_values_w_aref );

		# reference to local subroutine that will be run when MB3 is pressed
		$binding->setFileDialog_button_sub_ref( \&_FileDialog_button );
		$binding->set();

		$gui_history->set_hash_ref($color_flow_href);
		$gui_history->set4end_of_flow_select($flow_color);
		$gui_history->set_flow_index_last_touched($index);
		$color_flow_href = $gui_history->get_hash_ref();

# Update the entry button value that displays the currently active
# flow or superflow name, by using the currently selected program name from the flow list
# e.g. data_in, suximage, suxgraph etc.
		( $color_flow_href->{_flowNsuperflow_name_w} )

lib/App/SeismicUnixGui/misc/green_flow.pm  view on Meta::CPAN

			# remove quotes upon input
			$color_flow_href->{_values_aref} =
			  $control->get_no_quotes4array( $color_flow_href->{_values_aref} );

			# in case parameter values have been displayed stringless
			$color_flow_href->{_values_aref} =
			  $control->get_string_or_number4aref(
				$color_flow_href->{_values_aref} );

#			print(
#				"color_flow,FileDialog_button(binding), flow_listbox_color_w: $color_flow_href->{_flow_listbox_color_w} \n"
#			);
			$file_dialog->set_flow_color( $color_flow_href->{_flow_color} );
			$file_dialog->set_hash_ref($color_flow_href);
			$file_dialog->FileDialog_director();

#			print(
#				"color_flow,FileDialog_button(binding), last_parameter_index_touched_color: $color_flow_href->{_last_parameter_index_touched_color} \n"
#			);

			# update to parameter values occurs in file_dialog
			$color_flow_href->{_values_aref} = $file_dialog->get_values_aref();

			# set up this flow listbox item as the last item touched
			my $_flow_listbox_color_w =
			  _get_flow_listbox_color_w();    # user-built_flow in current use
			my $current_flow_listbox_index =
			  $flow_widgets->get_flow_selection($_flow_listbox_color_w);

			#			$color_flow_href->{_last_flow_index_touched} =
			#				$current_flow_listbox_index;    # for next time
			#			$color_flow_href->{$_is_last_flow_index_touched_color} = $true;

# print("color_flow,FileDialog_button(binding), last_flow_index_touched:$color_flow_href->{_last_flow_index_touched} \n");

# Changes made with another instance of param_widgets (in file_dialog) will require
# that we also update the namespace of the current param_flow
# We make this change inside _save_most_recent_param_flow
			_save_most_recent_param_flow();

		}
		else {
			print("1. color_flow, FileDialog_button, missing topic \n");

lib/App/SeismicUnixGui/misc/green_flow.pm  view on Meta::CPAN

	my $_flow_listbox_color_w = _get_flow_listbox_color_w();

	$color_flow_href->{_prog_name_sref} =
	  $flow_widgets->get_current_program( \$_flow_listbox_color_w );

	$decisions->set_hash_ref($color_flow_href);
	my $pre_req_ok = $decisions->get4flow_select();

	if ($pre_req_ok) {

		my $binding = binding->new();
		my ( $ans, $ans1 );

		$gui_history->set_button('flow_select');

		my $prior_flow_type =
		  ( ( $gui_history->get_defaults )->{_flow_type_href} )->{_prior};
		my $prior_flow_select_color =
		  ( ( $gui_history->get_defaults )->{_flow_select_color_href} )
		  ->{_prior};
		my $most_recent_flow_select_color =

lib/App/SeismicUnixGui/misc/green_flow.pm  view on Meta::CPAN

	   # mysterious!!!!!
		$param_widgets->set_focus_on_Entry_w(0)
		  ;    # put focus on first entry widget, index=0

# $color_flow_href->{_last_parameter_index_touched_color} = 0;
# the changed parameter value in the Entry widget should force an update of stored values
# in the current flow item (not the last flow item touched)
# _save_most_recent_param_flow(); # is only active if
# $color_flow_href->{_last_parameter_index_touched_color} >= 0

		# Here is where you rebind the different buttons depending on the
		# program name that is selected (i.e., through spec.pm)
		$binding->set_prog_name_sref( $color_flow_href->{_prog_name_sref} );
		$binding->set_values_w_aref( $param_widgets->get_values_w_aref );

		# reference to local subroutine that will be run when MB3 is pressed
		$binding->setFileDialog_button_sub_ref( \&_FileDialog_button );
		$binding->set();
		$gui_history->set_hash_ref($color_flow_href);
		$gui_history->set4end_of_flow_select($flow_color);
		$gui_history->set_flow_index_last_touched($index);
		$color_flow_href = $gui_history->get_hash_ref();

# Update thre entry button value that displays the currently active
# flow or superflow name, by using the currently selected program name from the flow list
# e.g. data_in, suximage, suxgraph etc.
		( $color_flow_href->{_flowNsuperflow_name_w} )
		  ->configure( -text => ${ $color_flow_href->{_prog_name_sref} } );

lib/App/SeismicUnixGui/misc/grey_flow.pm  view on Meta::CPAN


extends 'App::SeismicUnixGui::misc::gui_history' => { -version => 0.0.2 };
use aliased 'App::SeismicUnixGui::misc::gui_history';

use App::SeismicUnixGui::misc::param_widgets_grey '0.0.2';
use aliased 'App::SeismicUnixGui::misc::param_widgets_grey';

use App::SeismicUnixGui::misc::param_flow_grey '0.0.5';
use aliased 'App::SeismicUnixGui::misc::param_flow_grey';

use aliased 'App::SeismicUnixGui::misc::binding';

use App::SeismicUnixGui::misc::control '0.0.3';
use aliased 'App::SeismicUnixGui::misc::control';

use App::SeismicUnixGui::misc::decisions '1.0.0';
use aliased 'App::SeismicUnixGui::misc::decisions';

use aliased 'App::SeismicUnixGui::misc::dirs';
use aliased 'App::SeismicUnixGui::misc::file_dialog';
use aliased 'App::SeismicUnixGui::misc::files_LSU';

lib/App/SeismicUnixGui/misc/grey_flow.pm  view on Meta::CPAN


	# remove all sunix program names from the flow listbox
	# in "color"_flow namespace
	my $_flow_listbox_color_w = _get_flow_listbox_color_w();
	$flow_widgets->clear($_flow_listbox_color_w);

}

=head2 sub _FileDialog_button

Only cases with MB binding use this private ('_') subroutine
e.g., sunix programs displayed in the parameter boxes during
flow construction.
sub binding is responsible
Other cases that select the GUI file buttons directly (user click) use: FileDialog_button instead.
Once the file name is selected the parameter value is updated in the GUI

	 	 foreach my $key (sort keys %$color_flow) {
   			print (" color_flowkey is $key, value is $color_flow->{$key}\n");
  		}
  	print ("color_flow,_FileDialog_button(binding), _is_flow_listbox_color_w: $color_flow_href->{_is_flow_listbox_color_w} \n");
  	
=cut 

sub _FileDialog_button {

	my ( $self, $flow_dialog_type_sref ) = @_;

	if ($flow_dialog_type_sref) {

		# flow dialog type can be

lib/App/SeismicUnixGui/misc/grey_flow.pm  view on Meta::CPAN


# print("2. color_flow, _FileDialog_button, last_flow_index_touched $color_flow_href->{_last_flow_index_touched}\n");
# print("10. color_flow, _FileDialog_button, last_flow_color:$color_flow_href->{_last_flow_color}\n");
# Changes made with another instance of param_widgets (in file_dialog) will require
# that we update the namespace of the current param_flow
# We make this change inside _save_most_recent_param_flow
		_save_most_recent_param_flow();

	}
	else {
		print("color_flow,_FileDialog_button (binding),option type missing ");
	}
	return ();
}

=head2 sub _clear_items_version_aref 

	clear items_versions_aref
	used when last item is removed from the listbox

=cut

lib/App/SeismicUnixGui/misc/grey_flow.pm  view on Meta::CPAN


	$param_flow_color_pkg->clear_flow_items_version_aref();

}

=head2 sub _flow_select_director

Private alias for flow_select
both color and button are set as
per the flow_select called by an active click
from Main, in_L_SU_flow_bindings

=cut

sub _flow_select_director {

	my ($type) = @_;

	if ( defined $type ) {
		$gui_history->set_flow_select_color($this_color);

lib/App/SeismicUnixGui/misc/grey_flow.pm  view on Meta::CPAN


	$decisions->set_hash_ref($color_flow_href);

#	print("color_flow, flow_select2save_most_recent_param_flow, view stored flow parameters BEFORE update\n");
#	$param_flow_color_pkg->view_data();

	my $pre_req_ok = $decisions->get4flow_select();

	if ($pre_req_ok) {

		my $binding = binding->new();
		my $here;

		# consider previous flow-color changes
		# unticked strings from GUI are corrected within
		_updateNsave_most_recent_param_flow();

#	print("color_flow, flow_select2save_most_recent_param_flow, view stored flow parameters AFTER update\n");
#	$param_flow_color_pkg->view_data();

#					print(

lib/App/SeismicUnixGui/misc/grey_flow.pm  view on Meta::CPAN

			$param_widgets->redisplay_check_buttons();
			$param_widgets->set_entry_change_status($false);

	   # unxpectedly  Entry focus is delayed until the end of this method before
	   # completion;
	   # that is we get to gui_history->view before we can update the focus
	   # mysterious!!!!!
			$param_widgets->set_focus_on_Entry_w(0)
			  ;    # put focus on first entry widget, index=0

			# Here is where you rebind the different buttons depending on the
			# program name that is selected (i.e., through spec.pm)
			$binding->set_prog_name_sref( $color_flow_href->{_prog_name_sref} );
			$binding->set_values_w_aref( $param_widgets->get_values_w_aref );

			# reference to local subroutine that will be run when MB3 is pressed
			$binding->setFileDialog_button_sub_ref( \&_FileDialog_button );
			$binding->set();

			$gui_history->set_hash_ref($color_flow_href);
			$gui_history->set4end_of_flow_select($flow_color);
			$gui_history->set_flow_index_last_touched($index);
			$color_flow_href = $gui_history->get_hash_ref()
			  ;    # now color_flow= 0; flow_type=user_built

# Update the entry button value that displays the currently active
# flow or superflow name, by using the currently selected program name from the flow list
# e.g. data_in, suximage, suxgraph etc.

lib/App/SeismicUnixGui/misc/grey_flow.pm  view on Meta::CPAN

#	print("3. color_flow, _flow_select2save_most_recent_param_flow: writing gui_history.txt\n");
#	$gui_history->view();

# print("3. color_flow,_flow_select2save_most_recent_param_flow, last_flow_index_touched:$color_flow_href->{_last_flow_index_touched}\n");
#$param_flow_color_pkg->view_data();

	my $pre_req_ok = $decisions->get4flow_select();

	if ($pre_req_ok) {

		my $binding = binding->new();
		my $here;

		$gui_history->set_button('flow_select');

		# consider prior flow-color changes
		# unticked strings from GUI are corrected here

	  #		print(" 8, color_flow, before _updatenNsave_most_recent_param_flow\n");

#		$param_flow_color_pkg->view_data();

lib/App/SeismicUnixGui/misc/grey_flow.pm  view on Meta::CPAN


#		print(
#"122 color_flow, END _flow_select2save_most_recent_param_flow,color_flow_href->{_values_aref} =@{$color_flow_href->{_values_aref}}\n"
#		);

# $color_flow_href->{_last_parameter_index_touched_color} = 0;
# the changed parameter value in the Entry widget should force an update of stored values
# in the current flow item (not the last flow item touched)
# _save_most_recent_param_flow(); # is only active if
# $color_flow_href->{_last_parameter_index_touched_color} >= 0
# Here is where you rebind the different buttons depending on the
# program name that is selected (i.e., through *_spec.pm)
		$binding->set_prog_name_sref( $color_flow_href->{_prog_name_sref} );
		$binding->set_values_w_aref( $param_widgets->get_values_w_aref );

		# reference to local subroutine that will be run when MB3 is pressed
		$binding->setFileDialog_button_sub_ref( \&_FileDialog_button );
		$binding->set();

		$gui_history->set_hash_ref($color_flow_href);
		$gui_history->set4end_of_flow_select($flow_color);
		$gui_history->set_flow_index_last_touched($index);
		$color_flow_href = $gui_history->get_hash_ref();

# Update the entry button value that displays the currently active
# flow or superflow name, by using the currently selected program name from the flow list
# e.g. data_in, suximage, suxgraph etc.
		( $color_flow_href->{_flowNsuperflow_name_w} )

lib/App/SeismicUnixGui/misc/grey_flow.pm  view on Meta::CPAN

			# remove quotes upon input
			$color_flow_href->{_values_aref} =
			  $control->get_no_quotes4array( $color_flow_href->{_values_aref} );

			# in case parameter values have been displayed stringless
			$color_flow_href->{_values_aref} =
			  $control->get_string_or_number4aref(
				$color_flow_href->{_values_aref} );

#			print(
#				"color_flow,FileDialog_button(binding), flow_listbox_color_w: $color_flow_href->{_flow_listbox_color_w} \n"
#			);
			$file_dialog->set_flow_color( $color_flow_href->{_flow_color} );
			$file_dialog->set_hash_ref($color_flow_href);
			$file_dialog->FileDialog_director();

#			print(
#				"color_flow,FileDialog_button(binding), last_parameter_index_touched_color: $color_flow_href->{_last_parameter_index_touched_color} \n"
#			);

			# update to parameter values occurs in file_dialog
			$color_flow_href->{_values_aref} = $file_dialog->get_values_aref();

			# set up this flow listbox item as the last item touched
			my $_flow_listbox_color_w =
			  _get_flow_listbox_color_w();    # user-built_flow in current use
			my $current_flow_listbox_index =
			  $flow_widgets->get_flow_selection($_flow_listbox_color_w);

			#			$color_flow_href->{_last_flow_index_touched} =
			#				$current_flow_listbox_index;    # for next time
			#			$color_flow_href->{$_is_last_flow_index_touched_color} = $true;

# print("color_flow,FileDialog_button(binding), last_flow_index_touched:$color_flow_href->{_last_flow_index_touched} \n");

# Changes made with another instance of param_widgets (in file_dialog) will require
# that we also update the namespace of the current param_flow
# We make this change inside _save_most_recent_param_flow
			_save_most_recent_param_flow();

		}
		else {
			print("1. color_flow, FileDialog_button, missing topic \n");

lib/App/SeismicUnixGui/misc/grey_flow.pm  view on Meta::CPAN

	my $_flow_listbox_color_w = _get_flow_listbox_color_w();

	$color_flow_href->{_prog_name_sref} =
	  $flow_widgets->get_current_program( \$_flow_listbox_color_w );

	$decisions->set_hash_ref($color_flow_href);
	my $pre_req_ok = $decisions->get4flow_select();

	if ($pre_req_ok) {

		my $binding = binding->new();
		my ( $ans, $ans1 );

		$gui_history->set_button('flow_select');

		my $prior_flow_type =
		  ( ( $gui_history->get_defaults )->{_flow_type_href} )->{_prior};
		my $prior_flow_select_color =
		  ( ( $gui_history->get_defaults )->{_flow_select_color_href} )
		  ->{_prior};
		my $most_recent_flow_select_color =

lib/App/SeismicUnixGui/misc/grey_flow.pm  view on Meta::CPAN

	   # mysterious!!!!!
		$param_widgets->set_focus_on_Entry_w(0)
		  ;    # put focus on first entry widget, index=0

# $color_flow_href->{_last_parameter_index_touched_color} = 0;
# the changed parameter value in the Entry widget should force an update of stored values
# in the current flow item (not the last flow item touched)
# _save_most_recent_param_flow(); # is only active if
# $color_flow_href->{_last_parameter_index_touched_color} >= 0

		# Here is where you rebind the different buttons depending on the
		# program name that is selected (i.e., through spec.pm)
		$binding->set_prog_name_sref( $color_flow_href->{_prog_name_sref} );
		$binding->set_values_w_aref( $param_widgets->get_values_w_aref );

		# reference to local subroutine that will be run when MB3 is pressed
		$binding->setFileDialog_button_sub_ref( \&_FileDialog_button );
		$binding->set();
		$gui_history->set_hash_ref($color_flow_href);
		$gui_history->set4end_of_flow_select($flow_color);
		$gui_history->set_flow_index_last_touched($index);
		$color_flow_href = $gui_history->get_hash_ref();

# Update thre entry button value that displays the currently active
# flow or superflow name, by using the currently selected program name from the flow list
# e.g. data_in, suximage, suxgraph etc.
		( $color_flow_href->{_flowNsuperflow_name_w} )
		  ->configure( -text => ${ $color_flow_href->{_prog_name_sref} } );

lib/App/SeismicUnixGui/misc/oop_prog_params.pm  view on Meta::CPAN

		my $pathNmodule_spec_w_slash_pm =
		  $L_SU_path->get_pathNmodule_spec_w_slash_pm();
		my $pathNmodule_spec_w_colon =
		  $L_SU_path->get_pathNmodule_spec_w_colon();

		require $pathNmodule_spec_w_slash_pm;

		# INSTANTIATE
		my $package = $pathNmodule_spec_w_colon->new();

		$package->binding_index_aref();
		$package->prefix_aref();
		my $prefix_aref = $package->get_prefix_aref();

	# print("oop_prog_params,_get_prefix_aref, prefix_aref=@{$prefix_aref} \n");

		return ($prefix_aref);

	}
	else {
		print("oop_prog_params,_get_prefix, missing program name\n");

lib/App/SeismicUnixGui/misc/oop_prog_params.pm  view on Meta::CPAN

		  $L_SU_path->get_pathNmodule_spec_w_slash_pm();
		my $pathNmodule_spec_w_colon =
		  $L_SU_path->get_pathNmodule_spec_w_colon();

		require $pathNmodule_spec_w_slash_pm;

		# INSTANTIATE
		my $package = $pathNmodule_spec_w_colon->new();

		# set internally and get suffix values externally for the module
		$package->binding_index_aref();
		$package->suffix_aref();
		my $suffix_aref = $package->get_suffix_aref();

  #		print("oop_prog_params,_get_suffix_aref, suffixes are: @{$suffix_aref}\n");
		return ($suffix_aref);

	}
	else {
		print("oop_prog_params,_get_suffix, missing program name\n");
	}

lib/App/SeismicUnixGui/misc/pink_flow.pm  view on Meta::CPAN


extends 'App::SeismicUnixGui::misc::gui_history' => { -version => 0.0.2 };
use aliased 'App::SeismicUnixGui::misc::gui_history';

use App::SeismicUnixGui::misc::param_widgets_pink '0.0.2';
use aliased 'App::SeismicUnixGui::misc::param_widgets_pink';

use App::SeismicUnixGui::misc::param_flow_pink '0.0.5';
use aliased 'App::SeismicUnixGui::misc::param_flow_pink';

use aliased 'App::SeismicUnixGui::misc::binding';

use App::SeismicUnixGui::misc::control '0.0.3';
use aliased 'App::SeismicUnixGui::misc::control';

use App::SeismicUnixGui::misc::decisions '1.0.0';
use aliased 'App::SeismicUnixGui::misc::decisions';

use aliased 'App::SeismicUnixGui::misc::dirs';
use aliased 'App::SeismicUnixGui::misc::file_dialog';
use aliased 'App::SeismicUnixGui::misc::files_LSU';

lib/App/SeismicUnixGui/misc/pink_flow.pm  view on Meta::CPAN


	# remove all sunix program names from the flow listbox
	# in "color"_flow namespace
	my $_flow_listbox_color_w = _get_flow_listbox_color_w();
	$flow_widgets->clear($_flow_listbox_color_w);

}

=head2 sub _FileDialog_button

Only cases with MB binding use this private ('_') subroutine
e.g., sunix programs displayed in the parameter boxes during
flow construction.
sub binding is responsible
Other cases that select the GUI file buttons directly (user click) use: FileDialog_button instead.
Once the file name is selected the parameter value is updated in the GUI

	 	 foreach my $key (sort keys %$color_flow) {
   			print (" color_flowkey is $key, value is $color_flow->{$key}\n");
  		}
  	print ("color_flow,_FileDialog_button(binding), _is_flow_listbox_color_w: $color_flow_href->{_is_flow_listbox_color_w} \n");
  	
=cut 

sub _FileDialog_button {

	my ( $self, $flow_dialog_type_sref ) = @_;

	if ($flow_dialog_type_sref) {

		# flow dialog type can be

lib/App/SeismicUnixGui/misc/pink_flow.pm  view on Meta::CPAN


# print("2. color_flow, _FileDialog_button, last_flow_index_touched $color_flow_href->{_last_flow_index_touched}\n");
# print("10. color_flow, _FileDialog_button, last_flow_color:$color_flow_href->{_last_flow_color}\n");
# Changes made with another instance of param_widgets (in file_dialog) will require
# that we update the namespace of the current param_flow
# We make this change inside _save_most_recent_param_flow
		_save_most_recent_param_flow();

	}
	else {
		print("color_flow,_FileDialog_button (binding),option type missing ");
	}
	return ();
}

=head2 sub _clear_items_version_aref 

	clear items_versions_aref
	used when last item is removed from the listbox

=cut

lib/App/SeismicUnixGui/misc/pink_flow.pm  view on Meta::CPAN


	$param_flow_color_pkg->clear_flow_items_version_aref();

}

=head2 sub _flow_select_director

Private alias for flow_select
both color and button are set as
per the flow_select called by an active click
from Main, in_L_SU_flow_bindings

=cut

sub _flow_select_director {

	my ($type) = @_;

	if ( defined $type ) {
		$gui_history->set_flow_select_color($this_color);

lib/App/SeismicUnixGui/misc/pink_flow.pm  view on Meta::CPAN


	$decisions->set_hash_ref($color_flow_href);

#	print("color_flow, flow_select2save_most_recent_param_flow, view stored flow parameters BEFORE update\n");
#	$param_flow_color_pkg->view_data();

	my $pre_req_ok = $decisions->get4flow_select();

	if ($pre_req_ok) {

		my $binding = binding->new();
		my $here;

		# consider previous flow-color changes
		# unticked strings from GUI are corrected within
		_updateNsave_most_recent_param_flow();

#	print("color_flow, flow_select2save_most_recent_param_flow, view stored flow parameters AFTER update\n");
#	$param_flow_color_pkg->view_data();

#					print(

lib/App/SeismicUnixGui/misc/pink_flow.pm  view on Meta::CPAN

			$param_widgets->redisplay_check_buttons();
			$param_widgets->set_entry_change_status($false);

	   # unxpectedly  Entry focus is delayed until the end of this method before
	   # completion;
	   # that is we get to gui_history->view before we can update the focus
	   # mysterious!!!!!
			$param_widgets->set_focus_on_Entry_w(0)
			  ;    # put focus on first entry widget, index=0

			# Here is where you rebind the different buttons depending on the
			# program name that is selected (i.e., through spec.pm)
			$binding->set_prog_name_sref( $color_flow_href->{_prog_name_sref} );
			$binding->set_values_w_aref( $param_widgets->get_values_w_aref );

			# reference to local subroutine that will be run when MB3 is pressed
			$binding->setFileDialog_button_sub_ref( \&_FileDialog_button );
			$binding->set();

			$gui_history->set_hash_ref($color_flow_href);
			$gui_history->set4end_of_flow_select($flow_color);
			$gui_history->set_flow_index_last_touched($index);
			$color_flow_href = $gui_history->get_hash_ref()
			  ;    # now color_flow= 0; flow_type=user_built

# Update the entry button value that displays the currently active
# flow or superflow name, by using the currently selected program name from the flow list
# e.g. data_in, suximage, suxgraph etc.

lib/App/SeismicUnixGui/misc/pink_flow.pm  view on Meta::CPAN

#	print("3. color_flow, _flow_select2save_most_recent_param_flow: writing gui_history.txt\n");
#	$gui_history->view();

# print("3. color_flow,_flow_select2save_most_recent_param_flow, last_flow_index_touched:$color_flow_href->{_last_flow_index_touched}\n");
#$param_flow_color_pkg->view_data();

	my $pre_req_ok = $decisions->get4flow_select();

	if ($pre_req_ok) {

		my $binding = binding->new();
		my $here;

		$gui_history->set_button('flow_select');

		# consider prior flow-color changes
		# unticked strings from GUI are corrected here

	  #		print(" 8, color_flow, before _updatenNsave_most_recent_param_flow\n");

#		$param_flow_color_pkg->view_data();

lib/App/SeismicUnixGui/misc/pink_flow.pm  view on Meta::CPAN


#		print(
#"122 color_flow, END _flow_select2save_most_recent_param_flow,color_flow_href->{_values_aref} =@{$color_flow_href->{_values_aref}}\n"
#		);

# $color_flow_href->{_last_parameter_index_touched_color} = 0;
# the changed parameter value in the Entry widget should force an update of stored values
# in the current flow item (not the last flow item touched)
# _save_most_recent_param_flow(); # is only active if
# $color_flow_href->{_last_parameter_index_touched_color} >= 0
# Here is where you rebind the different buttons depending on the
# program name that is selected (i.e., through *_spec.pm)
		$binding->set_prog_name_sref( $color_flow_href->{_prog_name_sref} );
		$binding->set_values_w_aref( $param_widgets->get_values_w_aref );

		# reference to local subroutine that will be run when MB3 is pressed
		$binding->setFileDialog_button_sub_ref( \&_FileDialog_button );
		$binding->set();

		$gui_history->set_hash_ref($color_flow_href);
		$gui_history->set4end_of_flow_select($flow_color);
		$gui_history->set_flow_index_last_touched($index);
		$color_flow_href = $gui_history->get_hash_ref();

# Update the entry button value that displays the currently active
# flow or superflow name, by using the currently selected program name from the flow list
# e.g. data_in, suximage, suxgraph etc.
		( $color_flow_href->{_flowNsuperflow_name_w} )

lib/App/SeismicUnixGui/misc/pink_flow.pm  view on Meta::CPAN

			# remove quotes upon input
			$color_flow_href->{_values_aref} =
			  $control->get_no_quotes4array( $color_flow_href->{_values_aref} );

			# in case parameter values have been displayed stringless
			$color_flow_href->{_values_aref} =
			  $control->get_string_or_number4aref(
				$color_flow_href->{_values_aref} );

#			print(
#				"color_flow,FileDialog_button(binding), flow_listbox_color_w: $color_flow_href->{_flow_listbox_color_w} \n"
#			);
			$file_dialog->set_flow_color( $color_flow_href->{_flow_color} );
			$file_dialog->set_hash_ref($color_flow_href);
			$file_dialog->FileDialog_director();

#			print(
#				"color_flow,FileDialog_button(binding), last_parameter_index_touched_color: $color_flow_href->{_last_parameter_index_touched_color} \n"
#			);

			# update to parameter values occurs in file_dialog
			$color_flow_href->{_values_aref} = $file_dialog->get_values_aref();

			# set up this flow listbox item as the last item touched
			my $_flow_listbox_color_w =
			  _get_flow_listbox_color_w();    # user-built_flow in current use
			my $current_flow_listbox_index =
			  $flow_widgets->get_flow_selection($_flow_listbox_color_w);

			#			$color_flow_href->{_last_flow_index_touched} =
			#				$current_flow_listbox_index;    # for next time
			#			$color_flow_href->{$_is_last_flow_index_touched_color} = $true;

# print("color_flow,FileDialog_button(binding), last_flow_index_touched:$color_flow_href->{_last_flow_index_touched} \n");

# Changes made with another instance of param_widgets (in file_dialog) will require
# that we also update the namespace of the current param_flow
# We make this change inside _save_most_recent_param_flow
			_save_most_recent_param_flow();

		}
		else {
			print("1. color_flow, FileDialog_button, missing topic \n");

lib/App/SeismicUnixGui/misc/pink_flow.pm  view on Meta::CPAN

	my $_flow_listbox_color_w = _get_flow_listbox_color_w();

	$color_flow_href->{_prog_name_sref} =
	  $flow_widgets->get_current_program( \$_flow_listbox_color_w );

	$decisions->set_hash_ref($color_flow_href);
	my $pre_req_ok = $decisions->get4flow_select();

	if ($pre_req_ok) {

		my $binding = binding->new();
		my ( $ans, $ans1 );

		$gui_history->set_button('flow_select');

		my $prior_flow_type =
		  ( ( $gui_history->get_defaults )->{_flow_type_href} )->{_prior};
		my $prior_flow_select_color =
		  ( ( $gui_history->get_defaults )->{_flow_select_color_href} )
		  ->{_prior};
		my $most_recent_flow_select_color =

lib/App/SeismicUnixGui/misc/pink_flow.pm  view on Meta::CPAN

	   # mysterious!!!!!
		$param_widgets->set_focus_on_Entry_w(0)
		  ;    # put focus on first entry widget, index=0

# $color_flow_href->{_last_parameter_index_touched_color} = 0;
# the changed parameter value in the Entry widget should force an update of stored values
# in the current flow item (not the last flow item touched)
# _save_most_recent_param_flow(); # is only active if
# $color_flow_href->{_last_parameter_index_touched_color} >= 0

		# Here is where you rebind the different buttons depending on the
		# program name that is selected (i.e., through spec.pm)
		$binding->set_prog_name_sref( $color_flow_href->{_prog_name_sref} );
		$binding->set_values_w_aref( $param_widgets->get_values_w_aref );

		# reference to local subroutine that will be run when MB3 is pressed
		$binding->setFileDialog_button_sub_ref( \&_FileDialog_button );
		$binding->set();
		$gui_history->set_hash_ref($color_flow_href);
		$gui_history->set4end_of_flow_select($flow_color);
		$gui_history->set_flow_index_last_touched($index);
		$color_flow_href = $gui_history->get_hash_ref();

# Update thre entry button value that displays the currently active
# flow or superflow name, by using the currently selected program name from the flow list
# e.g. data_in, suximage, suxgraph etc.
		( $color_flow_href->{_flowNsuperflow_name_w} )
		  ->configure( -text => ${ $color_flow_href->{_prog_name_sref} } );

lib/App/SeismicUnixGui/misc/save_button.pm  view on Meta::CPAN

}

=head2 sub _save_button_sub_ref

=cut

sub set_save_button_sub_ref {
	my ( $self, $sub_ref ) = @_;

	if ($sub_ref) {
		print("binding  set_save_button_sub_ref, $sub_ref\n");
		$save_button->{_sub_ref} = $sub_ref;

	}
	else {
		print("save_button, set_save_button_sub_ref, missing sub ref\n");
	}
	return ();
}

=head2 sub set_dialog_type

lib/App/SeismicUnixGui/script/L_SU.pl  view on Meta::CPAN

my $flow_item_down_arrow = ( $main_href->{_mw} )
  ->Bitmap( -file => $global_libs->{_images} . 'file_item_down_arrow.xbm', );

=head2  top menu frame

Contains:
(1) top menus
for superflows
and (2) icons for (a) wiping plots 
 
MB3 goes to superflow bindings 

=cut

$main_href->{_superflow_select} = $top_menu_frame->Menubutton(
	-text               => 'Tools',
	-font               => $arial_16,
	-height             => $var->{_1_character},
	-width              => $var->{_6_characters},
	-padx               => $var->{_five_pixels},
	-background         => $var->{_my_yellow},
	-foreground         => $var->{_my_black},
	-disabledforeground => $var->{_my_dark_grey},
	-activeforeground   => $var->{_my_white},
	-activebackground   => $var->{_my_dark_grey},
	-relief             => 'flat'
);

my $top_menu_bar =
  ( $main_href->{_superflow_select} )->Menu( -font => $arial_16 );

$top_menu_bar->bind(
	'<ButtonRelease-3>' => [ \&_L_SU_superflow_bindings, 'get_help' ], );

=head2 Top menu frame icon
wipe background plots
enable from the start

=cut 

$main_href->{_wipe_plots_button} = $top_menu_frame->Button(
	-image              => $cross_cartoon,
	-height             => $var->{_18_pixels},

lib/App/SeismicUnixGui/script/L_SU.pl  view on Meta::CPAN

		-underline => 0,
		-font      => $arial_16,
		-command   =>
		  [ \&_L_SU_superflows, 'pre_built_superflows', \$args[$sflows] ],
	);
}

=pod tied button widgets
to a tool_array
for easier management
bind MB3 to get_help
my @who;
my $this=0;

$who[$this] = $top_menu_bar->focusCurrent;
print(" who is @who\n");
my $a =$top_menu_bar->bind();
print(" bind is @$a\n");
my $class = ref $top_menu_bar;
print "Button \\$top_menu_bar is an instance of class '$class'.\n" .
      "This class has bindings for these events:\n\n";
print join("\n", $top_menu_bar->bind($class) ), "\n";

=cut

=head2 side menu frame

 contains side menus
 1. for files

=cut

lib/App/SeismicUnixGui/script/L_SU.pl  view on Meta::CPAN

  );

=head2 Listbox widgets

tied to button action
for easier management

=cut

( $main_href->{_delete_from_flow_button} )
  ->bind(
	'<1>' => [ \&_L_SU_flow_bindings_any_color, 'delete_from_flow_button' ], );

( $main_href->{_flow_item_up_arrow_button} )
  ->bind(
	'<1>' => [ \&_L_SU_flow_bindings_any_color, 'flow_item_up_arrow_button' ],
  );

( $main_href->{_flow_item_down_arrow_button} )
  ->bind(
	'<1>' => [ \&_L_SU_flow_bindings_any_color, 'flow_item_down_arrow_button' ],
  );

( $main_href->{_delete_whole_flow_button} )
  ->bind(
	'<1>' => [ \&_L_SU_flow_bindings_any_color, 'delete_whole_flow_button' ], );

( $main_href->{_wipe_plots_button} )
  ->bind( '<1>' => [ \&_L_SU_bindings_shell, 'wipe_plots_button' ], );

$work_frame = ( $main_href->{_mw} )->Frame(
	-borderwidth => $var->{_one_pixel_borderwidth},
	-background  => 'yellow',
	-relief      => 'groove'
);

=head2 work frame

has menu items to its left

lib/App/SeismicUnixGui/script/L_SU.pl  view on Meta::CPAN


sunix_frame_I (bottom row )

=cut	             			             			             											

=head2 tied listbox widgets

  to a tool_array
  for easier management
  
  This binding occurs inside L_SU.pm and NOT
  within the current program

=cut

$sunix_data_programs_listbox->bind(
	'<1>' => [ \&_L_SU_sunix_bindings, 'sunix_select', 'neutral', 'data' ] );
$sunix_datum_programs_listbox->bind(
	'<1>' => [ \&_L_SU_sunix_bindings, 'sunix_select', 'neutral', 'datum' ] );
$sunix_plot_programs_listbox->bind(
	'<1>' => [ \&_L_SU_sunix_bindings, 'sunix_select', 'neutral', 'plot' ] );
$sunix_filter_programs_listbox->bind(
	'<1>' => [ \&_L_SU_sunix_bindings, 'sunix_select', 'neutral', 'filter' ] );
$sunix_header_programs_listbox->bind(
	'<1>' => [ \&_L_SU_sunix_bindings, 'sunix_select', 'neutral', 'header' ] );
$sunix_inversion_programs_listbox->bind(
	'<1>' => [ \&_L_SU_sunix_bindings, 'sunix_select', 'neutral', 'inversion' ]
);
$sunix_migration_programs_listbox->bind(
	'<1>' => [ \&_L_SU_sunix_bindings, 'sunix_select', 'neutral', 'migration' ]
);

$sunix_model_programs_listbox->bind(
	'<1>' => [ \&_L_SU_sunix_bindings, 'sunix_select', 'neutral', 'model' ] );
$sunix_NMO_Vel_Stk_programs_listbox->bind( '<1>' =>
	  [ \&_L_SU_sunix_bindings, 'sunix_select', 'neutral', 'NMO_Vel_Stk' ] );
$sunix_par_programs_listbox->bind(
	'<1>' => [ \&_L_SU_sunix_bindings, 'sunix_select', 'neutral', 'par' ] );
$sunix_picks_programs_listbox->bind(
	'<1>' => [ \&_L_SU_sunix_bindings, 'sunix_select', 'neutral', 'picks' ] );

$sunix_shapeNcut_programs_listbox->bind(
	'<1>' => [ \&_L_SU_sunix_bindings, 'sunix_select', 'neutral', 'shapeNcut' ]
);

# TODO return to 'neutral'
$sunix_shell_programs_listbox->bind(
	'<1>' => [ \&_L_SU_sunix_bindings, 'sunix_select', 'neutral', 'shell' ] );
$sunix_statsMath_programs_listbox->bind(
	'<1>' => [ \&_L_SU_sunix_bindings, 'sunix_select', 'neutral', 'statsMath' ]
);
$sunix_transform_programs_listbox->bind(
	'<1>' => [ \&_L_SU_sunix_bindings, 'sunix_select', 'neutral', 'transform' ]
);
$sunix_well_programs_listbox->bind(
	'<1>' => [ \&_L_SU_sunix_bindings, 'sunix_select', 'neutral', 'well' ] );

$sunix_data_programs_listbox->bind(
	'<3>' => [ \&_L_SU_sunix_bindings, 'get_help', 'neutral',
		'data' ]    #TODO return to 'neutral'
);
$sunix_datum_programs_listbox->bind(
	'<3>' => [ \&_L_SU_sunix_bindings, 'get_help', 'neutral',
		'datum' ]    #TODo return to 'neutral'
);
$sunix_plot_programs_listbox->bind(
	'<3>' => [ \&_L_SU_sunix_bindings, 'get_help', 'neutral',
		'plot' ]     #TODo return to 'neutral'
);
$sunix_filter_programs_listbox->bind(
	'<3>' => [ \&_L_SU_sunix_bindings, 'get_help', 'neutral',
		'filter' ]    #TODo return to 'neutral'
);

$sunix_header_programs_listbox->bind(
	'<3>' => [ \&_L_SU_sunix_bindings, 'get_help', 'neutral',
		'header' ]    #TODo return to 'neutral'
);
$sunix_inversion_programs_listbox->bind(
	'<3>' => [ \&_L_SU_sunix_bindings, 'get_help', 'neutral',
		'inversion' ]    #TODo return to 'neutral'
);
$sunix_migration_programs_listbox->bind(
	'<3>' => [ \&_L_SU_sunix_bindings, 'get_help', 'neutral',
		'migration' ]    #TODo return to 'neutral'
);
$sunix_model_programs_listbox->bind(
	'<3>' => [ \&_L_SU_sunix_bindings, 'get_help', 'neutral',
		'model' ]        #TODo return to 'neutral'
);
$sunix_NMO_Vel_Stk_programs_listbox->bind(
	'<3>' => [ \&_L_SU_sunix_bindings, 'get_help', 'neutral',
		'NMO_Vel_Stk' ]    #TODo return to 'neutral'
);
$sunix_par_programs_listbox->bind(
	'<3>' => [ \&_L_SU_sunix_bindings, 'get_help', 'neutral',
		'par' ]            #TODo return to 'neutral'
);
$sunix_picks_programs_listbox->bind(
	'<3>' => [ \&_L_SU_sunix_bindings, 'get_help', 'neutral',
		'picks' ]          #TODo return to 'neutral'
);

$sunix_shapeNcut_programs_listbox->bind(
	'<3>' => [ \&_L_SU_sunix_bindings, 'get_help', 'neutral',
		'shapeNcut' ]      #TODo return to 'neutral'
);
$sunix_shell_programs_listbox->bind(
	'<3>' => [ \&_L_SU_sunix_bindings, 'get_help', 'neutral',
		'shell' ]          #TODo return to 'neutral'
);
$sunix_statsMath_programs_listbox->bind(
	'<3>' => [ \&_L_SU_sunix_bindings, 'get_help', 'neutral',
		'statsMath' ]      #TODo return to 'neutral'
);
$sunix_transform_programs_listbox->bind(
	'<3>' => [ \&_L_SU_sunix_bindings, 'get_help', 'neutral',
		'transform' ]      #TODo return to 'neutral'
);
$sunix_well_programs_listbox->bind(
	'<3>' => [ \&_L_SU_sunix_bindings, 'get_help', 'neutral',
		'well' ]           #TODo return to 'neutral'
);

=head2 parameter_titles label

 immediteley above the parameters frame
 both of which are contained in the work frame
 contains Titles only 

=cut  

lib/App/SeismicUnixGui/script/L_SU.pl  view on Meta::CPAN

);

=head2 tied flow listbox widgets

  to a tool_array
  for easier management

=cut

( $main_href->{_flow_listbox_grey_w} )
  ->bind( '<1>' => [ \&_L_SU_flow_bindings, 'flow_select', 'grey' ], );
( $main_href->{_flow_listbox_grey_w} )
  ->bind( '<3>' => [ \&_L_SU_flow_bindings, 'get_help', 'grey' ] );

( $main_href->{_flow_listbox_pink_w} )
  ->bind( '<1>' => [ \&_L_SU_flow_bindings, 'flow_select', 'pink' ], );
( $main_href->{_flow_listbox_pink_w} )
  ->bind( '<3>' => [ \&_L_SU_flow_bindings, 'get_help', 'pink' ] );

( $main_href->{_flow_listbox_green_w} )
  ->bind( '<1>' => [ \&_L_SU_flow_bindings, 'flow_select', 'green' ], );
( $main_href->{_flow_listbox_green_w} )
  ->bind( '<3>' => [ \&_L_SU_flow_bindings, 'get_help', 'green' ] );

( $main_href->{_flow_listbox_blue_w} )
  ->bind( '<1>' => [ \&_L_SU_flow_bindings, 'flow_select', 'blue' ], );
( $main_href->{_flow_listbox_blue_w} )
  ->bind( '<3>' => [ \&_L_SU_flow_bindings, 'get_help', 'blue' ] );

=head2 Pack my dialog box

Upper frame contains my message.
Lower frame contains an  'ok' and a 'cancel' button.

=cut

$main_href->{_my_dialog_upper_frame}->pack(
	-side   => "top",

lib/App/SeismicUnixGui/script/L_SU.pl  view on Meta::CPAN


$L_SU->set_param_widgets();    # Initialize screen parameter names and values

# last in MainLoop allows all previous widgets to appear
# properly
# set up interactive message widgets
$L_SU->initialize_messages();

MainLoop;

=head2 sub _L_SU_bindings

For help in pre-built superflows and 
for get_help in user-built listbox flows

color not needed but $self is needed

=cut 

sub _L_SU_bindings {    #

	my ( $self, $set_method ) = @_;

	# print("1 main,_L_SU_bindings ,method:$set_method,\n");
	if ($set_method) {

		$L_SU->set_hash_ref($main_href);

		# print("2 main,_L_SU_bindings,method:$set_method\n");
		$L_SU->$set_method();

		# print("1. main, _L_SU_sunix_bindings: writing gui_history.txt\n");
		# $gui_history->view();

	}
	else {
		print("main, _L_SU_bindings, no method name: $set_method error 1,\n");
	}

	return ();
}

=head2 sub _L_SU_bindings_shell

 for any plot(s) in the background

=cut

sub _L_SU_bindings_shell {
	my ( $self, $set_method ) = @_;

	# print("1 main,_L_SU_bindings_shell, method:$set_method,\n");
	if ( length $set_method ) {

		my $button = $set_method;
		$gui_history->set_button($button);
		$main_href = $gui_history->get_defaults();

		$L_SU->set_hash_ref($main_href);

		# print("2 main,_L_SU, _L_SU_bindings_shell,method:$set_method\n");
		$L_SU->$set_method();

	  # print("1. main, _L_SU_sunix_bindings_shell: writing gui_history.txt\n");
	  # $gui_history->view();

	}
	else {
		print("_L_SU,_L_SU_bindings_shell, no method: $set_method error 1,\n");
	}

	return ();
}

=head2 sub _L_SU_sunix_bindings

used for 
	sunix_listbox get_help (MB3)
	sunix_select		   (MB1) 
method='sunix_select'
color='neutral'

=cut

sub _L_SU_sunix_bindings {
	my ( $self, $method, $color, $prog_group ) = @_;

# print("1 main,_L_SU_sunix_bindings,method,color,prog_group: $method,$color,$prog_group \n");
	if ( $method && $color && $prog_group ) {

		_set_prog_group($prog_group);
		my $button = $method;

#			print ("main,_L_SU_sunix_bindings,sunix_listbox:$main_href->{_sunix_listbox}\n");

		$gui_history->set_sunix_prog_group($prog_group);
		$gui_history->set_sunix_prog_group_color($color);
		$gui_history->set_button($button);

		#			print("1. main, _L_SU_sunix_bindings: writing gui_history.txt\n");
		#			$gui_history->view();

		$L_SU->set_hash_ref($main_href);
		$L_SU->user_built_flows($method);

	}
	else {
		print(
"main, _L_SU_sunix_bindings, no method, color or group : $method error 1,\n"
		);
	}

	return ();
}

=head2 sub _L_SU_flow_bindings

used for:
	sunix_listbox get_help (MB3)
	flow-item selection ('flow_select') (MB1)

Main
	L_SU, user_built_flows
			color_flow, flow_select

N.B. flow_select is activated both here and
independently 
within gui_history by set_button

=cut

sub _L_SU_flow_bindings {
	my ( $self, $method, $color ) = @_;

	#	print("1 main,_L_SU_flow_bindings ,method:$method,\n");
	if ( $method && $color ) {

		my $button = $method;

		$gui_history->set_flow_type($user_built);

		#		print("2. main, _L_SU_flow_bindings: writing gui_history.txt\n");
		# $gui_history->view();

		$gui_history->set_flow_select_color($color);

#					print("1. main,_L_SU_flow_bindings,color:$color\n");

		$L_SU->set_hash_ref($main_href);

		#			print("2. main,_L_SU_flow_bindings,method:$method\n");

		$L_SU->user_built_flows($method);

	}
	elsif ( not($method) && $color ) {

		print("main,_L_SU_flow_bindings, missing method\n");

	}
	else {
		print(
			"main, _L_SU_flow_bindings, no method, color : $method error 1,\n");
	}

	return ();
}

=head2 sub _L_SU_flow_bindings_any_color

 for any colored flow
 use to delete an item from a flow
 'delete_from_flow_button'
 used to move up and down a list of flow items
 'flow_item_up_arrow_button'
 'flow_item_down_arrow_button'
 'delete_whole_flow_button'

=cut

sub _L_SU_flow_bindings_any_color {
	my ( $self, $method ) = @_;

	#	print("1 main,_L_SU_flow_bindings ,method:$method,\n");
	if ($method) {

		my $button = $method;

		$gui_history->set_button($button);

		$main_href = $gui_history->get_defaults();

		$L_SU->set_hash_ref($main_href);

		# print("main,_L_SU_flow_bindings_any_color,method:$method\n");
		# print("main,_L_SU_flow_bindings_any_color,value: any_color\n");
		$L_SU->user_built_flows($method);

		# print("1 main,_L_SU_flow_bindings , print gui_history.txt\n");
		#$gui_history->view();

	}
	else {
		print("main _L_SU_flow_bindings, no method: $method error 1,\n");
	}

	return ();
}

=head2 sub _L_SU_superflow_bindings

Redirect user selections to L_SU.pm
for the case of: Help for superflows 
(mouse-button 3 bindings)


=cut

sub _L_SU_superflow_bindings {
	my ( $self, $set_method ) = @_;

	# print("1 main,_L_SU,method:$set_method,\n");
	if ($set_method) {

		$L_SU->set_hash_ref($main_href);

		# print("2 main,_L_SU, superflow_bindings,method:$set_method\n");
		$L_SU->$set_method();

#			print("1 main,_L_SU_bindings , print gui_superflow_bindings, history.txt\n");
		$gui_history->view();

	}
	else {
		print(
			"main,_L_SU_superflow_bindings, no method: $set_method error 1,\n");
	}

	return ();
}

=head2 sub _L_SU

Invoke a method in L_SU from a button click
in L_SU
	-save_button

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/dzdv_spec.pm  view on Meta::CPAN

my $DATA_SEISMIC_SU   = $Project->DATA_SEISMIC_SU();     # output data directory
my $DATA_SEISMIC_TXT  = $Project->DATA_SEISMIC_TXT();    # output data directory
my $PL_SEISMIC        = $Project->PL_SEISMIC();
my $PS_SEISMIC        = $Project->PS_SEISMIC();
my $max_index         = 14;

my $dzdv_spec = {
	_CONFIG                => $PL_SEISMIC,
	_DATA_DIR_IN           => $DATA_SEISMIC_BIN,
	_DATA_DIR_OUT          => $DATA_SEISMIC_SU,
	_binding_index_aref    => '',
	_suffix_type_in        => $su,
	_data_suffix_in        => $suffix_su,
	_suffix_type_out       => $su,
	_data_suffix_out       => $suffix_su,
	_file_dialog_type_aref => '',
	_flow_type_aref        => '',
	_has_infile            => $true,
	_has_outpar            => $false,
	_has_pipe_in           => $true,
	_has_pipe_out          => $true,

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/dzdv_spec.pm  view on Meta::CPAN

	_is_last_of_2          => $false,
	_is_last_of_3or_more   => $false,
	_is_last_of_4or_more   => $false,
	_is_suprog             => $true,
	_is_superflow          => $false,
	_max_index             => $max_index,
	_prefix_aref           => '',
	_suffix_aref           => '',
};

=head2  sub binding_index_aref

=cut

sub binding_index_aref {

	my $self = @_;

	my @index;

	# first binding index (index=0)
	# connects to second item (index=1)
	# in the parameter list
	$index[0]                         = 0;      # inbound/outbound item is bound
	$index[1]                         = 2;      # inbound/outbound item is bound
	$index[2]                         = 8;      # inbound/outbound item is bound
	$index[3]                         = 14;     # inbound/outbound item is bound
	$dzdv_spec->{_binding_index_aref} = \@index;
	return ();

}

=head2  sub file_dialog_type_aref

type of dialog (Data, Flow, SaveAs) is needed by binding
one type of dialog for each index
=cut

sub file_dialog_type_aref {

	my $self = @_;

	my @type;

	my $index_aref = get_binding_index_aref();
	my @index      = @$index_aref;

	# bound index will look for data
	$type[ $index[0] ] = $file_dialog_type->{_Data};
	$type[ $index[1] ] = $file_dialog_type->{_Data};
	$type[ $index[2] ] = $file_dialog_type->{_Data};
	$type[ $index[3] ] = $file_dialog_type->{_Data};

	$dzdv_spec->{_file_dialog_type_aref} = \@type;
	return ();

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/dzdv_spec.pm  view on Meta::CPAN


	my @type;

	$type[0] = $flow_type->{_user_built};

	$dzdv_spec->{_flow_type_aref} = \@type;
	return ();

}

=head2 sub get_binding_index_aref

=cut

sub get_binding_index_aref {

	my $self = @_;
	my @index;

	if ( $dzdv_spec->{_binding_index_aref} ) {

		my $index_aref = $dzdv_spec->{_binding_index_aref};
		return ($index_aref);

	}
	else {
		print(
			"dzdv_spec, get_binding_index_aref, missing binding_index_aref\n");
		return ();
	}

	my $index_aref = $dzdv_spec->{_binding_index_aref};
}

=head2 sub get_binding_length

=cut

sub get_binding_length {

	my $self = @_;

	if ( $dzdv_spec->{_binding_index_aref} ) {

		my $binding_length = scalar @{ $dzdv_spec->{_binding_index_aref} };
		return ($binding_length);

	}
	else {
		print("dzdv_spec, get_binding_length, missing binding_length\n");
		return ();
	}

	return ();
}

=head2 sub get_file_dialog_type_aref

=cut

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/dzdv_spec.pm  view on Meta::CPAN

	my $self = @_;

	my @prefix;

	for ( my $i = 0 ; $i < $max_index ; $i++ ) {

		$prefix[$i] = $empty_string;

	}

	my $index_aref = get_binding_index_aref();
	my @index      = @$index_aref;

	# label 1 in GUI is input/output xx_file and needs a home directory
	$prefix[ $index[0] ] = '$DATA_SEISMIC_BIN' . ".'/'.";

	# label 3 in GUI is input/output xx_file and needs a home directory
	$prefix[ $index[1] ] = '$DATA_SEISMIC_BIN' . ".'/'.";

	# label 9 in GUI is input/output xx_file and needs a home directory
	$prefix[ $index[2] ] = '$DATA_SEISMIC_BIN' . ".'/'.";

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/dzdv_spec.pm  view on Meta::CPAN

	my $self = @_;

	my @suffix;

	for ( my $i = 0 ; $i < $max_index ; $i++ ) {

		$suffix[$i] = $empty_string;

	}

	my $index_aref = get_binding_index_aref();
	my @index      = @$index_aref;

	# label 1 in GUI is input/ouput xx_file and needs a home directory
	$suffix[ $index[0] ] = '' . '' . '$suffix_bin';

	# label 3 in GUI is input/ouput xx_file and needs a home directory
	$suffix[ $index[1] ] = '' . '' . '$suffix_bin';

	# label 9 in GUI is input/ouput xx_file and needs a home directory
	$suffix[ $index[2] ] = '' . '' . '$suffix_bin';

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/sucvs4fowler_spec.pm  view on Meta::CPAN

my $DATA_SEISMIC_SU   = $Project->DATA_SEISMIC_SU();     # output data directory
my $DATA_SEISMIC_TXT  = $Project->DATA_SEISMIC_TXT();    # output data directory
my $PL_SEISMIC        = $Project->PL_SEISMIC();
my $PS_SEISMIC        = $Project->PS_SEISMIC();
my $max_index         = 12;

my $sucvs4fowler_spec = {
	_CONFIG                => $PL_SEISMIC,
	_DATA_DIR_IN           => $DATA_SEISMIC_BIN,
	_DATA_DIR_OUT          => $DATA_SEISMIC_SU,
	_binding_index_aref    => '',
	_suffix_type_in        => $su,
	_data_suffix_in        => $suffix_su,
	_suffix_type_out       => $su,
	_data_suffix_out       => $suffix_su,
	_file_dialog_type_aref => '',
	_flow_type_aref        => '',
	_has_infile            => $true,
	_has_outpar            => $false,
	_has_pipe_in           => $true,
	_has_pipe_out          => $true,

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/sucvs4fowler_spec.pm  view on Meta::CPAN

	_is_last_of_2          => $false,
	_is_last_of_3or_more   => $false,
	_is_last_of_4or_more   => $false,
	_is_suprog             => $true,
	_is_superflow          => $false,
	_max_index             => $max_index,
	_prefix_aref           => '',
	_suffix_aref           => '',
};

=head2  sub binding_index_aref

=cut

sub binding_index_aref {

	my $self = @_;

	my @index;

	# first binding index (index=0)
	# connects to second item (index=1)
	# in the parameter list
	#	$index[0] = 1; # inbound item is  bound
	#	$index[1]	= 2; # inbound item is  bound
	#	$index[2]	= 8; # outbound item is  bound

	$sucvs4fowler_spec->{_binding_index_aref} = \@index;
	return ();

}

=head2  sub file_dialog_type_aref

type of dialog (Data, Flow, SaveAs) is needed by binding
one type of dialog for each index
=cut

sub file_dialog_type_aref {

	my $self = @_;

	my @type;

	my $index_aref = get_binding_index_aref();
	my @index      = @$index_aref;

	# bound index will look for data
	$type[0] = '';

	#	$type[$index[0]] = $file_dialog_type->{_Data};
	#	$type[$index[1]]	=  $file_dialog_type->{_Data};
	#	$type[$index[2]]	=  $file_dialog_type->{_Data};

	$sucvs4fowler_spec->{_file_dialog_type_aref} = \@type;

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/sucvs4fowler_spec.pm  view on Meta::CPAN


	my @type;

	$type[0] = $flow_type->{_user_built};

	$sucvs4fowler_spec->{_flow_type_aref} = \@type;
	return ();

}

=head2 sub get_binding_index_aref

=cut

sub get_binding_index_aref {

	my $self = @_;
	my @index;

	if ( $sucvs4fowler_spec->{_binding_index_aref} ) {

		my $index_aref = $sucvs4fowler_spec->{_binding_index_aref};
		return ($index_aref);

	}
	else {
		print(
"sucvs4fowler_spec, get_binding_index_aref, missing binding_index_aref\n"
		);
		return ();
	}

	my $index_aref = $sucvs4fowler_spec->{_binding_index_aref};
}

=head2 sub get_binding_length

=cut

sub get_binding_length {

	my $self = @_;

	if ( $sucvs4fowler_spec->{_binding_index_aref} ) {

		my $binding_length =
		  scalar @{ $sucvs4fowler_spec->{_binding_index_aref} };
		return ($binding_length);

	}
	else {
		print(
			"sucvs4fowler_spec, get_binding_length, missing binding_length\n");
		return ();
	}

	return ();
}

=head2 sub get_file_dialog_type_aref

=cut

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/sucvs4fowler_spec.pm  view on Meta::CPAN

	my $self = @_;

	my @prefix;

	for ( my $i = 0 ; $i < $max_index ; $i++ ) {

		$prefix[$i] = $empty_string;

	}

	#	my $index_aref = get_binding_index_aref();
	#	my @index       = @$index_aref;

	# label 2 in GUI is input xx_file and needs a home directory
	#	$prefix[ $index[0] ] = '$DATA_SEISMIC_BIN' . ".'/'.";

	# label 3 in GUI is input yy_file and needs a home directory
	#	$prefix[ $index[1] ] = '$DATA_SEISMIC_TXT' . ".'/'.";

	# label 9 in GUI is input zz_file and needs a home directory
	#	$prefix[ $index[2] ] = '$DATA_SEISMIC_SU' . ".'/'.";

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/sucvs4fowler_spec.pm  view on Meta::CPAN

	my $self = @_;

	my @suffix;

	for ( my $i = 0 ; $i < $max_index ; $i++ ) {

		$suffix[$i] = $empty_string;

	}

	#	my $index_aref = get_binding_index_aref();
	#	my @index       = @$index_aref;

	# label 2 in GUI is input xx_file and needs a home directory
	#	$suffix[ $index[0] ] = ''.'' . '$suffix_bin';

	# label 3 in GUI is input yy_file and needs a home directory
	#	$suffix[ $index[1] ] = ''.'' . '$suffix_bin';

	# label 9 in GUI is output zz_file and needs a home directory
	#	$suffix[ $index[2] ] = ''.'' . '$suffix_su';

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/sudivstack_spec.pm  view on Meta::CPAN

my $DATA_SEISMIC_SU   = $Project->DATA_SEISMIC_SU();     # output data directory
my $DATA_SEISMIC_TXT  = $Project->DATA_SEISMIC_TXT();    # output data directory
my $PL_SEISMIC        = $Project->PL_SEISMIC();
my $PS_SEISMIC        = $Project->PS_SEISMIC();
my $max_index 		  = 2;

  my $sudivstack_spec = {
	_CONFIG                => $PL_SEISMIC,
	_DATA_DIR_IN           => $DATA_SEISMIC_BIN,
	_DATA_DIR_OUT          => $DATA_SEISMIC_SU,
	_binding_index_aref    => '',
	_suffix_type_in        => $su,
	_data_suffix_in        => $suffix_su,
	_suffix_type_out       => $su,
	_data_suffix_out       => $suffix_su,
	_file_dialog_type_aref => '',
	_flow_type_aref        => '',
	_has_infile            => $true,
	_has_outpar            => $false,
	_has_pipe_in           => $true,
	_has_pipe_out          => $true,

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/sudivstack_spec.pm  view on Meta::CPAN

	_is_last_of_2          => $false,
	_is_last_of_3or_more   => $false,
	_is_last_of_4or_more   => $false,
	_is_suprog             => $true,
	_is_superflow          => $false,
	_max_index             => $max_index,
	_prefix_aref           => '',
	_suffix_aref           => '',
  };

=head2  sub binding_index_aref

=cut

sub binding_index_aref {

	my $self = @_;

	my @index;

	# first binding index (index=0)
	# connects to second item (index=1)
	# in the parameter list
	#	$index[0] = 1; # inbound item is  bound
	#	$index[1]	= 2; # inbound item is  bound
	#	$index[2]	= 8; # outbound item is  bound

	$sudivstack_spec->{_binding_index_aref} = \@index;
	return ();

}

=head2  sub file_dialog_type_aref

type of dialog (Data, Flow, SaveAs) is needed by binding
one type of dialog for each index
=cut

sub file_dialog_type_aref {

	my $self = @_;

	my @type;

	my $index_aref = get_binding_index_aref();
	my @index      = @$index_aref;

	# bound index will look for data
	$type[0] = '';

	#	$type[$index[0]] = $file_dialog_type->{_Data};
	#	$type[$index[1]]	=  $file_dialog_type->{_Data};
	#	$type[$index[2]]	=  $file_dialog_type->{_Data};

	$sudivstack_spec->{_file_dialog_type_aref} = \@type;

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/sudivstack_spec.pm  view on Meta::CPAN


	my @type;

	$type[0] = $flow_type->{_user_built};

	$sudivstack_spec->{_flow_type_aref} = \@type;
	return ();

}

=head2 sub get_binding_index_aref

=cut

sub get_binding_index_aref {

	my $self = @_;
	my @index;

	if ( $sudivstack_spec->{_binding_index_aref} ) {

		my $index_aref = $sudivstack_spec->{_binding_index_aref};
		return ($index_aref);

	}
	else {
		print(
"sudivstack_spec, get_binding_index_aref, missing binding_index_aref\n"
		);
		return ();
	}

	my $index_aref = $sudivstack_spec->{_binding_index_aref};
}

=head2 sub get_binding_length

=cut

sub get_binding_length {

	my $self = @_;

	if ( $sudivstack_spec->{_binding_index_aref} ) {

		my $binding_length =
		  scalar @{ $sudivstack_spec->{_binding_index_aref} };
		return ($binding_length);

	}
	else {
		print("sudivstack_spec, get_binding_length, missing binding_length\n");
		return ();
	}

	return ();
}

=head2 sub get_file_dialog_type_aref

=cut

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/sudivstack_spec.pm  view on Meta::CPAN

	my $self = @_;

	my @prefix;

	for ( my $i = 0 ; $i < $max_index ; $i++ ) {

		$prefix[$i] = $empty_string;

	}

	#	my $index_aref = get_binding_index_aref();
	#	my @index       = @$index_aref;

	# label 2 in GUI is input xx_file and needs a home directory
	#	$prefix[ $index[0] ] = '$DATA_SEISMIC_BIN' . ".'/'.";

	# label 3 in GUI is input yy_file and needs a home directory
	#	$prefix[ $index[1] ] = '$DATA_SEISMIC_TXT' . ".'/'.";

	# label 9 in GUI is input zz_file and needs a home directory
	#	$prefix[ $index[2] ] = '$DATA_SEISMIC_SU' . ".'/'.";

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/sudivstack_spec.pm  view on Meta::CPAN

	my $self = @_;

	my @suffix;

	for ( my $i = 0 ; $i < $max_index ; $i++ ) {

		$suffix[$i] = $empty_string;

	}

	#	my $index_aref = get_binding_index_aref();
	#	my @index       = @$index_aref;

	# label 2 in GUI is input xx_file and needs a home directory
	#	$suffix[ $index[0] ] = ''.'' . '$suffix_bin';

	# label 3 in GUI is input yy_file and needs a home directory
	#	$suffix[ $index[1] ] = ''.'' . '$suffix_bin';

	# label 9 in GUI is output zz_file and needs a home directory
	#	$suffix[ $index[2] ] = ''.'' . '$suffix_su';

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/sudmofk_spec.pm  view on Meta::CPAN

my $DATA_SEISMIC_SU   = $Project->DATA_SEISMIC_SU();     # output data directory
my $DATA_SEISMIC_TXT  = $Project->DATA_SEISMIC_TXT();    # output data directory
my $PL_SEISMIC        = $Project->PL_SEISMIC();
my $PS_SEISMIC        = $Project->PS_SEISMIC();
my $max_index         = 9;

my $sudmofk_spec = {
	_CONFIG                => $PL_SEISMIC,
	_DATA_DIR_IN           => $DATA_SEISMIC_BIN,
	_DATA_DIR_OUT          => $DATA_SEISMIC_SU,
	_binding_index_aref    => '',
	_suffix_type_in        => $su,
	_data_suffix_in        => $suffix_su,
	_suffix_type_out       => $su,
	_data_suffix_out       => $suffix_su,
	_file_dialog_type_aref => '',
	_flow_type_aref        => '',
	_has_infile            => $true,
	_has_outpar            => $false,
	_has_pipe_in           => $true,
	_has_pipe_out          => $true,

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/sudmofk_spec.pm  view on Meta::CPAN

	_is_last_of_2          => $false,
	_is_last_of_3or_more   => $false,
	_is_last_of_4or_more   => $false,
	_is_suprog             => $true,
	_is_superflow          => $false,
	_max_index             => $max_index,
	_prefix_aref           => '',
	_suffix_aref           => '',
};

=head2  sub binding_index_aref

=cut

sub binding_index_aref {

	my $self = @_;

	my @index;

	# first binding index (index=0)
	# connects to second item (index=1)
	# in the parameter list
	#	$index[0] = 1; # inbound item is  bound
	#	$index[1]	= 2; # inbound item is  bound
	#	$index[2]	= 8; # outbound item is  bound

	$sudmofk_spec->{_binding_index_aref} = \@index;
	return ();

}

=head2  sub file_dialog_type_aref

type of dialog (Data, Flow, SaveAs) is needed by binding
one type of dialog for each index
=cut

sub file_dialog_type_aref {

	my $self = @_;

	my @type;

	my $index_aref = get_binding_index_aref();
	my @index      = @$index_aref;

	# bound index will look for data
	$type[0] = '';

	#	$type[$index[0]] = $file_dialog_type->{_Data};
	#	$type[$index[1]]	=  $file_dialog_type->{_Data};
	#	$type[$index[2]]	=  $file_dialog_type->{_Data};

	$sudmofk_spec->{_file_dialog_type_aref} = \@type;

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/sudmofk_spec.pm  view on Meta::CPAN


	my @type;

	$type[0] = $flow_type->{_user_built};

	$sudmofk_spec->{_flow_type_aref} = \@type;
	return ();

}

=head2 sub get_binding_index_aref

=cut

sub get_binding_index_aref {

	my $self = @_;
	my @index;

	if ( $sudmofk_spec->{_binding_index_aref} ) {

		my $index_aref = $sudmofk_spec->{_binding_index_aref};
		return ($index_aref);

	}
	else {
		print(
			"sudmofk_spec, get_binding_index_aref, missing binding_index_aref\n"
		);
		return ();
	}

	my $index_aref = $sudmofk_spec->{_binding_index_aref};
}

=head2 sub get_binding_length

=cut

sub get_binding_length {

	my $self = @_;

	if ( $sudmofk_spec->{_binding_index_aref} ) {

		my $binding_length = scalar @{ $sudmofk_spec->{_binding_index_aref} };
		return ($binding_length);

	}
	else {
		print("sudmofk_spec, get_binding_length, missing binding_length\n");
		return ();
	}

	return ();
}

=head2 sub get_file_dialog_type_aref

=cut

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/sudmofk_spec.pm  view on Meta::CPAN

	my $self = @_;

	my @prefix;

	for ( my $i = 0 ; $i < $max_index ; $i++ ) {

		$prefix[$i] = $empty_string;

	}

	#	my $index_aref = get_binding_index_aref();
	#	my @index       = @$index_aref;

	# label 2 in GUI is input xx_file and needs a home directory
	#	$prefix[ $index[0] ] = '$DATA_SEISMIC_BIN' . ".'/'.";

	# label 3 in GUI is input yy_file and needs a home directory
	#	$prefix[ $index[1] ] = '$DATA_SEISMIC_TXT' . ".'/'.";

	# label 9 in GUI is input zz_file and needs a home directory
	#	$prefix[ $index[2] ] = '$DATA_SEISMIC_SU' . ".'/'.";

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/sudmofk_spec.pm  view on Meta::CPAN

	my $self = @_;

	my @suffix;

	for ( my $i = 0 ; $i < $max_index ; $i++ ) {

		$suffix[$i] = $empty_string;

	}

	#	my $index_aref = get_binding_index_aref();
	#	my @index       = @$index_aref;

	# label 2 in GUI is input xx_file and needs a home directory
	#	$suffix[ $index[0] ] = ''.'' . '$suffix_bin';

	# label 3 in GUI is input yy_file and needs a home directory
	#	$suffix[ $index[1] ] = ''.'' . '$suffix_bin';

	# label 9 in GUI is output zz_file and needs a home directory
	#	$suffix[ $index[2] ] = ''.'' . '$suffix_su';

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/sudmofkcw_spec.pm  view on Meta::CPAN

my $DATA_SEISMIC_SU   = $Project->DATA_SEISMIC_SU();     # output data directory
my $DATA_SEISMIC_TXT  = $Project->DATA_SEISMIC_TXT();    # output data directory
my $PL_SEISMIC        = $Project->PL_SEISMIC();
my $PS_SEISMIC        = $Project->PS_SEISMIC();
my $max_index         = 12;

my $sudmofkcw_spec = {
	_CONFIG                => $PL_SEISMIC,
	_DATA_DIR_IN           => $DATA_SEISMIC_BIN,
	_DATA_DIR_OUT          => $DATA_SEISMIC_SU,
	_binding_index_aref    => '',
	_suffix_type_in        => $su,
	_data_suffix_in        => $suffix_su,
	_suffix_type_out       => $su,
	_data_suffix_out       => $suffix_su,
	_file_dialog_type_aref => '',
	_flow_type_aref        => '',
	_has_infile            => $true,
	_has_outpar            => $false,
	_has_pipe_in           => $true,
	_has_pipe_out          => $true,

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/sudmofkcw_spec.pm  view on Meta::CPAN

	_is_last_of_2          => $false,
	_is_last_of_3or_more   => $false,
	_is_last_of_4or_more   => $false,
	_is_suprog             => $true,
	_is_superflow          => $false,
	_max_index             => $max_index,
	_prefix_aref           => '',
	_suffix_aref           => '',
};

=head2  sub binding_index_aref

=cut

sub binding_index_aref {

	my $self = @_;

	my @index;

	# first binding index (index=0)
	# connects to second item (index=1)
	# in the parameter list
	#	$index[0] = 1; # inbound item is  bound
	#	$index[1]	= 2; # inbound item is  bound
	#	$index[2]	= 8; # outbound item is  bound

	$sudmofkcw_spec->{_binding_index_aref} = \@index;
	return ();

}

=head2  sub file_dialog_type_aref

type of dialog (Data, Flow, SaveAs) is needed by binding
one type of dialog for each index
=cut

sub file_dialog_type_aref {

	my $self = @_;

	my @type;

	my $index_aref = get_binding_index_aref();
	my @index      = @$index_aref;

	# bound index will look for data
	$type[0] = '';

	#	$type[$index[0]] = $file_dialog_type->{_Data};
	#	$type[$index[1]]	=  $file_dialog_type->{_Data};
	#	$type[$index[2]]	=  $file_dialog_type->{_Data};

	$sudmofkcw_spec->{_file_dialog_type_aref} = \@type;

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/sudmofkcw_spec.pm  view on Meta::CPAN


	my @type;

	$type[0] = $flow_type->{_user_built};

	$sudmofkcw_spec->{_flow_type_aref} = \@type;
	return ();

}

=head2 sub get_binding_index_aref

=cut

sub get_binding_index_aref {

	my $self = @_;
	my @index;

	if ( $sudmofkcw_spec->{_binding_index_aref} ) {

		my $index_aref = $sudmofkcw_spec->{_binding_index_aref};
		return ($index_aref);

	}
	else {
		print(
"sudmofkcw_spec, get_binding_index_aref, missing binding_index_aref\n"
		);
		return ();
	}

	my $index_aref = $sudmofkcw_spec->{_binding_index_aref};
}

=head2 sub get_binding_length

=cut

sub get_binding_length {

	my $self = @_;

	if ( $sudmofkcw_spec->{_binding_index_aref} ) {

		my $binding_length = scalar @{ $sudmofkcw_spec->{_binding_index_aref} };
		return ($binding_length);

	}
	else {
		print("sudmofkcw_spec, get_binding_length, missing binding_length\n");
		return ();
	}

	return ();
}

=head2 sub get_file_dialog_type_aref

=cut

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/sudmofkcw_spec.pm  view on Meta::CPAN

	my $self = @_;

	my @prefix;

	for ( my $i = 0 ; $i < $max_index ; $i++ ) {

		$prefix[$i] = $empty_string;

	}

	#	my $index_aref = get_binding_index_aref();
	#	my @index       = @$index_aref;

	# label 2 in GUI is input xx_file and needs a home directory
	#	$prefix[ $index[0] ] = '$DATA_SEISMIC_BIN' . ".'/'.";

	# label 3 in GUI is input yy_file and needs a home directory
	#	$prefix[ $index[1] ] = '$DATA_SEISMIC_TXT' . ".'/'.";

	# label 9 in GUI is input zz_file and needs a home directory
	#	$prefix[ $index[2] ] = '$DATA_SEISMIC_SU' . ".'/'.";

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/sudmofkcw_spec.pm  view on Meta::CPAN

	my $self = @_;

	my @suffix;

	for ( my $i = 0 ; $i < $max_index ; $i++ ) {

		$suffix[$i] = $empty_string;

	}

	#	my $index_aref = get_binding_index_aref();
	#	my @index       = @$index_aref;

	# label 2 in GUI is input xx_file and needs a home directory
	#	$suffix[ $index[0] ] = ''.'' . '$suffix_bin';

	# label 3 in GUI is input yy_file and needs a home directory
	#	$suffix[ $index[1] ] = ''.'' . '$suffix_bin';

	# label 9 in GUI is output zz_file and needs a home directory
	#	$suffix[ $index[2] ] = ''.'' . '$suffix_su';

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/sudmotivz_spec.pm  view on Meta::CPAN

my $DATA_SEISMIC_SU   = $Project->DATA_SEISMIC_SU();     # output data directory
my $DATA_SEISMIC_TXT  = $Project->DATA_SEISMIC_TXT();    # output data directory
my $PL_SEISMIC        = $Project->PL_SEISMIC();
my $PS_SEISMIC        = $Project->PS_SEISMIC();
my $max_index         = 13;

my $sudmotivz_spec = {
	_CONFIG                => $PL_SEISMIC,
	_DATA_DIR_IN           => $DATA_SEISMIC_BIN,
	_DATA_DIR_OUT          => $DATA_SEISMIC_SU,
	_binding_index_aref    => '',
	_suffix_type_in        => $su,
	_data_suffix_in        => $suffix_su,
	_suffix_type_out       => $su,
	_data_suffix_out       => $suffix_su,
	_file_dialog_type_aref => '',
	_flow_type_aref        => '',
	_has_infile            => $true,
	_has_outpar            => $false,
	_has_pipe_in           => $true,
	_has_pipe_out          => $true,

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/sudmotivz_spec.pm  view on Meta::CPAN

	_is_last_of_2          => $false,
	_is_last_of_3or_more   => $false,
	_is_last_of_4or_more   => $false,
	_is_suprog             => $true,
	_is_superflow          => $false,
	_max_index             => $max_index,
	_prefix_aref           => '',
	_suffix_aref           => '',
};

=head2  sub binding_index_aref

=cut

sub binding_index_aref {

	my $self = @_;

	my @index;

	# first binding index (index=0)
	# connects to second item (index=1)
	# in the parameter list
	$index[0] = 4;     # inbound item is  bound
	$index[1] = 11;    # inbound item is  bound
	$index[2] = 13;    # outbound item is  bound

	$sudmotivz_spec->{_binding_index_aref} = \@index;
	return ();

}

=head2  sub file_dialog_type_aref

type of dialog (Data, Flow, SaveAs) is needed by binding
one type of dialog for each index
=cut

sub file_dialog_type_aref {

	my $self = @_;

	my @type;

	my $index_aref = get_binding_index_aref();
	my @index      = @$index_aref;

	# bound index will look for data
	#	$type[0]	= '';
	$type[ $index[0] ] = $file_dialog_type->{_Data};
	$type[ $index[1] ] = $file_dialog_type->{_Data};
	$type[ $index[2] ] = $file_dialog_type->{_Data};

	$sudmotivz_spec->{_file_dialog_type_aref} = \@type;
	return ();

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/sudmotivz_spec.pm  view on Meta::CPAN


	my @type;

	$type[0] = $flow_type->{_user_built};

	$sudmotivz_spec->{_flow_type_aref} = \@type;
	return ();

}

=head2 sub get_binding_index_aref

=cut

sub get_binding_index_aref {

	my $self = @_;
	my @index;

	if ( $sudmotivz_spec->{_binding_index_aref} ) {

		my $index_aref = $sudmotivz_spec->{_binding_index_aref};
		return ($index_aref);

	}
	else {
		print(
"sudmotivz_spec, get_binding_index_aref, missing binding_index_aref\n"
		);
		return ();
	}

	my $index_aref = $sudmotivz_spec->{_binding_index_aref};
}

=head2 sub get_binding_length

=cut

sub get_binding_length {

	my $self = @_;

	if ( $sudmotivz_spec->{_binding_index_aref} ) {

		my $binding_length = scalar @{ $sudmotivz_spec->{_binding_index_aref} };
		return ($binding_length);

	}
	else {
		print("sudmotivz_spec, get_binding_length, missing binding_length\n");
		return ();
	}

	return ();
}

=head2 sub get_file_dialog_type_aref

=cut

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/sudmotivz_spec.pm  view on Meta::CPAN


	my $self = @_;

	my @prefix;

	for ( my $i = 0 ; $i < $max_index ; $i++ ) {

		$prefix[$i] = $empty_string;

	}
	my $index_aref = get_binding_index_aref();
	my @index      = @$index_aref;

	# label 5 in GUI is input xx_file and needs a home directory
	$prefix[ $index[0] ] = '$DATA_SEISMIC_BIN' . ".'/'.";

	# label 12 in GUI is input yy_file and needs a home directory
	$prefix[ $index[1] ] = '$DATA_SEISMIC_BIN' . ".'/'.";

	# label 14 in GUI is input zz_file and needs a home directory
	$prefix[ $index[2] ] = '$DATA_SEISMIC_BIN' . ".'/'.";

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/sudmotivz_spec.pm  view on Meta::CPAN

	my $self = @_;

	my @suffix;

	for ( my $i = 0 ; $i < $max_index ; $i++ ) {

		$suffix[$i] = $empty_string;

	}

	my $index_aref = get_binding_index_aref();
	my @index      = @$index_aref;

	# label 5 in GUI is input xx_file and needs a home directory
	$suffix[ $index[0] ] = '' . '' . '$suffix_bin';

	# label 12 in GUI is input yy_file and needs a home directory
	$suffix[ $index[1] ] = '' . '' . '$suffix_bin';

	# label 14 in GUI is output zz_file and needs a home directory
	$suffix[ $index[2] ] = '' . '' . '$suffix_bin';

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/sudmotx_spec.pm  view on Meta::CPAN

my $DATA_SEISMIC_SU   = $Project->DATA_SEISMIC_SU();     # output data directory
my $DATA_SEISMIC_TXT  = $Project->DATA_SEISMIC_TXT();    # output data directory
my $PL_SEISMIC        = $Project->PL_SEISMIC();
my $PS_SEISMIC        = $Project->PS_SEISMIC();
my $max_index         = 8;

my $sudmotx_spec = {
	_CONFIG                => $PL_SEISMIC,
	_DATA_DIR_IN           => $DATA_SEISMIC_BIN,
	_DATA_DIR_OUT          => $DATA_SEISMIC_SU,
	_binding_index_aref    => '',
	_suffix_type_in        => $su,
	_data_suffix_in        => $suffix_su,
	_suffix_type_out       => $su,
	_data_suffix_out       => $suffix_su,
	_file_dialog_type_aref => '',
	_flow_type_aref        => '',
	_has_infile            => $true,
	_has_outpar            => $false,
	_has_pipe_in           => $true,
	_has_pipe_out          => $true,

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/sudmotx_spec.pm  view on Meta::CPAN

	_is_last_of_2          => $false,
	_is_last_of_3or_more   => $false,
	_is_last_of_4or_more   => $false,
	_is_suprog             => $true,
	_is_superflow          => $false,
	_max_index             => $max_index,
	_prefix_aref           => '',
	_suffix_aref           => '',
};

=head2  sub binding_index_aref

=cut

sub binding_index_aref {

	my $self = @_;

	my @index;

	# first binding index (index=0)
	# connects to second item (index=1)
	# in the parameter list
	#	$index[0] = 1; # inbound item is  bound
	#	$index[1]	= 2; # inbound item is  bound
	#	$index[2]	= 8; # outbound item is  bound

	$sudmotx_spec->{_binding_index_aref} = \@index;
	return ();

}

=head2  sub file_dialog_type_aref

type of dialog (Data, Flow, SaveAs) is needed by binding
one type of dialog for each index
=cut

sub file_dialog_type_aref {

	my $self = @_;

	my @type;

	my $index_aref = get_binding_index_aref();
	my @index      = @$index_aref;

	# bound index will look for data
	$type[0] = '';

	#	$type[$index[0]] = $file_dialog_type->{_Data};
	#	$type[$index[1]]	=  $file_dialog_type->{_Data};
	#	$type[$index[2]]	=  $file_dialog_type->{_Data};

	$sudmotx_spec->{_file_dialog_type_aref} = \@type;

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/sudmotx_spec.pm  view on Meta::CPAN


	my @type;

	$type[0] = $flow_type->{_user_built};

	$sudmotx_spec->{_flow_type_aref} = \@type;
	return ();

}

=head2 sub get_binding_index_aref

=cut

sub get_binding_index_aref {

	my $self = @_;
	my @index;

	if ( $sudmotx_spec->{_binding_index_aref} ) {

		my $index_aref = $sudmotx_spec->{_binding_index_aref};
		return ($index_aref);

	}
	else {
		print(
			"sudmotx_spec, get_binding_index_aref, missing binding_index_aref\n"
		);
		return ();
	}

	my $index_aref = $sudmotx_spec->{_binding_index_aref};
}

=head2 sub get_binding_length

=cut

sub get_binding_length {

	my $self = @_;

	if ( $sudmotx_spec->{_binding_index_aref} ) {

		my $binding_length = scalar @{ $sudmotx_spec->{_binding_index_aref} };
		return ($binding_length);

	}
	else {
		print("sudmotx_spec, get_binding_length, missing binding_length\n");
		return ();
	}

	return ();
}

=head2 sub get_file_dialog_type_aref

=cut

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/sudmotx_spec.pm  view on Meta::CPAN

	my $self = @_;

	my @prefix;

	for ( my $i = 0 ; $i < $max_index ; $i++ ) {

		$prefix[$i] = $empty_string;

	}

	#	my $index_aref = get_binding_index_aref();
	#	my @index       = @$index_aref;

	# label 2 in GUI is input xx_file and needs a home directory
	#	$prefix[ $index[0] ] = '$DATA_SEISMIC_BIN' . ".'/'.";

	# label 3 in GUI is input yy_file and needs a home directory
	#	$prefix[ $index[1] ] = '$DATA_SEISMIC_TXT' . ".'/'.";

	# label 9 in GUI is input zz_file and needs a home directory
	#	$prefix[ $index[2] ] = '$DATA_SEISMIC_SU' . ".'/'.";

lib/App/SeismicUnixGui/specs/NMO_Vel_Stk/sudmotx_spec.pm  view on Meta::CPAN

	my $self = @_;

	my @suffix;

	for ( my $i = 0 ; $i < $max_index ; $i++ ) {

		$suffix[$i] = $empty_string;

	}

	#	my $index_aref = get_binding_index_aref();
	#	my @index       = @$index_aref;

	# label 2 in GUI is input xx_file and needs a home directory
	#	$suffix[ $index[0] ] = ''.'' . '$suffix_bin';

	# label 3 in GUI is input yy_file and needs a home directory
	#	$suffix[ $index[1] ] = ''.'' . '$suffix_bin';

	# label 9 in GUI is output zz_file and needs a home directory
	#	$suffix[ $index[2] ] = ''.'' . '$suffix_su';



( run in 1.901 second using v1.01-cache-2.11-cpan-2398b32b56e )