DOCUMENTATION

SYNOPSIS

PERL PROGRAM NAME: param_widgets4pre_built_streams
AUTHOR:  Juan Lorenzo

CHANGES and their DATES

DATE: V 1.0.1 May 6 2018

DESCRIPTION

manages the parameter labels, values and their
checkboxes in the guis

USE

Examples

STEPS

NOTES

Declare

local variables

_changes

to only one parameter
some changes will be false and should be rejected

If you are at this subroutine it means that
a possible change has been detected in
the Entry Widget TODO: yet to be ratified

Currently if we reach this subroutine we assume that changes always occur to 
all parameters and so we 
forcibly check for changes always

sub error_check

When entry values are in error 

sub get_check_buttons_w_aref

sub

sub get_entry_change_status

sub get_labels_w_aref

sub get_length_check_buttons_on

sub get_index_check_buttons_on

get_values_w_aref

return an array widget references

sub _max_length_in_gui

sub _set_length_in_gui

sub gui_full_clear

clear the gui completely of 61 parameter values 61 = current defaulted maximum number of variables in a list box

# my $safe = $param_widgets->{_length}; # _max_length_in_gui(); # print("param_widgets_neutral, gui_full_clear, length used for cleaning $param_widgets_color_href->{_length} \n");

# print("param_widgets_neutral, gui_full_clear, _values_w_aref, $param_widgets_color_href->{_values_w_aref} \n");
# print("param_widgets_neutral, gui_full_clear, _labels_w_aref, $param_widgets_color_href->{_labels_w_aref} \n");

# return to original length value # _set_length_in_gui($safe); # print("param_widgets_grey, gui_full_clear, restored length $param_widgets_color_href->{_length} \n");

sub local_set_entry_change_status

sub local_update_check_button_setting

update for one parameter index 
in currently active program

Entry widget uses textvariables

sub local_set_last_changed_entry_index

sub set_check_buttons a widget reference

sub get_current_widget_name

screen location by using part of the widget name
   print(" self:$self widget: $widget\n");
   print(" currently  focus lies in: $screen_location\n");
   print(" reference: $reference\n");
  foreach my $i (@fields) {
   print(" 2. widget is $i\n");
   my $screen_location = $widget->focusCurrent;
   my $reference       = ref $screen_location;
   print(" 1. widget is $a\n");
   print ( "widget is $fields[-1]\n");
   name is in the last element of the split array 

 if widget_name= frame then we have flow
             $var->{_flow}
 if widget_name= menubutton we have superflow 
             $var->{_tool}

sub get_check_buttons_settings_aref

sub _get_check_buttons_settings_aref

sub get_entry_button_chosen_index

sub get_label4entry_button_chosen

determine which Entry Button is chosen

   print("param is $entry_param;\n");
        print ("selected widget is # $LSU->{_parameter_value_index}\");
        print ("label is  $out\n");

sub get_value4entry_button_chosen

determine which Entry Button is chosen

   print("param is $entry_param;\n");
        print ("selected widget is # $LSU->{_parameter_value_index}\");
        print ("label is  $out\n");

sub get_values_aref

all the values for one program at a time

sub get_labels_aref

equivalent to get_naems_aref

sub get_names_aref

equivalent to get_labels_aref

sub initialize_check_buttons

same set of check buttons for all programs 

sub initialize_labels

sub initialize_values

sub set_range

sub range

	establish the first and last
    indices of the array
  	  	 foreach my $key (sort keys %$ref_hash) {
  			print (" param_widgets4pre_built_streams,range, key is $key, value is $ref_hash->{$key}\n");
  		} 

sub redisplay_check_buttons

update colors in check button boxes

sub redisplay_labels

print("1. redisplay, resdisplay_labels, text is @{$label_array_ref}[$i]\n");
print("redisplay, resdisplay_labels, i is $i\n");
print("2. redisplay, resdisplay_labels, text is @{$LSU->{_label_array_ref}}[$i]\n");

sub redisplay_values

display parameter values without quotes
although internally we always have quotes for strings
and no quotes if the value looks like a number

i/p: 2 array references
o/p: array reference

N.B. This is an ENTRY widget
textvariables must be a reference in order
for -validatecommand to work. BEWARE!

9.27.23
Clear the GUI first and then redisplay values

sub set_current_program

used in main by
flow_select, 
sunix_select 
and delete_from_flow_button

sub set_first_idx

=0

TODO... for retirement

sub set_labels_frame

a widget reference

sub set_length

override default length values

sub set_check_buttons_w_aref

set_labels_w_aref

sub set_values_frame

a widget reference

set_values_w_aref

sub show_values

packing

sub set_check_buttons_frame

set check_buttons by user from outside 

sub set_entry_change_status

sub set_hash_ref

bring gui history parameters in to share
and update
	

sub set_labels

set labels by user from outside 

sub set_prog_name_sref set prog_name by user from outside

sub set_value4entry_button_chosen

dassign value to  Entry Buttonchosen

   print("param is $entry_param;\n");
        print ("selected widget is # $LSU->{_parameter_value_index}\");
        print ("label is  $out\n");

sub set_values

set values by user from outside 

sub show_check_buttons

packing

sub show_labels

specs come from local private variables
uses default specs, unless overwritten
specs are not fed from above

packing