DOCUMENTATION
SYNOPSIS
PERL PROGRAM NAME: param_widgets_neutral
AUTHOR: Juan Lorenzo
CHANGES and their DATES
DATE: V 0.0.1 May 6 2018
DESCRIPTION
manages the parameter labels, values and their
checkboxes in the guis
USE
Examples
STEPS
NOTES V 0.0.2 Sept. 24 2019 uses gui_history
Declare local variables
sub get_hash_ref
bring gui history parameters in to share
and update
# initialize default parameter values from gui_history
# needed herein
sub set_hash_ref
bring gui history parameters in to share
and update
sub _reset
private reset of "condition" variables
do not reset incoming widgets
_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
Currently if we reach this subroutine we
will assume that changes always occur to
all parameters
Somewhere else we will have to
forcibly check for and accept all changes
changes are only allowed for those sunix programs whose spec files
have a max_index defined
currently changes in param_widgets_neutral package only works with regular flows
and not with pre-built superflows
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
sub _set_entry_change_status
sub _update_check_button_setting
update for one parameter index
in currently active program
Entry widget uses textvariables
sub _set_index_on_entry
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 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!
DB
sub set_current_program
used in main by
flow_select,
sunix_select
and delete_from_flow_button
sub set_first_idx
=0
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_location_in_gui
set check_buttons by user from outside
foreach my $key (sort keys %$here) {
print (" param_widgets,set_location_in_gui, key is $key, value is $here->{$key}\n");
}
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
assign value to Entry Button chosen
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