lib/App/SeismicUnixGui/misc/gui_history.pm untested

filter: Statementstmt 0.0% 0 / 723 Branchbran 0.0% 0 / 224 Conditioncond 0.0% 0 / 101 MC/DCmcdc 0.0% 0 / 66 Subroutinesub 0.0% 0 / 35 Podpod 0.0% 0 / 31 totaltotal 0.0% 0 / 1180 CC 112 SCAR 72.1
CC
112
Cov
0%
view
3306.0
_update_button
420.0
_update_parameter_index_on_exit
30.0
CRAP 1353.2
1 package App::SeismicUnixGui::misc::gui_history;
2  
3 =head1 DOCUMENTATION
4  
5 =head2 SYNOPSIS
6  
7 PERL PROGRAM NAME: gui_history
8 AUTHOR: Juan Lorenzo
9 DATE: September 1 2019
10  
11  
12 DESCRIPTION
13 Global inventory of user interactions with the gui.
14  
15 BASED ON:
16  
17  
18 =cut
19  
20 =head2 USE
21  
22 =head3 NOTES
23  
24 =head4 Examples
25  
26 =head2 CHANGES and their DATES
27 9-1-19 0.0.1 dabbling with refs
28 9-12-19 0.0.2
29 7.20.21 initialize some hashes
30  
31 =cut
32  
33 =head2 Notes from bash
34
35 =cut
36  
37 #use namespace::autoclean; for later
38 use Moose;
39 our $VERSION = '0.0.2';
40  
41 =head2 Import modules
42 potentially, all packages contain L_SU_global_constants
43  
44 =cut
45  
46 my $path;
47 my $SeismicUnixGui;
48  
49 use aliased 'App::SeismicUnixGui::misc::conditions4flows';
50 # use aliased 'App::SeismicUnixGui::misc::conditions4big_streams';
51  
52 extends(
53 'App::SeismicUnixGui::misc::conditions4flows' => { -version => 0.0.2 },
54 # 'App::SeismicUnixGui::misc::conditions4big_streams' => { -version => 0.0.2 },
55 );
56  
57 use aliased 'App::SeismicUnixGui::misc::L_SU_global_constants';
58 use aliased 'App::SeismicUnixGui::misc::flow_widgets';
59  
60 =head2 Instantiation
61  
62 =cut
63  
64 my $flow_widgets = flow_widgets->new();
65 my $get = L_SU_global_constants->new();
66  
67 =head2 Declare Special Variables
68  
69 =cut
70  
71 my $var = $get->var();
72 my $default_param_specs = $get->param();
73 my $on = $var->{_on};
74 my $true = $var->{_true};
75 my $false = $var->{_false};
76 my $empty_string = $var->{_empty_string};
77 my $flow_type = $get->flow_type_href();
78 my @array_ref;
79 my @empty_array = (0); # length=1
80  
81 my $index_start = -1;
82 my $earliest_index_start = -3;
83 my $prior_index_start = -2;
84 my $current_index_start = -1;
85 my $next_index_start = 0;
86  
87 my $no_color = 'no_color';
88 my $neutral = 'neutral';
89 my $earliest_color_start = $no_color;
90 my $current_color_start = $no_color;
91 my $next_color_start = $no_color;
92 my $prior_color_start = $no_color;
93  
94 my $count_start = -1;
95  
96 has '_count' => (
97 default => $count_start,
98 is => 'ro',
99 isa => 'Int',
100 reader => 'get_count',
101 writer => 'set_count',
102 predicate => 'has_count',
103 );
104  
105 =head2 Declare attributes
106  
107 =cut
108  
109 has 'FileDialog_type' => (
110 default => '',
111 is => 'ro',
112 isa => 'Str',
113 reader => 'get_FileDialog_type',
114 writer => 'set_FileDialog_type',
115 predicate => 'has_FileDialog_type',
116 trigger => \&_update_FileDialog_type,
117 );
118  
119 has 'button' => (
120 default => 'no_button',
121 is => 'rw',
122 isa => 'Str',
123 reader => 'get_button',
124 writer => 'set_button',
125 predicate => 'has_button',
126 trigger => \&_update_button,
127 );
128  
129 has 'clear' => (
130 default => 'no_clear',
131 is => 'ro',
132 isa => 'Str',
133 reader => 'get_clear',
134 writer => 'set_clear',
135 predicate => 'has_clear',
136 trigger => \&_clear,
137 );
138  
139 has 'flow_select_color' => (
140 default => $no_color,
141 is => 'ro',
142 isa => 'Str',
143 reader => 'get_flow_select_color',
144 writer => 'set_flow_select_color',
145 predicate => 'has_flow_select_color',
146 trigger => \&_update_flow_select_color,
147  
148 );
149  
150 has 'add2flow_color' => (
151 default => $no_color,
152 is => 'ro',
153 isa => 'Str',
154 reader => 'get_add2flow_color',
155 writer => 'set_add2flow_color',
156 predicate => 'has_add2flow_color',
157 trigger => \&_update_add2flow_color,
158  
159 );
160  
161 has 'defaults' => (
162  
163 is => 'ro',
164 isa => 'HashRef',
165 reader => 'get_defaults',
166 writer => 'set_defaults',
167 predicate => 'has_defaults',
168  
169 );
170  
171 has 'flow_listbox' => (
172  
173 is => 'ro',
174 isa => 'HashRef',
175 reader => 'get_flow_listbox',
176 writer => 'set_flow_listbox',
177 predicate => 'has_flow_listbox',
178 trigger => \&_update_flow_listbox_color_w,
179  
180 );
181  
182 has 'flow_type' => (
183 default => $empty_string,
184 is => 'ro',
185 isa => 'Str',
186 reader => 'get_flow_type',
187 writer => 'set_flow_type',
188 predicate => 'has_flow_type',
189 trigger => \&_update_flow_type,
190 );
191  
192 has 'help_menubutton_type' => (
193 default => '',
194 is => 'ro',
195 isa => 'Str',
196 reader => 'get_help_menubutton_type',
197 writer => 'set_help_menubutton_type',
198 predicate => 'has_help_menubutton_type',
199 trigger => \&_update_help_menubutton_type,
200 );
201  
202 has 'parameter_color_on_entry' => (
203 default => $count_start,
204 is => 'ro',
205 isa => 'Str',
206 reader => 'get_parameter_color_on_entry',
207 writer => 'set_parameter_color_on_entry',
208 predicate => 'has_parameter_color_on_entry',
209 trigger => \&_update_parameter_color_on_entry,
210  
211 );
212  
213 has 'parameter_color_on_exit' => (
214 default => $count_start,
215 is => 'ro',
216 isa => 'Str',
217 reader => 'get_parameter_color_on_exit',
218 writer => 'set_parameter_color_on_exit',
219 predicate => 'has_parameter_color_on_exit',
220 trigger => \&_update_parameter_color_on_exit,
221 );
222  
223 has 'parameter_index_on_entry' => (
224 default => $count_start,
225 is => 'ro',
226 isa => 'Int',
227 reader => 'get_parameter_index_on_entry',
228 writer => 'set_parameter_index_on_entry',
229 predicate => 'has_parameter_index_on_entry',
230 trigger => \&_update_parameter_index_on_entry,
231  
232 );
233  
234 has 'parameter_index_on_exit' => (
235 default => $count_start,
236 is => 'ro',
237 isa => 'Int',
238 reader => 'get_parameter_index_on_exit',
239 writer => 'set_parameter_index_on_exit',
240 predicate => 'has_parameter_index_on_exit',
241 trigger => \&_update_parameter_index_on_exit,
242 );
243  
244 has 'sunix_prog_group' => (
245  
246 is => 'ro',
247 isa => 'Str',
248 reader => 'get_sunix_prog_group',
249 writer => 'set_sunix_prog_group',
250 predicate => 'has_sunix_prog_group',
251 trigger => \&_update_sunix_prog_group,
252  
253 );
254  
255 has 'subtract' => (
256 default => 'no_subtract',
257 is => 'ro',
258 isa => 'Str',
259 reader => 'get_subtract',
260 writer => 'set_subtract',
261 predicate => 'has_subtract',
262 trigger => \&_subtract,
263 );
264  
265 has 'sunix_prog_group_color' => (
266  
267 is => 'ro',
268 isa => 'Str',
269 reader => 'get_sunix_prog_group_color',
270 writer => 'set_sunix_prog_group_color',
271 predicate => 'has_sunix_prog_group_color',
272 trigger => \&_update_sunix_prog_group_color,
273  
274 );
275  
276 has 'superflow_tool' => (
277 default => '',
278 is => 'ro',
279 isa => 'Str',
280 reader => 'get_superflow_tool',
281 writer => 'set_superflow_tool',
282 predicate => 'has_superflow_tool',
283 trigger => \&_update_superflow_tool,
284 );
285  
286 =head2 private anonymous hashes containing
287 sequential history
288  
289 =cut
290  
291 my $FileDialog_type_href = {
292 _item => $empty_string,
293 _index => $empty_string,
294 _name => 'FileDialog_type',
295 _most_recent => $empty_string,
296 _earliest => $empty_string,
297 _next => $empty_string,
298 _prior => $empty_string,
299 };
300  
301 my $FileDialog_button_click_seq_href = {
302 _item => $empty_string,
303 _index => $index_start,
304 _name => 'FileDialog_button_seq',
305 _most_recent => $current_index_start,
306 _earliest => $earliest_index_start,
307 _next => $next_index_start,
308 _prior => $prior_index_start,
309 };
310  
311 my $add2flow_button_click_seq_href = {
312 _item => $empty_string,
313 _index => $index_start,
314 _name => 'add2flow_button_seq',
315 _most_recent => $current_index_start,
316 _earliest => $earliest_index_start,
317 _next => $next_index_start,
318 _prior => $prior_index_start,
319 };
320  
321 =head2 private anonymous hashes containing history
322  
323 =cut
324  
325 my $add2flow_button_color_href = {
326 _item => $empty_string,
327 _index => $index_start,
328 _name => 'add2flow_button_color',
329 _most_recent => $current_color_start,
330 _earliest => $earliest_color_start,
331 _next => $next_color_start,
332 _prior => $prior_color_start,
333 };
334  
335 my $button_href = {
336 _item => $empty_string,
337 _index => $empty_string,
338 _name => 'button',
339 _most_recent => $empty_string,
340 _earliest => $empty_string,
341 _next => $empty_string,
342 _prior => $empty_string,
343 };
344  
345 my $delete_from_flow_button_click_seq_href = {
346 _item => $empty_string,
347 _index => $index_start,
348 _name => 'delete_from_flow_button_seq',
349 _most_recent => $current_index_start,
350 _earliest => $earliest_index_start,
351 _next => $next_index_start,
352 _prior => $prior_index_start,
353 };
354  
355 my $delete_whole_flow_button_click_seq_href = {
356 _item => $empty_string,
357 _index => $index_start,
358 _name => 'delete_whole_flow_button_seq',
359 _most_recent => $current_index_start,
360 _earliest => $earliest_index_start,
361 _next => $next_index_start,
362 _prior => $prior_index_start,
363 };
364  
365 my $flow_listbox_color_w_href = {
366 _item => $empty_string,
367 _index => $empty_string,
368 _name => 'flow_listbox_color_w',
369 _most_recent => $empty_string,
370 _earliest => $empty_string,
371 _next => $empty_string,
372 _prior => $empty_string,
373 };
374  
375 my $flow_item_down_arrow_button_click_seq_href = {
376 _item => $empty_string,
377 _index => $index_start,
378 _name => 'flow_item_down_arrow_button_seq',
379 _most_recent => $current_index_start,
380 _earliest => $earliest_index_start,
381 _next => $next_index_start,
382 _prior => $prior_index_start,
383 };
384  
385 my $flow_item_up_arrow_button_click_seq_href = {
386 _item => $empty_string,
387 _index => $index_start,
388 _name => 'flow_item_up_arrow_button_seq',
389 _most_recent => $current_index_start,
390 _earliest => $earliest_index_start,
391 _next => $next_index_start,
392 _prior => $prior_index_start,
393 };
394  
395 my $flow_select_color_href = {
396 _item => $empty_string,
397 _index => $no_color,
398 _name => 'flow_select_color',
399 _most_recent => $no_color,
400 _earliest => $no_color,
401 _next => $no_color,
402 _prior => $no_color,
403 };
404  
405 my $flow_select_index_href = {
406 _item => $empty_string,
407 _index => $index_start,
408 _name => 'flow_select_index',
409 _most_recent => $current_index_start,
410 _earliest => $earliest_index_start,
411 _next => $next_index_start,
412 _prior => $prior_index_start,
413 };
414  
415 my $flow_select_click_seq_href = {
416 _item => $empty_string,
417 _index => $index_start,
418 _name => 'flow_select_seq',
419 _most_recent => $current_index_start,
420 _earliest => $earliest_index_start,
421 _next => $next_index_start,
422 _prior => $prior_index_start,
423 };
424  
425 my $flow_type_href = {
426 _item => $empty_string,
427 _index => $index_start,
428 _name => 'flow_type',
429 _most_recent => $current_index_start,
430 _earliest => $earliest_index_start,
431 _next => $next_index_start,
432 _prior => $prior_index_start,
433 };
434  
435 my $help_menubutton_click_seq_href = {
436 _item => $empty_string,
437 _index => $index_start,
438 _name => 'help_menubutton_seq',
439 _most_recent => $current_index_start,
440 _earliest => $earliest_index_start,
441 _next => $next_index_start,
442 _prior => $prior_index_start,
443 };
444  
445 my $help_menubutton_type_href = {
446 _item => $empty_string,
447 _index => $empty_string,
448 _name => 'help_menubutton_type',
449 _most_recent => $empty_string,
450 _earliest => $empty_string,
451 _next => $empty_string,
452 _prior => $empty_string,
453 };
454  
455 my $parameter_color_on_entry_href = {
456 _item => $empty_string,
457 _index => $empty_string,
458 _name => 'parameter_color_on_entry',
459 _most_recent => $empty_string,
460 _earliest => $empty_string,
461 _next => $empty_string,
462 _prior => $empty_string,
463 };
464  
465 my $parameter_color_on_exit_href = {
466 _item => $empty_string,
467 _index => $index_start,
468 _name => 'parameter_color_on_exit',
469 _most_recent => $current_index_start,
470 _earliest => $earliest_index_start,
471 _next => $next_index_start,
472 _prior => $prior_index_start,
473 };
474  
475 my $parameter_index_on_entry_href = {
476 _item => $empty_string,
477 _index => $index_start,
478 _name => 'parameter_index_on_entry',
479 _most_recent => $current_index_start,
480 _earliest => $earliest_index_start,
481 _next => $next_index_start,
482 _prior => $prior_index_start,
483 };
484  
485 my $parameter_index_on_entry_click_seq_href = {
486 _item => $empty_string,
487 _index => $index_start,
488 _name => 'parameter_index_on_entry_seq',
489 _most_recent => $current_index_start,
490 _earliest => $earliest_index_start,
491 _next => $next_index_start,
492 _prior => $prior_index_start,
493 };
494  
495 my $parameter_index_on_exit_href = {
496 _item => $empty_string,
497 _index => $index_start,
498 _name => 'parameter_index_on_exit',
499 _most_recent => $current_index_start,
500 _earliest => $earliest_index_start,
501 _next => $next_index_start,
502 _prior => $prior_index_start,
503 };
504  
505 my $parameter_index_on_exit_click_seq_href = {
506 _item => $empty_string,
507 _index => $index_start,
508 _name => 'parameter_index_on_exit_seq',
509 _most_recent => $current_index_start,
510 _earliest => $earliest_index_start,
511 _next => $next_index_start,
512 _prior => $prior_index_start,
513 };
514  
515 my $run_button_click_seq_href = {
516 _item => '',
517 _index => $index_start,
518 _name => 'run_button_seq',
519 _most_recent => $current_index_start,
520 _earliest => $earliest_index_start,
521 _next => $next_index_start,
522 _prior => $prior_index_start,
523 };
524  
525 my $save_button_click_seq_href = {
526 _item => '',
527 _index => $index_start,
528 _name => 'save_button_seq',
529 _most_recent => $current_index_start,
530 _earliest => $earliest_index_start,
531 _next => $next_index_start,
532 _prior => $prior_index_start,
533 };
534  
535 my $save_as_button_click_seq_href = {
536 _item => '',
537 _index => $index_start,
538 _name => 'save_as_button_seq',
539 _most_recent => $current_index_start,
540 _earliest => $earliest_index_start,
541 _next => $next_index_start,
542 _prior => $prior_index_start,
543 };
544  
545 my $sunix_prog_group_href = {
546 _item => '',
547 _index => $empty_string,
548 _name => 'sunix_prog_group',
549 _most_recent => $empty_string,
550 _earliest => $empty_string,
551 _next => $empty_string,
552 _prior => $empty_string,
553 };
554  
555 my $sunix_prog_group_click_seq_href = {
556 _item => '',
557 _index => $index_start,
558 _name => 'sunix_prog_click_seq_group',
559 _most_recent => $current_index_start,
560 _earliest => $earliest_index_start,
561 _next => $next_index_start,
562 _prior => $prior_index_start
563 };
564  
565 my $superflow_select_button_click_seq_href = {
566 _item => '',
567 _index => $index_start,
568 _name => 'superflow_select_button_seq',
569 _most_recent => $current_index_start,
570 _earliest => $earliest_index_start,
571 _next => $next_index_start,
572 _prior => $prior_index_start,
573 };
574  
575 my $superflow_tool_href = {
576 _item => '',
577 _index => $empty_string,
578 _name => 'superflow_tool',
579 _most_recent => $empty_string,
580 _earliest => $empty_string,
581 _next => $empty_string,
582 _prior => $empty_string,
583 };
584  
585 my $wipe_plots_button_click_seq_href = {
586 _item => '',
587 _index => $index_start,
588 _name => 'wipe_plots_button_seq',
589 _most_recent => $current_index_start,
590 _earliest => $earliest_index_start,
591 _next => $next_index_start,
592 _prior => $prior_index_start,
593 };
594  
595 =head2 sub _find_button
596 match a clicked button name to a hash key
597 of the same/equivalent name
598  
599 print("gui_history,_find_button, search:$search \n");
600 print("gui_history,_find_button, temp_key:**$temp_key** \n");
601  
602 =cut
603  
604 sub _find_button {
605  
606 my ( $gui_history, $search ) = @_;
607  
608 foreach my $key ( sort keys %{ $gui_history->{defaults} } ) {
609 my $temp_key = $key;
610  
611 # remove a suffix: '_is_'
612 $temp_key =~ s/_is_//;
613  
614 if ( $temp_key eq $search ) {
615  
616 my $found = $key;
617 return ($found);
618 }
619 else {
620  
621 # print("gui_history,_find_button, not found: NADA\n");
622 # print("gui_history,_find_button,key: **$key** \n");
623  
624 # N.B. return of a $false or nothing stops search
625 }
626 }
627 }
628  
629 =head2 sub _get_flow_listbox_color_w
630  
631  
632 =cut
633  
634 sub _get_flow_listbox_color_w {
635 my ($gui_history) = @_;
636  
637 my $flow_color = ( $gui_history->get_defaults() )->{_flow_color};
638  
639 my $key = '_flow_listbox_' . $flow_color . '_w';
640  
641 my $this_flow_listbox_color_w = ( $gui_history->get_defaults() )->{$key};
642  
643 return ($this_flow_listbox_color_w);
644 }
645  
646 =head2 sub _get_most_recent_color_selected_gui
647  
648 Assume the last color is the color of the flow selected
649  
650  
651 =cut
652  
653 sub _get_most_recent_color_selected_in_gui {
654  
655 my ($gui_history) = @_;
656  
657 my $flow_color = $flow_select_color_href->{_most_recent};
658  
659 # print("$gui_history,_get_most_recent_color_selected_gui,latest color selected is: $flow_color\n");
660 my $result = $flow_color;
661  
662 return ($result);
663 }
664  
665 =head2 sub _increment_count
666  
667 increment the counter
668 counter records the click number sequence for
669 all use selections
670 Two counters exist: an attribute: _count
671 and a hash (value stored)key=_count) in attribute defaults
672  
673 =cut
674  
675 sub _increment_count {
676  
677 my ($gui_history) = @_;
678  
679 my $old_count = ( $gui_history->get_defaults() )->{_count};
680  
681 # print("gui_history, _increment_count,main_hash old_count=$old_count\n");
682  
683 if ( defined $old_count ) {
684  
685 my $new_value = $old_count + 1;
686  
687 # increment the
688 # $hash key value whose reference is stored in an attribute
689 # called defaults
690 # and increment the '_count' attribute
691 ( $gui_history->get_defaults() )->{_count} = $new_value;
692 $gui_history->set_count($new_value);
693  
694 my $ans = ( $gui_history->get_defaults() )->{_count};
695  
696 # print("gui_history, _increment_count,new value: $ans\n");
697 }
698 else {
699 print("gui_history, _increment_count, count missing \n");
700 }
701  
702 # print("gui_history, _increment_count, attribute new value: $ans\n");
703 return ();
704 }
705  
706 =head2 sub _initialize
707 Default Tk settings
708 Locally scoped hash
709 46 off
710  
711 Overlap with
712 Default L_SU settings{
713 133 off
714  
715 =cut
716  
717 sub _initialize {
718 my ($gui_history) = @_;
719  
720 my $markers_href = {
721  
722 # _Data_menubutton => '',
723 _FileDialog_option => '',
724 _FileDialog_sub_ref => '',
725 _Flow_menubutton => '',
726 _Install_menubutton => '',
727 _SaveAs_menubutton => '',
728 _add2flow_button_grey => '',
729 _add2flow_button_pink => '',
730 _add2flow_button_green => '',
731 _add2flow_button_blue => '',
732 _big_stream_name_in => '',
733 _big_stream_name_out => '',
734 _changed_entry => 0,
735 _check_buttons_settings_aref => '',
736 _check_buttons_frame_href => '',
737 _check_buttons_w_aref => '',
738 _check_code_button => '',
739 _count => $count_start,
740 _most_recent_program_name => '',
741 _delete_from_flow_button => '',
742 _delete_whole_flow_button => '',
743 _destination_index => '',
744 _dialog_type => '',
745 _FileDialog_type => '',
746  
747 # _dnd_token_grey => '',
748 # _dnd_token_pink => '',
749 # _dnd_token_green => '',
750 # _dnd_token_blue => '',
751 # _dropsite_token_grey => '',
752 # _dropsite_token_pink => '',
753 # _dropsite_token_green => '',
754 # _dropsite_token_blue => '',
755 _entry_button_chosen_index => '',
756 _entry_button_chosen_widget => '',
757 _file_menubutton => '',
758 _first_idx => $default_param_specs->{_first_entry_idx},
759 _flow_color => '',
760 _flow_item_down_arrow_button => '',
761 _flow_item_up_arrow_button => '',
762 _flow_listbox_color_w => '',
763 _flow_listbox_grey_w => '',
764 _flow_listbox_pink_w => '',
765 _flow_listbox_green_w => '',
766 _flow_listbox_blue_w => '',
767 _flow_listbox_color_w => '',
768 _flow_name_in => '',
769 _flow_name_in_blue => '',
770 _flow_name_in_grey => '',
771 _flow_name_in_green => '',
772 _flow_name_in_pink => '',
773 _flow_name_out => '',
774 _flow_name_out_blue => '',
775 _flow_name_out_grey => '',
776 _flow_name_out_green => '',
777 _flow_name_out_pink => '',
778 _flow_type => '',
779 _flow_widget_index => '',
780 _flow_name_grey_w => '',
781 _flow_name_pink_w => '',
782 _flow_name_green_w => '',
783 _flow_name_blue_w => '',
784 _flowNsuperflow_name_w => '',
785 _good_labels_aref2 => '',
786 _good_values_aref2 => '',
787 _gui_history_aref => '',
788 _gui_history_ref => '',
789 _has_used_check_code_button => '',
790 _has_used_open_perl_file_button => $false,
791 _has_used_Save_button => $false,
792 _has_used_Save_superflow => $false,
793 _has_used_SaveAs_button => $false,
794 _has_used_run_button => $false,
795 _help_menubutton => '',
796 _help_option => '',
797 _index => '',
798 _index2move => $false,
799 _index_on_entry => '',
800 _is_FileDialog_button => $false,
801 _is_Save_button => $false,
802 _is_SaveAs_button => $false,
803 _is_SaveAs_file_button => $false,
804 _is_add2flow => $false,
805 _is_add2flow_button => $false,
806 _is_check_code_button => $false,
807 _is_delete_from_flow_button => $false,
808 _is_delete_whole_flow_button => $false,
809 _is_flow_item_down_arrow_button => $false,
810 _is_flow_item_up_arrow_button => $false,
811 _is_flow_listbox_grey_w => $false,
812 _is_flow_listbox_pink_w => $false,
813 _is_flow_listbox_green_w => $false,
814 _is_flow_listbox_blue_w => $false,
815 _is_flow_listbox_color_w => $false,
816 _is_future_flow_listbox_grey => $false,
817 _is_future_flow_listbox_pink => $false,
818 _is_future_flow_listbox_green => $false,
819 _is_future_flow_listbox_blue => $false,
820 _is_help_menubutton => $false,
821 _is_last_flow_index_touched_grey => $false,
822 _is_last_flow_index_touched_pink => $false,
823 _is_last_flow_index_touched_green => $false,
824 _is_last_flow_index_touched_blue => $false,
825 _is_last_flow_index_touched => $false,
826 _is_last_parameter_index_touched_grey => $false,
827 _is_last_parameter_index_touched_pink => $false,
828 _is_last_parameter_index_touched_green => $false,
829 _is_last_parameter_index_touched_blue => $false,
830 _is_last_parameter_index_touched_color => $false,
831 _is_new_listbox_selection => '',
832 _is_wipe_plots_button => $false,
833 _is_moveNdrop_in_flow => $false,
834 _is_pre_built_superflow => $false,
835 _is_run_button => $false,
836 _is_save_button => $false,
837 _is_save_as_button => $false,
838 _is_sunix_listbox => $false,
839 _is_superflow_select_button => $false,
840 _is_superflow => $false,
841 _is_user_built_flow => $false,
842 _items_checkbuttons_aref2 => '',
843 _items_names_aref2 => '',
844 _items_values_aref2 => '',
845 _items_versions_aref => '',
846 _labels_aref => '',
847 _labels_frame_href => '',
848 _labels_w_aref => '',
849 _last => '',
850 _last_flow_color => '',
851 _last_flow_index_touched => -1,
852 _last_flow_index_touched_grey => -1,
853 _last_flow_index_touched_pink => -1,
854 _last_flow_index_touched_green => -1,
855 _last_flow_index_touched_blue => -1,
856 _last_flow_listbox_touched => '',
857 _last_flow_listbox_touched_w => '',
858 _last_path_touched => './',
859 _last_parameter_index_touched_color => -1,
860 _last_parameter_index_touched_grey => -1,
861 _last_parameter_index_touched_pink => -1,
862 _last_parameter_index_touched_green => -1,
863 _last_parameter_index_touched_blue => -1,
864 _length => $default_param_specs->{_length},
865 _location_in_gui => '',
866 _message_w => '',
867 _name_aref => '',
868 _names_aref => '',
869 _index2move => '',
870 _destination_index => '',
871 _run_button => '',
872 _mw => '',
873 _occupied_listbox_aref => '', # new
874 _param_flow_length => '',
875 _parameter_index_on_entry => -1,
876 _parameter_index_on_exit => -1,
877 _parameter_menu_frame => '',
878 _parameter_values_frame => '',
879 _parameter_names_frame => '',
880 _param_sunix_first_idx => 0,
881 _param_sunix_length => '',
882 _parameter_values_button_frame => '',
883 _parameter_values_frame => '', # new
884 _parameter_value_index => -1,
885 _pre_built_tool_href => '',
886 _pre_built_tool_button_href => '',
887 _prog_name => '',
888 _prog_names_aref => '',
889 _prog_name_sref => '', # has pre-existing _spec.pm and *.pm
890 _run_button => '',
891 _prog_name => '',
892 _save_button => '',
893 _save_as_button => '',
894 _sunix_listbox => '',
895 _sunix_prog_group_click_seq_href => '',
896 _superflow_select => '',
897 _temp_num_items_in_flow => '',
898 _this_package => $gui_history,
899 _vacant_listbox_aref => '', # new
900 _values_aref => \@empty_array,
901 _values_frame_href => '',
902 _values_w_aref => '',
903 _wipe_plots_button => '',
904 };
905  
906 # in addition .... 7.21.21
907 $markers_href->{_FileDialog_type_href} = $FileDialog_type_href;
908 $markers_href->{_FileDialog_button_click_seq_href} =
909 $FileDialog_button_click_seq_href;
910 $markers_href->{_add2flow_button_click_seq_href} =
911 $add2flow_button_click_seq_href;
912 $markers_href->{_add2flow_button_color_href} = $add2flow_button_color_href;
913 $markers_href->{_button_href} = $button_href;
914 $markers_href->{_delete_from_flow_button_click_seq_href} =
915 $delete_from_flow_button_click_seq_href;
916 $markers_href->{_delete_whole_flow_button_click_seq_href} =
917 $delete_whole_flow_button_click_seq_href;
918 $markers_href->{_flow_listbox_color_w_href} = $flow_listbox_color_w_href;
919 $markers_href->{_flow_item_down_arrow_button_click_seq_href} =
920 $flow_item_down_arrow_button_click_seq_href;
921 $markers_href->{_flow_item_up_arrow_button_click_seq_href} =
922 $flow_item_up_arrow_button_click_seq_href;
923 $markers_href->{_flow_select_color_href} = $flow_select_color_href;
924 $markers_href->{_flow_select_index_href} = $flow_select_index_href;
925 $markers_href->{_flow_select_click_seq_href} = $flow_select_click_seq_href;
926 $markers_href->{_flow_type_href} = $flow_type_href;
927 $markers_href->{_help_menubutton_click_seq_href} =
928 $help_menubutton_click_seq_href;
929 $markers_href->{_parameter_color_on_entry_href} =
930 $parameter_color_on_entry_href;
931 $markers_href->{_parameter_color_on_exit_href} =
932 $parameter_color_on_exit_href;
933 $markers_href->{_parameter_index_on_entry_href} =
934 $parameter_index_on_entry_href;
935 $markers_href->{_parameter_index_on_entry_click_seq_href} =
936 $parameter_index_on_entry_click_seq_href;
937 $markers_href->{_parameter_index_on_exit_href} =
938 $parameter_index_on_exit_href;
939 $markers_href->{_parameter_index_on_exit_click_seq_href} =
940 $parameter_index_on_exit_click_seq_href;
941 $markers_href->{_run_button_click_seq_href} = $run_button_click_seq_href;
942 $markers_href->{_save_button_click_seq_href} = $save_button_click_seq_href;
943 $markers_href->{_save_as_button_click_seq_href} =
944 $save_as_button_click_seq_href;
945 $markers_href->{_sunix_prog_group_href} = $sunix_prog_group_href;
946 $markers_href->{_sunix_prog_group_click_seq_href} =
947 $sunix_prog_group_click_seq_href;
948 $markers_href->{_superflow_select_button_click_seq_href} =
949 $superflow_select_button_click_seq_href;
950 $markers_href->{_superflow_tool_href} = $superflow_tool_href;
951 $markers_href->{_wipe_plots_button_click_seq_href} =
952 $wipe_plots_button_click_seq_href;
953  
954 my $result = $markers_href;
955  
956 # print(" gui_history, _initialize, result = $result \n ");
957 # if (ref $result) {
958 # print(" gui_history, _initialize, result is a reference \n ");
959 # print(" gui_history, _initialize, = $gui_history \n ");
960 # } else {
961 # print(" gui_history, _initialize, result is NOT a reference \n ");
962 # }
963  
964 $gui_history->set_defaults($result);
965 return ();
966  
967 }
968  
969 =head2 sub _reset
970  
971 private reset of "condition" variables
972 do not reset incoming widgets
973
974 =cut
975  
976 sub _reset {
977 my ( $gui_history, $type ) = @_;
978  
979 # print("gui_history,_reset, gui_history=$gui_history,type = $type \n");
980  
981 if ( $type eq 'listbox_color_w' ) {
982  
983 ( $gui_history->get_defaults() )->{_is_flow_listbox_grey_w} = $false;
984 ( $gui_history->get_defaults() )->{_is_flow_listbox_pink_w} = $false;
985 ( $gui_history->get_defaults() )->{_is_flow_listbox_green_w} = $false;
986 ( $gui_history->get_defaults() )->{_is_flow_listbox_blue_w} = $false;
987 ( $gui_history->get_defaults() )->{_is_flow_listbox_color_w} = $false;
988  
989 }
990 elsif ( $type ne 'listbox_color_w' ) {
991  
992 ( $gui_history->get_defaults() )->{_is_add2flow} =
993 $false; # needed? double confirmation?
994 ( $gui_history->get_defaults() )->{_is_add2flow_button} =
995 $false; # needed? double confirmation?
996 ( $gui_history->get_defaults() )->{_is_delete_from_flow_button} =
997 $false;
998 ( $gui_history->get_defaults() )->{_is_new_listbox_selection} = $false;
999 ( $gui_history->get_defaults() )->{_is_superflow_select_button} =
1000 $false;
1001 ( $gui_history->get_defaults() )->{_is_delete_whole_flow_button} =
1002 $false;
1003 ( $gui_history->get_defaults() )->{_is_moveNdrop_in_flow} = $false;
1004 ( $gui_history->get_defaults() )->{_is_sunix_listbox} = $false;
1005  
1006 }
1007 else {
1008 print("gui_history,_reset, unexpected type \n");
1009 }
1010 return ();
1011 }
1012  
1013 # ( $gui_history->get_defaults )->{_parameter_index_on_exit_href} = $parameter_index_on_exit_href;
1014  
1015 =head2 sub _set_click_sequence
1016  
1017 For general case, new count will not be sequential with previous
1018 index value in the same $property_href
1019 Count changes whenever the user clicks on any tool
1020  
1021 indices for property_href should increase only if the most_recent
1022 is different to the prior. i.e., only if there is a real change
1023 indices only change if there is a real change
1024  
1025 =cut
1026  
1027 sub _set_click_sequence {
1028  
1029 my ( $gui_history, $property_href ) = @_;
1030 my $count;
1031 my $val;
1032  
1033 # print("1 _set_click_sequence; gui_history,property_href->{_prior} : $gui_history, $property_href->{_prior} \n");
1034 # print("1 _set_click_sequence; gui_history,property_href->{_earliest}: $gui_history, $property_href->{_earliest} \n");
1035 # print("1 _set_click_sequence; gui_history,property_href->{_most_recent} : $property_href->{_most_recent} \n");
1036  
1037 if ( defined $property_href ) {
1038  
1039 # update the indices of appearance
1040 if ( $property_href->{_most_recent} != $property_href->{_prior} ) {
1041 $property_href->{_earliest} = $property_href->{_prior};
1042 $property_href->{_prior} = $property_href->{_most_recent};
1043  
1044 }
1045 elsif ( $property_href->{_most_recent} == $property_href->{_prior} ) {
1046 print(
1047 "gui_history, _set_click_sequence, property is not changed\n");
1048  
1049 }
1050 else {
1051 print("gui_history, _set_click_sequence, unexpected value\n");
1052 }
1053  
1054 $gui_history->_increment_count();
1055 $property_href->{_most_recent} =
1056 ( $gui_history->get_defaults() )->{_count};
1057  
1058 # print("2 _set_click_sequence;gui_history->{_count} = $gui_history->{_count}\n");
1059 # print("22 _set_click_sequence; property_href {_name}= $property_href->{_name}\n");
1060  
1061 # print("2 _set_click_sequence; gui_history,property->{_prior} : $gui_history, $property_href->{_prior} \n");
1062 # print("2 _set_click_sequence; gui_history,property->{_earliest}: $gui_history, $property_href->{_earliest} \n");
1063 # print("2 _set_click_sequence; gui_history->{_most_recent} : $property_href->{_most_recent} \n");
1064  
1065 # print additional subsets: flow_select_color
1066  
1067 }
1068 }
1069  
1070 =head2 sub _set_flow_listbox_color_w
1071  
1072  
1073 =cut
1074  
1075 sub _set_flow_listbox_color_w {
1076 my ($gui_history) = @_;
1077  
1078 my $color = ( $gui_history->get_defaults() )->{_flow_color};
1079  
1080 if ( defined $color ) {
1081  
1082 my $key1 = '_flow_listbox_' . $color . '_w';
1083 my $key2 = '_is_flow_listbox_' . $color . '_w';
1084  
1085 ( $gui_history->get_defaults() )->{_flow_listbox_color_w} =
1086 ( $gui_history->get_defaults() )->{$key1};
1087 ( $gui_history->get_defaults() )->{$key2} = $true;
1088  
1089 }
1090 else {
1091 print("gui_history,_set_flow_listbox_color_w, missing color\n");
1092 }
1093  
1094 return ();
1095 }
1096  
1097 =head2 sub _update_FileDialog_type
1098 Assign new FileDialog_type to private key: _FileDialog_type
1099 Can be 'Data'
1100 or 'Delete'
1101 or ' '
1102  
1103 $gui_history = current package
1104  
1105 =cut
1106  
1107 sub _update_FileDialog_type {
1108 my ( $gui_history, $new_most_recent_FileDialog_type,
1109 $new_prior_FileDialog_type )
1110 = @_;
1111  
1112 if ( defined $FileDialog_type_href ) {
1113  
1114 # update the history of add2flow_button usage according to the color used
1115 $FileDialog_type_href->{_earliest} = $FileDialog_type_href->{_prior};
1116 $FileDialog_type_href->{_prior} = $FileDialog_type_href->{_most_recent};
1117 $FileDialog_type_href->{_most_recent} =
1118 $new_most_recent_FileDialog_type;
1119  
1120 ( $gui_history->get_defaults )->{_FileDialog_type_href} =
1121 $FileDialog_type_href;
1122 }
1123  
1124 # update the history of the name usage if the current FileDialog_type
1125 my $current_count = ( $gui_history->get_defaults() )->{_count};
1126 if ( $FileDialog_button_click_seq_href->{_most_recent} == $current_count ) {
1127  
1128 }
1129  
1130 return ();
1131  
1132 }
1133  
1134 =head2 sub _update_button
1135 Assign new button to private key: _XXX_button
1136  
1137 print("gui_history, _update_button, ans= $ans\n");
1138 print("gui_history, _update_button, button= $button\n");
1139  
1140 =cut
1141  
1142 sub _update_button {
1143  
1144 my ( $gui_history, $new_most_recent_button, $new_new_prior_button ) = @_;
1145  
1146 # my $button = _find_button( $gui_history, $new_most_recent_button );
1147  
1148 if ( $new_most_recent_button ne $empty_string ) {
1149  
1150 if ( defined $button_href ) {
1151  
1152 # update the history of add2flow_button usage according to the color used
1153 $button_href->{_earliest} = $button_href->{_prior};
1154 $button_href->{_prior} = $button_href->{_most_recent};
1155 $button_href->{_most_recent} = $new_most_recent_button;
1156  
1157 ( $gui_history->get_defaults() )->{_button_href} = $button_href;
1158 }
1159  
1160 if ( $new_most_recent_button eq 'FileDialog_button' ) {
1161  
1162 ( $gui_history->get_defaults() )->{_is_FileDialog_button} = $true;
1163  
1164 _set_click_sequence( $gui_history,
1165 $FileDialog_button_click_seq_href );
1166  
1167 # update the history of FileDialog_button use according to click count
1168 ( $gui_history->get_defaults )->{_FileDialog_button_click_seq_href}
1169 = $FileDialog_button_click_seq_href;
1170  
1171 # print("gui_history, _update_button, button matched = $new_most_recent_button\n");
1172 return ();
1173  
1174 }
1175 elsif ( $new_most_recent_button eq 'add2flow_button' ) {
1176  
1177 ( $gui_history->get_defaults() )->{_is_add2flow_button} = $true;
1178 ( $gui_history->get_defaults() )->{_is_add2flow} = $true;
1179  
1180 _set_click_sequence( $gui_history,
1181 $add2flow_button_click_seq_href );
1182  
1183 # update the history of add2flow_button use according to click count
1184 ( $gui_history->get_defaults() )->{_add2flow_button_click_seq_href}
1185 = $add2flow_button_click_seq_href;
1186 ( $gui_history->get_defaults() )->{_is_new_listbox_selection} =
1187 $true;
1188  
1189 # print("gui_history, _update_button, button matched = $new_most_recent_button\n");
1190 return ();
1191 }
1192 elsif ( $new_most_recent_button eq 'delete_from_flow_button' ) {
1193  
1194 ( $gui_history->get_defaults() )->{_is_delete_from_flow_button} =
1195 $true;
1196  
1197 _set_click_sequence( $gui_history,
1198 $delete_from_flow_button_click_seq_href );
1199  
1200 # update the history of delete_from_flow_button use according to click count
1201 ( $gui_history->get_defaults )
1202 ->{_delete_from_flow_button_click_seq_href} =
1203 $delete_from_flow_button_click_seq_href;
1204  
1205 _reset( $gui_history, 'listbox_color_w' );
1206  
1207 # find out the latest color
1208 # assume that flow select color is the latest color
1209 my $color = _get_most_recent_color_selected_in_gui($gui_history);
1210  
1211 my $key1 = '_is_flow_listbox_' . $color . '_w';
1212  
1213 ( $gui_history->get_defaults() )->{$key1} = $true;
1214 ( $gui_history->get_defaults() )->{_is_flow_listbox_color_w} =
1215 $true;
1216  
1217 # print("gui_history, _update_button, delete_from_flow_button \n");
1218  
1219 # print("gui_history, _update_button, button matched = $new_most_recent_button\n");
1220 return ();
1221  
1222 }
1223 elsif ( $new_most_recent_button eq 'delete_whole_flow_button' ) {
1224  
1225 ( $gui_history->get_defaults() )->{_is_delete_whole_flow_button} =
1226 $true;
1227  
1228 _set_click_sequence( $gui_history,
1229 $delete_whole_flow_button_click_seq_href );
1230  
1231 # update the history of delete_whole_flow_button use according to click count
1232 ( $gui_history->get_defaults )
1233 ->{_delete_whole_flow_button_click_seq_href} =
1234 $delete_whole_flow_button_click_seq_href;
1235  
1236 _reset( $gui_history, 'listbox_color_w' );
1237  
1238 # find out the latest color
1239 # assume that flow select color is the latest color
1240 my $color = _get_most_recent_color_selected_in_gui($gui_history);
1241  
1242 my $key1 = '_is_flow_listbox_' . $color . '_w';
1243  
1244 ( $gui_history->get_defaults() )->{$key1} = $true;
1245 ( $gui_history->get_defaults() )->{_is_flow_listbox_color_w} =
1246 $true;
1247  
1248 # print("gui_history, _update_button, delete_whole_flow_button \n");
1249 # print("gui_history, _update_button, button matched = $new_most_recent_button\n");
1250 return ();
1251  
1252 }
1253 elsif ( $new_most_recent_button eq 'flow_item_down_arrow_button' ) {
1254  
1255 ( $gui_history->get_defaults() )->{_is_flow_item_down_arrow_button}
1256 = $true;
1257  
1258 _set_click_sequence( $gui_history,
1259 $flow_item_down_arrow_button_click_seq_href );
1260  
1261 # update the history of flow_item_down_arrow_button use according to click count
1262 ( $gui_history->get_defaults )
1263 ->{_flow_item_down_arrow_button_click_seq_href} =
1264 $flow_item_down_arrow_button_click_seq_href;
1265  
1266 # print("gui_history, _update_button, button matched = $new_most_recent_button\n");
1267 return ();
1268  
1269 }
1270 elsif ( $new_most_recent_button eq 'flow_item_up_arrow_button' ) {
1271  
1272 ( $gui_history->get_defaults() )->{_is_flow_item_up_arrow_button} =
1273 $true;
1274  
1275 _set_click_sequence( $gui_history,
1276 $flow_item_up_arrow_button_click_seq_href );
1277  
1278 # update the history of flow_item_up_arrow_button use according to click count
1279 ( $gui_history->get_defaults )
1280 ->{_flow_item_up_arrow_button_click_seq_href} =
1281 $flow_item_up_arrow_button_click_seq_href;
1282  
1283 # print("gui_history, _update_button, button matched = $new_most_recent_button\n");
1284 return ();
1285  
1286 }
1287 elsif ( $new_most_recent_button eq 'flow_select' ) {
1288  
1289 # my $ans = ( $gui_history->get_defaults() )->{_count};
1290 # print("1. gui_history, _update_button, for flow_select count=$ans\n");
1291  
1292 my $_flow_listbox_color_w = _get_flow_listbox_color_w($gui_history);
1293 my $most_recent_index =
1294 $flow_widgets->get_flow_selection($_flow_listbox_color_w);
1295  
1296 # CASE 1: flow listbox is cleared with no highlights
1297 if ( not defined $most_recent_index ) {
1298  
1299 # no change to indices
1300 # increment record sequence as total number of mouse clicks
1301 _set_click_sequence( $gui_history,
1302 $flow_select_click_seq_href );
1303  
1304 # print("2. gui_history, _update_button, for _flow_listbox_color_w=$_flow_listbox_color_w \n");
1305 ( $gui_history->get_defaults() )->{_flow_select_click_seq_href}
1306 = $flow_select_click_seq_href;
1307 }
1308  
1309 # CASE 2 flow listbox must have been selected and have highlighted an element
1310 # and the selected index must be different to the previous index
1311 # only such case among the many tracked properties of the GUI
1312 elsif ( $most_recent_index ne $empty_string
1313 and $most_recent_index ne
1314 $flow_select_index_href->{_most_recent} )
1315 {
1316  
1317 # update the history of flow_select usage according to the index chosen
1318 $flow_select_index_href->{_earliest} =
1319 $flow_select_index_href->{_prior};
1320 $flow_select_index_href->{_prior} =
1321 $flow_select_index_href->{_most_recent};
1322 $flow_select_index_href->{_most_recent} = $most_recent_index;
1323 ( $gui_history->get_defaults() )->{_flow_select_index_href} =
1324 $flow_select_index_href;
1325  
1326 # print(
1327 # "2. gui_history, _update_button, for flow_select new most_recent_index=$most_recent_index \n");
1328 # print(
1329 # "2. gui_history, _update_button, for flow_select new prior_index=$flow_select_index_href->{_prior} \n"
1330 # );
1331  
1332 # print("gui_history, _update_button, flow_select_click_seq_href= ($gui_history->get_defaults )->{_flow_select_click_seq_href}\n");
1333 # print("3. gui_history, _update_button, flow_select most_recent_index=$most_recent_index \n");
1334  
1335 # print("gui_history, _update_button, flow_select_click_seq_href= ($gui_history->get_defaults )->{_flow_select_click_seq_href}\n");
1336 # print("3. gui_history, _update_button, button matched = $new_most_recent_button\n");
1337  
1338 }
1339 elsif ( $most_recent_index ne $empty_string
1340 and $most_recent_index eq
1341 $flow_select_index_href->{_most_recent} )
1342 {
1343  
1344 # record sequence as total number of mouse clicks, when user reclicks the same location
1345 # However in _set_click_sequence the property indices will not be updated
1346 # only the general gui count JML 2-2020
1347 _set_click_sequence( $gui_history,
1348 $flow_select_click_seq_href );
1349  
1350 # not really reset ??? mystery
1351 ( $gui_history->get_defaults() )->{_flow_select_click_seq_href}
1352 = $flow_select_click_seq_href;
1353  
1354 }
1355 else {
1356 print(
1357 " gui_history, set_button for flow_select, unexpected result \n"
1358 );
1359 }
1360  
1361 return ();
1362  
1363 }
1364 elsif ( $new_most_recent_button eq 'help_menubutton' ) {
1365  
1366 ( $gui_history->get_defaults() )->{_is_help_menubutton} = $true;
1367  
1368 _set_click_sequence( $gui_history,
1369 $help_menubutton_click_seq_href );
1370  
1371 # update the history of help_menubutton use according to click count
1372 ( $gui_history->get_defaults )->{_help_menubutton_click_seq_href} =
1373 $help_menubutton_click_seq_href;
1374  
1375 # print("gui_history, _update_button, button matched = $new_most_recent_button\n");
1376 return ();
1377  
1378 }
1379 elsif ( $new_most_recent_button eq 'run_button' ) {
1380  
1381 ( $gui_history->get_defaults() )->{_is_run_button} = $true;
1382  
1383 _set_click_sequence( $gui_history, $run_button_click_seq_href );
1384  
1385 # update the history of run_button use according to click count
1386 ( $gui_history->get_defaults )->{_run_button_click_seq_href} =
1387 $run_button_click_seq_href;
1388  
1389 # print("gui_history, _update_button, button matched = $new_most_recent_button\n");
1390 return ();
1391  
1392 }
1393 elsif ( $new_most_recent_button eq 'save_button' ) {
1394  
1395 ( $gui_history->get_defaults() )->{_is_save_button} = $true;
1396  
1397 _set_click_sequence( $gui_history, $save_button_click_seq_href );
1398  
1399 # update the history of save_button use according to click count
1400 ( $gui_history->get_defaults )->{_save_button_click_seq_href} =
1401 $save_button_click_seq_href;
1402  
1403 # print("gui_history, _update_button, button matched = $new_most_recent_button\n");
1404 return ();
1405  
1406 }
1407 elsif ( $new_most_recent_button eq 'save_as_button' ) {
1408  
1409 ( $gui_history->get_defaults() )->{_is_save_as_button} = $true;
1410  
1411 _set_click_sequence( $gui_history, $save_as_button_click_seq_href );
1412  
1413 # update the history of save_as_button use according to click count
1414 ( $gui_history->get_defaults )->{_save_as_button_click_seq_href} =
1415 $save_as_button_click_seq_href;
1416  
1417 # print("gui_history, _update_button, button matched = $new_most_recent_button\n");
1418 return ();
1419  
1420 }
1421 elsif ( $new_most_recent_button eq 'sunix_select' ) {
1422  
1423 ( $gui_history->get_defaults() )->{_is_sunix_select} = $true;
1424 ( $gui_history->get_defaults() )->{_is_new_listbox_selection} =
1425 $true; # so changes not allowed
1426 ( $gui_history->get_defaults() )->{_is_sunix_listbox} = $true;
1427  
1428 # history and sequence is handled by sunix_prog_group_click_seq_href and sunix_select_prog_group_href
1429  
1430 # print("gui_history, _update_button, button matched = $new_most_recent_button\n");
1431 return ();
1432  
1433 }
1434 elsif ( $new_most_recent_button eq 'superflow_select_button' ) {
1435  
1436 ( $gui_history->get_defaults() )->{_is_superflow_select_button} =
1437 $true;
1438 ( $gui_history->get_defaults() )->{_is_superflow} = $true;
1439 ( $gui_history->get_defaults() )->{_is_pre_built_superflow} = $true;
1440  
1441 _set_click_sequence( $gui_history,
1442 $superflow_select_button_click_seq_href );
1443  
1444 # update the history of superflow_select_button use according to click count
1445 ( $gui_history->get_defaults )
1446 ->{_superflow_select_button_click_seq_href} =
1447 $superflow_select_button_click_seq_href;
1448  
1449 # print("gui_history, _update_button, button matched = $new_most_recent_button\n");
1450 return ();
1451  
1452 }
1453 elsif ( $new_most_recent_button eq 'wipe_plots_button' ) {
1454  
1455 ( $gui_history->get_defaults() )->{_is_wipe_plots_button} = $true;
1456  
1457 _set_click_sequence( $gui_history,
1458 $wipe_plots_button_click_seq_href );
1459  
1460 # update the history of wipe_plots_button use according to click count
1461 ( $gui_history->get_defaults )->{_wipe_plots_button_click_seq_href}
1462 = $wipe_plots_button_click_seq_href;
1463  
1464 # print("gui_history, _update_button, button matched = $new_most_recent_button\n");
1465 return ();
1466  
1467 }
1468 else {
1469  
1470 # print("gui_history,_update_button, button unmatched NADA\n");
1471 return ();
1472 }
1473 }
1474 else {
1475 print("gui_history,_update_button, button not found:\n");
1476 return ();
1477 }
1478 }
1479  
1480 =head2 sub _update_add2flow_color
1481  
1482 Assign new color to private key: _flow_color
1483  
1484 In this sub, flow color can be grey,pink,green or blue
1485 but not 'neutral' or 'nada' or 'no_color'
1486  
1487 $gui_history = current package
1488  
1489 When there is a color change
1490  
1491  
1492 =cut
1493  
1494 sub _update_add2flow_color {
1495 my ( $gui_history, $new_most_recent_color, $new_prior_color ) = @_;
1496  
1497 # for safety
1498 if ( $new_most_recent_color ne 'nada'
1499 && $new_most_recent_color ne $neutral
1500 && $new_most_recent_color ne 'no_color' )
1501 {
1502 ( $gui_history->get_defaults() )->{_flow_color} =
1503 $new_most_recent_color;
1504  
1505 my $current_count = ( $gui_history->get_defaults() )->{_count};
1506  
1507 if ( defined $add2flow_button_color_href ) {
1508  
1509 # update the history of add2flow_button usage according to the color used
1510 $add2flow_button_color_href->{_earliest} =
1511 $add2flow_button_color_href->{_prior};
1512 $add2flow_button_color_href->{_prior} =
1513 $add2flow_button_color_href->{_most_recent};
1514 $add2flow_button_color_href->{_most_recent} =
1515 $new_most_recent_color;
1516  
1517 ( $gui_history->get_defaults )->{_add2flow_button_color_href} =
1518 $add2flow_button_color_href;
1519  
1520 # print("1.gui_history,_update_add2flow_color, new_most_recent_color:$new_most_recent_color, new_prior_color=$new_prior_color\n");
1521 }
1522  
1523 }
1524 else {
1525  
1526 # print("2.gui_history,_update_add2flow_color wrong color \n");
1527 }
1528  
1529 # print("gui_history,updated color:$updated_color, old_color=$old_color\n");
1530 }
1531  
1532 =head2 sub _update_flow_select_color
1533 Assign new color to private key: _flow_color
1534  
1535 flow color can be grey,pink,green or blue
1536 but not neutral or 'nada' or 'no_color'
1537  
1538 $gui_history = current package
1539  
1540 When there is a color change
1541  
1542 =cut
1543  
1544 sub _update_flow_select_color {
1545 my ( $gui_history, $new_most_recent_color, $new_prior_color ) = @_;
1546  
1547 # for safety
1548 # if (not( $new_most_recent_color ne 'nada'
1549 # or $new_most_recent_color ne $neutral
1550 # or $new_most_recent_color ne 'no_color' )
1551 # )
1552 # {
1553 ( $gui_history->get_defaults() )->{_flow_color} = $new_most_recent_color;
1554  
1555 my $current_count = ( $gui_history->get_defaults() )->{_count};
1556  
1557 if ( defined $flow_select_click_seq_href ) {
1558  
1559 # when color is set as: gui_history->set_color('this color')
1560 # update the color history
1561 # ony if the current button is flow_select
1562 # also update the flow_widget object reference
1563  
1564 # if ( $flow_select_click_seq_href->{_most_recent} == $current_count ) { # safety
1565  
1566 ( $gui_history->get_defaults() )->{_last_color} =
1567 $new_most_recent_color;
1568  
1569 # print("1.gui_history,updated color for flow_select:new_most_recent_color, $new_most_recent_color\n");
1570  
1571 # update the history of flow_select usage according to the color used
1572 $flow_select_color_href->{_earliest} =
1573 $flow_select_color_href->{_prior};
1574 $flow_select_color_href->{_prior} =
1575 $flow_select_color_href->{_most_recent};
1576 $flow_select_color_href->{_most_recent} = $new_most_recent_color;
1577  
1578 # print("2.gui_history,updated color for flow_select:new prior_color,$flow_select_color_href->{_prior} \n\n");
1579  
1580 ( $gui_history->get_defaults() )->{_flow_select_color_href} =
1581 $flow_select_color_href;
1582  
1583 # _click_($new_most_recent_color);
1584 my $flow_listbox_color_w_key =
1585 '_flow_listbox_' . $new_most_recent_color . '_w';
1586 my $flow_listbox_color_w_txt =
1587 'flow_listbox_' . $new_most_recent_color . '_w';
1588 my $flow_listbox_color_w = $gui_history->{$flow_listbox_color_w_key};
1589  
1590 # _set_flow_listbox_last_touched_txt($flow_listbox_color_w_txt);
1591 # _set_flow_listbox_last_touched_w($flow_listbox_color_w);
1592  
1593 # dynamic location within gui
1594 my $value2 = '_is_flow_listbox_' . $new_most_recent_color . '_w';
1595 $gui_history->{$value2} = $true;
1596 $gui_history->{_is_flow_listbox_color_w} = $true;
1597  
1598 #} else {
1599 # print("flow_select_click_seq_href->{_most_recent}=$flow_select_click_seq_href->{_most_recent} does not equal current_count=$current_count\n");
1600 # }
1601 }
1602 else {
1603 print("2.gui_history,_update_flow_select_color unexpected value \n");
1604 }
1605  
1606 # print("gui_history,updated color:$updated_color, old_color=$old_color\n");
1607 }
1608  
1609 =head2 sub _update_flow_listbox_color_w
1610 '
1611  
1612 $gui_history = current package
1613  
1614 =cut
1615  
1616 sub _update_flow_listbox_color_w {
1617 my (
1618 $gui_history,
1619 $new_most_recent_flow_listbox_color_w,
1620 $new_prior_flow_listbox_color_w
1621 ) = @_;
1622  
1623 ( $gui_history->get_defaults() )->{_flow_listbox_color_w} =
1624 $new_most_recent_flow_listbox_color_w;
1625  
1626 # print("gui_history,updated flow type :$new_most_recent_flow_listbox_color_w\n");
1627  
1628 if ( defined $flow_listbox_color_w_href ) {
1629  
1630 # update the history of flow selection usage according to the flow_listbox_color_w used
1631 $flow_listbox_color_w_href->{_earliest} =
1632 $flow_listbox_color_w_href->{_prior};
1633 $flow_listbox_color_w_href->{_prior} =
1634 $flow_listbox_color_w_href->{_most_recent};
1635 $flow_listbox_color_w_href->{_most_recent} =
1636 $new_most_recent_flow_listbox_color_w;
1637  
1638 ( $gui_history->get_defaults )->{_flow_listbox_color_w_href} =
1639 $flow_listbox_color_w_href;
1640  
1641 #TODO _set_flow_listbox_last_touched_txt($flow_listbox_color_w_txt);
1642 #TODO _set_flow_listbox_last_touched_w($$new_most_recent_flow_listbox_color_w);
1643  
1644 }
1645 else {
1646  
1647 # print("gui_history,updated flow listbox_color_w :unexpected flow lsitbox \n");
1648 }
1649  
1650 return ();
1651  
1652 # print("gui_history,updated flow_listbox_color_w:$new_most_recent_flow_listbox_color_w, new_prior_flow_listbox_color_w=$new_prior_flow_listbox_color_w\n");
1653 }
1654  
1655 =head2 sub _update_flow_type
1656 Assign new flow_type to private key: _flow_type
1657 Can be 'pre_built_superflow 'or
1658 'user_built'
1659  
1660 $gui_history = current package
1661  
1662  
1663 =cut
1664  
1665 sub _update_flow_type {
1666 my ( $gui_history, $new_most_recent_flow_type, $new_prior_flow_type ) = @_;
1667  
1668 ( $gui_history->get_defaults() )->{_flow_type} = $new_most_recent_flow_type;
1669  
1670 # print("1. gui_history,updated flow type :$new_most_recent_flow_type\n");
1671  
1672 if ( defined $flow_type_href ) {
1673  
1674 # update the history of add2flow_button usage according to the flow_type used
1675 $flow_type_href->{_earliest} = $flow_type_href->{_prior};
1676 $flow_type_href->{_prior} = $flow_type_href->{_most_recent};
1677 $flow_type_href->{_most_recent} = $new_most_recent_flow_type;
1678  
1679 ( $gui_history->get_defaults() )->{_flow_type_href} = $flow_type_href;
1680 my $ans = ( ( $gui_history->get_defaults() )->{_flow_type_href} )
1681 ->{_most_recent};
1682  
1683 # print("2. gui_history,updated flow type, new_most_recent_flow_type: $ans \n");
1684 }
1685 else {
1686 print("gui_history, missing flow hash NADA\n");
1687 }
1688  
1689 if ( $gui_history->get_flow_type eq 'user_built' ) {
1690 ( $gui_history->get_defaults() )->{_is_user_built_flow} = $true;
1691 }
1692 elsif ( $gui_history->get_flow_type eq 'pre_built_superflow' ) {
1693 ( $gui_history->get_defaults() )->{_is_pre_built_superflow} = $true;
1694 ( $gui_history->get_defaults() )->{_is_superflow} = $true;
1695 }
1696 else {
1697 print("3 gui_history,updated flow type :unexpected flow type NADA\n");
1698 }
1699  
1700 # print("4 gui_history,updated flow_type:$new_most_recent_flow_type, new_prior_flow_type=$new_prior_flow_type\n\n");
1701 return ();
1702 }
1703  
1704 =head2 sub _update_help_menubutton_type
1705 Assign new help_menubutton_type to private key: _help_menubutton_type
1706 Can be 'Install'
1707 or ' '
1708 or ' '
1709  
1710 $gui_history = current package
1711  
1712 =cut
1713  
1714 sub _update_help_menubutton_type {
1715 my (
1716 $gui_history,
1717 $new_most_recent_help_menubutton_type,
1718 $new_prior_help_menubutton_type
1719 ) = @_;
1720  
1721 if ( defined $help_menubutton_type_href ) {
1722  
1723 # update the history of add2flow_button usage according to the color used
1724 $help_menubutton_type_href->{_earliest} =
1725 $help_menubutton_type_href->{_prior};
1726 $help_menubutton_type_href->{_prior} =
1727 $help_menubutton_type_href->{_most_recent};
1728 $help_menubutton_type_href->{_most_recent} =
1729 $new_most_recent_help_menubutton_type;
1730  
1731 ( $gui_history->get_defaults )->{_help_menubutton_type_href} =
1732 $help_menubutton_type_href;
1733 }
1734  
1735 # update the history of the name usage if the current help_menubutton_type
1736 my $current_count = ( $gui_history->get_defaults() )->{_count};
1737 if ( $help_menubutton_click_seq_href->{_most_recent} == $current_count ) {
1738  
1739 }
1740  
1741 return ();
1742  
1743 }
1744  
1745 =head2 sub _update_parameter_color_on_entry
1746  
1747 $gui_history = current package
1748  
1749  
1750 =cut
1751  
1752 sub _update_parameter_color_on_entry {
1753 my (
1754 $gui_history,
1755 $new_most_recent_parameter_color_on_entry,
1756 $new_prior_parameter_color_on_entry
1757 ) = @_;
1758  
1759 # print("gui_history,updated parameter_color_on_entry :$new_most_recent_parameter_color_on_entry\n");
1760  
1761 if ( defined $parameter_color_on_entry_href ) {
1762  
1763 # update the history of parameter_color_on_entry according to the parameter_color_on_entry used
1764 $parameter_color_on_entry_href->{_earliest} =
1765 $parameter_color_on_entry_href->{_prior};
1766 $parameter_color_on_entry_href->{_prior} =
1767 $parameter_color_on_entry_href->{_most_recent};
1768 $parameter_color_on_entry_href->{_most_recent} =
1769 $new_most_recent_parameter_color_on_entry;
1770  
1771 ( $gui_history->get_defaults )->{_parameter_color_on_entry_href} =
1772 $parameter_color_on_entry_href;
1773  
1774 }
1775 else {
1776 print("gui_history, missing flow hash NADA\n");
1777 }
1778  
1779 return ();
1780  
1781 # print("gui_history,updated parameter_color_on_entry:$new_most_recent_parameter_color_on_entry, new_prior_parameter_color_on_entry=$new_prior_parameter_color_on_entry\n");
1782 }
1783  
1784 =head2 sub _update_parameter_color_on_exit
1785  
1786 $gui_history = current package
1787  
1788  
1789 =cut
1790  
1791 sub _update_parameter_color_on_exit {
1792 my (
1793 $gui_history,
1794 $new_most_recent_parameter_color_on_exit,
1795 $new_prior_parameter_color_on_exit
1796 ) = @_;
1797  
1798 ( $gui_history->get_defaults() )->{_parameter_color_on_exit} =
1799 $new_most_recent_parameter_color_on_exit;
1800  
1801 # print("gui_history,updated parameter_color_on_exit :$new_most_recent_parameter_color_on_exit\n");
1802  
1803 if ( defined $parameter_color_on_exit_href ) {
1804  
1805 # update the history of parameter_color_on_exit according to the parameter_color_on_exit used
1806 $parameter_color_on_exit_href->{_earliest} =
1807 $parameter_color_on_exit_href->{_prior};
1808 $parameter_color_on_exit_href->{_prior} =
1809 $parameter_color_on_exit_href->{_most_recent};
1810 $parameter_color_on_exit_href->{_most_recent} =
1811 $new_most_recent_parameter_color_on_exit;
1812  
1813 ( $gui_history->get_defaults )->{_parameter_color_on_exit_href} =
1814 $parameter_color_on_exit_href;
1815  
1816 }
1817 else {
1818 print("gui_history, missing flow hash NADA\n");
1819 }
1820  
1821 return ();
1822 }
1823  
1824 =head2 sub _update_parameter_index_on_entry
1825  
1826 $gui_history = current package
1827  
1828  
1829 =cut
1830  
1831 sub _update_parameter_index_on_entry {
1832 my (
1833 $gui_history,
1834 $new_most_recent_parameter_index_on_entry,
1835 $new_prior_parameter_index_on_entry
1836 ) = @_;
1837  
1838 ( $gui_history->get_defaults() )->{_parameter_index_on_entry} =
1839 $new_most_recent_parameter_index_on_entry;
1840  
1841 # print("gui_history,updated parameter_index_on_entry :$new_most_recent_parameter_index_on_entry\n");
1842  
1843 if ( defined $parameter_index_on_entry_click_seq_href ) {
1844  
1845 # update the history of parameter_index_on_entry according to click count
1846 _set_click_sequence( $gui_history,
1847 $parameter_index_on_entry_click_seq_href );
1848  
1849 ( $gui_history->get_defaults )
1850 ->{_parameter_index_on_entry_click_seq_href} =
1851 $parameter_index_on_entry_click_seq_href;
1852  
1853 }
1854 else {
1855 print("gui_history, missing flow hash NADA\n");
1856 }
1857  
1858 if ( defined $parameter_index_on_entry_href ) {
1859  
1860 # update the history of parameter_index_on_entry according to the parameter_index_on_entry used
1861 $parameter_index_on_entry_href->{_earliest} =
1862 $parameter_index_on_entry_href->{_prior};
1863 $parameter_index_on_entry_href->{_prior} =
1864 $parameter_index_on_entry_href->{_most_recent};
1865 $parameter_index_on_entry_href->{_most_recent} =
1866 $new_most_recent_parameter_index_on_entry;
1867 # print("gui_history,updated parameter_index_on_entry :$parameter_index_on_entry_href->{_most_recent}\n");
1868 ( $gui_history->get_defaults )->{_parameter_index_on_entry_href} =
1869 $parameter_index_on_entry_href;
1870  
1871 }
1872 else {
1873 print("gui_history, missing flow hash NADA\n");
1874 }
1875  
1876 return ();
1877  
1878 # print("gui_history,updated parameter_index_on_entry:$new_most_recent_parameter_index_on_entry, new_prior_parameter_index_on_entry=$new_prior_parameter_index_on_entry\n");
1879 }
1880  
1881 =head2 sub _update_parameter_index_on_exit
1882  
1883 $gui_history = current package
1884  
1885  
1886 =cut
1887  
1888 sub _update_parameter_index_on_exit {
1889 my (
1890 $gui_history,
1891 $new_most_recent_parameter_index_on_exit,
1892 $new_prior_parameter_index_on_exit
1893 ) = @_;
1894  
1895 if ( length $new_most_recent_parameter_index_on_exit ) {
1896  
1897 # CASE: A parameter is selected
1898  
1899 ( $gui_history->get_defaults() )->{_parameter_index_on_exit} =
1900 $new_most_recent_parameter_index_on_exit;
1901  
1902 # print("gui_history,updated parameter_index_on_exit :$new_most_recent_parameter_index_on_exit\n");
1903  
1904 if ( defined $parameter_index_on_exit_click_seq_href ) {
1905  
1906 # update the history of parameter_index_on_exit usage according to click count
1907 _set_click_sequence( $gui_history,
1908 $parameter_index_on_exit_click_seq_href );
1909  
1910 ( $gui_history->get_defaults )
1911 ->{_parameter_index_on_exit_click_seq_href} =
1912 $parameter_index_on_exit_click_seq_href;
1913  
1914 }
1915 else {
1916 print("gui_history, missing flow hash NADA\n");
1917 }
1918  
1919 if ( defined $parameter_index_on_exit_href ) {
1920  
1921 # update the history of parameter_index_on_exit according to the parameter_index_on_exit used
1922 $parameter_index_on_exit_href->{_earliest} =
1923 $parameter_index_on_exit_href->{_prior};
1924 $parameter_index_on_exit_href->{_prior} =
1925 $parameter_index_on_exit_href->{_most_recent};
1926 $parameter_index_on_exit_href->{_most_recent} =
1927 $new_most_recent_parameter_index_on_exit;
1928 # print("gui_history,updated parameter_index_on_exit :$parameter_index_on_exit_href->{_most_recent}\n");
1929  
1930 ( $gui_history->get_defaults )->{_parameter_index_on_exit_href} =
1931 $parameter_index_on_exit_href;
1932  
1933 }
1934 else {
1935 print("gui_history, missing flow hash NADA\n");
1936 }
1937  
1938 }
1939 else {
1940  
1941 # CASE: parameter is not selected
1942 if ( defined $parameter_index_on_exit_href ) {
1943  
1944 print(
1945 "gui_history, no parameter was selected; NO UPDATES to clicks\n"
1946 );
1947 ( $gui_history->get_defaults )->{_parameter_index_on_exit_href} =
1948 $parameter_index_on_exit_href;
1949  
1950 ( $gui_history->get_defaults )
1951 ->{_parameter_index_on_exit_click_seq_href} =
1952 $parameter_index_on_exit_click_seq_href;
1953  
1954 }
1955 else {
1956 print(
1957 "gui_history, no parameter is selected and flow hash missing\n"
1958 );
1959 }
1960 }
1961  
1962 return ();
1963  
1964 # print("gui_history,updated parameter_index_on_exit:$new_most_recent_parameter_index_on_exit, new_prior_parameter_index_on_exit=$new_prior_parameter_index_on_exit\n");
1965 }
1966  
1967 =head2 sub _update_sunix_prog_group
1968  
1969 $gui_history = current package
1970  
1971  
1972 =cut
1973  
1974 sub _update_sunix_prog_group {
1975 my ( $gui_history, $new_most_recent_sunix_prog_group,
1976 $new_prior_sunix_prog_group )
1977 = @_;
1978  
1979 ( $gui_history->get_defaults() )->{_sunix_prog_group} =
1980 $new_most_recent_sunix_prog_group;
1981  
1982 # print("gui_history,updated sunix_prog_group :$new_most_recent_sunix_prog_group\n");
1983  
1984 if ( defined $sunix_prog_group_href ) {
1985  
1986 # update the history of sunix group programs usage according to the sunix_prog_group used
1987 $sunix_prog_group_href->{_earliest} = $sunix_prog_group_href->{_prior};
1988 $sunix_prog_group_href->{_prior} =
1989 $sunix_prog_group_href->{_most_recent};
1990 $sunix_prog_group_href->{_most_recent} =
1991 $new_most_recent_sunix_prog_group;
1992  
1993 ( $gui_history->get_defaults )->{_sunix_prog_group_href} =
1994 $sunix_prog_group_href;
1995 ( $gui_history->get_defaults )->{_is_sunix_listbox} = $true;
1996  
1997 }
1998 else {
1999 print("gui_history, missing flow hash NADA\n");
2000 }
2001  
2002 if ( defined $sunix_prog_group_click_seq_href ) {
2003 _set_click_sequence( $gui_history, $sunix_prog_group_click_seq_href );
2004 ( $gui_history->get_defaults )->{_sunix_prog_group_click_seq_href} =
2005 $sunix_prog_group_click_seq_href;
2006 }
2007 else {
2008 print("gui_history, missing flow hash seq NADA\n");
2009 }
2010  
2011 return ();
2012  
2013 # print("gui_history,updated sunix_prog_group:$new_most_recent_sunix_prog_group, new_prior_sunix_prog_group=$new_prior_sunix_prog_group\n");
2014 }
2015  
2016 =head2 sub _update_sunix_prog_group_color
2017  
2018 $gui_history = current package
2019  
2020 color is always the same (= neutral)
2021  
2022  
2023 =cut
2024  
2025 sub _update_sunix_prog_group_color {
2026 my (
2027 $gui_history,
2028 $new_most_recent_sunix_prog_group_color,
2029 $new_prior_sunix_prog_group_color
2030 ) = @_;
2031  
2032 ( $gui_history->get_defaults() )->{_flow_color} =
2033 $new_most_recent_sunix_prog_group_color;
2034  
2035 # print("gui_history,updated sunix_prog_group :$new_most_recent_sunix_prog_group_color\n");
2036  
2037 return ();
2038  
2039 }
2040  
2041 =head2 sub _update_superflow_tool
2042 Assign new name to private key: superflow_tool
2043  
2044 =cut
2045  
2046 sub _update_superflow_tool {
2047 my ( $gui_history, $new_most_recent_tool, $new_prior_tool ) = @_;
2048  
2049 # print("1. gui_history,updated superflow_tool:$new_most_recent_tool, new_prior_tool=$new_prior_tool\n");
2050  
2051 # update the history of superflow_tool usage according to the tool used
2052 $superflow_tool_href->{_earliest} = $superflow_tool_href->{_prior};
2053 $superflow_tool_href->{_prior} = $superflow_tool_href->{_most_recent};
2054 $superflow_tool_href->{_most_recent} = $new_most_recent_tool;
2055  
2056 # ( $gui_history->delete_whole_flow)->{_superflow_tool_href} = $superflow_tool_href;
2057 ( $gui_history->get_defaults() )->{_superflow_tool_href} =
2058 $superflow_tool_href;
2059  
2060 # print("2. gui_history,updated superflow_tool :$new_most_recent_tool, new_prior_tool=$new_prior_tool\n");
2061  
2062 return ();
2063  
2064 }
2065  
2066 =head2 BUILDARGS Initialize contents
2067 before instantiation.
2068 In superclass, helps avoid hash or hashref syntax
2069  
2070 =cut
2071  
2072 around BUILDARGS => sub {
2073  
2074 my ( $orig, $gui_history, @args ) = @_;
2075  
2076 if ( scalar @args >= 1 && not ref $args[0] ) {
2077  
2078 # print(" BUILDARGS initializing with args = @args \n ");
2079 # print(" BUILDARGS initializing with orig = $orig \n ");
2080 # print(" BUILDARGS initializing with gui_history = $gui_history \n ");
2081  
2082 return $gui_history->$orig( item => $args[0] );
2083 return $gui_history->$orig( indexx => $args[1] );
2084  
2085 # my $item = $gui_history->get_item();
2086 # print(" 1. BUILDARGS item = $item \n ");
2087  
2088 # foreach my $key ( sort keys %$orig ) {
2089 # print(" gui_history, BUILDARGS, key is $key, value is $orig->{$key} \n ");
2090 # }
2091  
2092 }
2093 else {
2094  
2095 # print(" gui_history,BUILDARGS, unexpected external default value(s) NADA\n");
2096 my $result = $gui_history->$orig(@_);
2097 return ($result);
2098 }
2099 };
2100  
2101 =head2 BUILD
2102 Initial checking after instantiation
2103  
2104 foreach my $key ( sort keys %$gui_history ) {
2105 print (" gui_history, BUILD key is $key, value is $gui_history->{$key}\n");
2106 }
2107  
2108 =cut
2109  
2110 sub BUILD {
2111 my ($this_package_address) = @_;
2112  
2113 # _defaults attribute start empty
2114 # print("1. gui_history,BUILD,initializing with: $gui_history()\n");
2115 _initialize($this_package_address);
2116  
2117 }
2118  
2119 # print("2. gui_history,BUILD,initializing with: $gui_history->get_defaults()\n");
2120  
2121 =head2 sub get_internal
2122  
2123 =cut
2124  
2125 sub get_internal {
2126  
2127 my ($gui_history) = @_;
2128  
2129 if ( defined $gui_history->get_item() ) {
2130  
2131 my $result = $gui_history->get_item();
2132  
2133 # print(" gui_history, get_math, result : $result \n ");
2134  
2135 return ($result);
2136 }
2137  
2138 }
2139  
2140  
2141 =head2 sub get_file_status
2142  
2143 =cut
2144  
2145 sub get_file_status {
2146  
2147 my ($gui_history) = @_;
2148  
2149 my $num_items_in_flow =
2150 $gui_history->get_defaults()->{_temp_num_items_in_flow};
2151 my $click_count =
2152 ( ( $gui_history->get_defaults() )->{_count} );
2153  
2154 if ( length $num_items_in_flow ) {
2155  
2156 my $min_click_count = ($num_items_in_flow + 1) * 3;
2157 # print("gui_history,get_file_status, click count =$click_count \n");
2158 if ( $click_count <= $min_click_count ) {
2159  
2160 my $result = $true;
2161 #print(
2162 #"gui_history,get_file_status, click count: $click_count<= $min_click_count \n"
2163 # );
2164 return ($result);
2165 }
2166 else {
2167 # print("gui_history,get_file_status, exceeded click count \n");
2168 # print("click count =$click_count > $min_click_count \n");
2169 my $result = $false;
2170 return($result);
2171 }
2172  
2173 }
2174 else {
2175 print("gui_history,get_file_status, missing inputs\n");
2176 return ();
2177 }
2178  
2179 }
2180  
2181 =head2 sub set_internally
2182  
2183  
2184 =cut
2185  
2186 sub set_internally {
2187  
2188 my ($gui_history) = @_;
2189  
2190 if ( $gui_history->get_item ) {
2191  
2192 $gui_history->set_item('replacement');
2193  
2194 my $result = $gui_history->get_item();
2195  
2196 # print(" gui_history, get_math, result : $result \n ");
2197  
2198 return ();
2199 }
2200  
2201 }
2202  
2203 =head2 sub set_file_status
2204  
2205 =cut
2206  
2207 sub set_file_status {
2208  
2209 my ( $gui_history, $num_items_in_flow ) = @_;
2210  
2211 if ( length $num_items_in_flow ) {
2212  
2213 $gui_history->get_defaults()->{_temp_num_items_in_flow} =
2214 $num_items_in_flow;
2215 # print("gui_history,set_file_status,num_items_in_flow=$num_items_in_flow\n");
2216  
2217 return ();
2218  
2219 }
2220 else {
2221 print("gui_history,set_file_status, missing iputs\n");
2222 return ();
2223 }
2224  
2225 }
2226  
2227 =head2 sub clear
2228  
2229 restore defaults to gui history items
2230  
2231 =cut
2232  
2233 sub _clear {
2234  
2235 my ( $gui_history, $latest_button, $prior_button ) = @_;
2236  
2237 if ( $latest_button eq 'delete_from_flow_button' ) {
2238  
2239 # the index selected should now be clean
2240  
2241 $flow_select_index_href = {
2242 _item => $empty_string,
2243 _index => $index_start,
2244 _name => 'flow_select_index',
2245 _most_recent => $current_index_start,
2246 _earliest => $earliest_index_start,
2247 _next => $next_index_start,
2248 _prior => $prior_index_start,
2249 };
2250  
2251 # update the hash that will be used outside the module
2252 ( $gui_history->get_defaults() )->{_flow_select_index_href} =
2253 $flow_select_index_href;
2254  
2255 # print("gui_history, _clear, success\n");
2256 }
2257  
2258 }
2259  
2260 =head2 sub _subtract
2261  
2262 restore defaults to gui history items
2263  
2264 =cut
2265  
2266 sub _subtract {
2267  
2268 my ( $gui_history, $button ) = @_;
2269  
2270 if ( $button eq 'add2flow_button' ) {
2271  
2272 # the indeices should be reduced by 1
2273 $flow_select_index_href->{_earliest} =
2274 $flow_select_index_href->{_earliest} - 1;
2275 $flow_select_index_href->{_prior} =
2276 $flow_select_index_href->{_prior} - 1;
2277 $flow_select_index_href->{_most_recent} =
2278 $flow_select_index_href->{_most_recent} - 1;
2279  
2280 # update the hash that will be used outside the module
2281 ( $gui_history->get_defaults() )->{_flow_select_index_href} =
2282 $flow_select_index_href;
2283  
2284 print("gui_history, _subtract, success\n");
2285 print(
2286 "gui_history, _subtract, most_recent = $flow_select_index_href->{_most_recent}\n"
2287 );
2288 }
2289  
2290 }
2291  
2292 sub test {
2293  
2294 print("made it to gui_history\n");
2295 }
2296  
2297 =head2 sub view
2298  
2299 Writes out internals to a file
2300  
2301 =cut
2302  
2303 sub view {
2304  
2305 my ($gui_history) = @_;
2306  
2307 my $key_hash_ref;
2308  
2309 my $filename = 'gui_history.txt';
2310 open( my $fh, '>:encoding(UTF-8)', $filename )
2311 or die "Could not open file '$filename' $!";
2312  
2313 print $fh (
2314 " gui_history, view;
2315 contains main hash which contains all the gui history and \n "
2316 );
2317  
2318 print(" gui_history, view;contains main hash which contains all the gui history and attribute values as well\n\n");
2319  
2320 foreach my $key ( sort keys %$gui_history ) {
2321  
2322 # print(" gui_history->{$key} = $gui_history->{$key}\n");
2323  
2324 # print values of the main hash called defaults
2325 if ( $key eq 'defaults' ) {
2326  
2327 # print $fh (" \ngui_history, view; print values of has 'stored' in defaults attribute\n");
2328  
2329 foreach my $sub_key ( sort keys %{ $gui_history->get_defaults() } )
2330 {
2331  
2332 my $ans = ( $gui_history->get_defaults() )->{$sub_key};
2333  
2334 if ( defined $ans and $ans ne $empty_string ) {
2335 print $fh (" gui_history->{$key}: $sub_key= $ans\n");
2336  
2337 # print(" gui_history->{$key}: $sub_key= $ans\n");
2338 }
2339 else {
2340 print $fh (" gui_history->{$key}: $sub_key= 'nada'\n");
2341  
2342 # print(" gui_history, view, ans is not available \n");
2343 }
2344  
2345 }
2346  
2347 # print values of values that are hashes
2348 if ( ( $gui_history->get_defaults() )->{_FileDialog_type_href} ) {
2349  
2350 # print additional subset: _FileDialog_type_href
2351 $key_hash_ref =
2352 ( $gui_history->{defaults} )->{_FileDialog_type_href};
2353  
2354 # print("gui_history, view, key_hash_ref = $key_hash_ref \n");
2355 foreach my $sub2_key ( sort keys %{$key_hash_ref} ) {
2356  
2357 my $ans = $key_hash_ref->{$sub2_key};
2358  
2359 if ( defined $ans and $ans ne $empty_string ) {
2360  
2361 # print(" key_hash_ref->{$sub2_key}: $sub2_key= $ans\n");
2362 print $fh (
2363 " ( (gui_history->{defaults})->{_FileDialog_type_href})->{$sub2_key}: $sub2_key= $ans\n"
2364 );
2365 }
2366 else {
2367 print $fh (
2368 " ( (gui_history->{defaults})->{_FileDialog_type_href})->{$sub2_key}: $sub2_key= 'nada'\n"
2369 );
2370  
2371 # print(" gui_history, view, ans is not available \n");
2372 }
2373 }
2374 }
2375  
2376 # print values of values that are hashes
2377 if ( ( $gui_history->get_defaults() )
2378 ->{_FileDialog_button_click_seq_href} )
2379 {
2380  
2381 # print additional subset: _FileDialog_button_click_seq_href
2382 $key_hash_ref = ( $gui_history->{defaults} )
2383 ->{_FileDialog_button_click_seq_href};
2384  
2385 # print("gui_history, view, key_hash_ref = $key_hash_ref \n");
2386 foreach my $sub2_key ( sort keys %{$key_hash_ref} ) {
2387  
2388 my $ans = $key_hash_ref->{$sub2_key};
2389  
2390 if ( defined $ans and $ans ne $empty_string ) {
2391  
2392 # print(" key_hash_ref->{$sub2_key}: $sub2_key= $ans\n");
2393 print $fh (
2394 " ( (gui_history->{defaults})->{_FileDialog_button_click_seq_href})->{$sub2_key}: $sub2_key= $ans\n"
2395 );
2396  
2397 }
2398 else {
2399  
2400 # print(" gui_history-, view, ans is not available \n");
2401 print $fh (
2402 " ( (gui_history->{defaults})->{_FileDialog_button_click_seq_href})->{$sub2_key}: $sub2_key= nada \n"
2403 );
2404 }
2405 }
2406 }
2407  
2408 if ( ( $gui_history->get_defaults() )
2409 ->{_add2flow_button_click_seq_href} )
2410 {
2411  
2412 # print additional subsets: _add2flow_button_click_seq_href
2413 $key_hash_ref = ( $gui_history->{defaults} )
2414 ->{_add2flow_button_click_seq_href};
2415  
2416 # print("gui_history, view, key_hash_ref = $key_hash_ref \n");
2417 foreach my $sub2_key ( sort keys %{$key_hash_ref} ) {
2418  
2419 my $ans = $key_hash_ref->{$sub2_key};
2420  
2421 if ( defined $ans and $ans ne $empty_string ) {
2422  
2423 # print(" 2. key_hash_ref->{$sub2_key}: $sub2_key= $ans\n");
2424 print $fh (
2425 " ( (gui_history->{defaults})->{_add2flow_button_click_seq_href})->{$sub2_key}: $sub2_key= $ans\n"
2426 );
2427 }
2428 else {
2429  
2430 # print(" gui_history-, view, ans is not available \n");
2431 print $fh (
2432 " ( (gui_history->{defaults})->{_add2flow_button_click_seq_href})->{$sub2_key}: $sub2_key= nada\n"
2433 );
2434 }
2435 }
2436 }
2437  
2438 if ( ( $gui_history->get_defaults() )->{_add2flow_button_color_href}
2439 )
2440 {
2441  
2442 # print additional subsets: _add2flow_button_color_href
2443 $key_hash_ref =
2444 ( $gui_history->{defaults} )->{_add2flow_button_color_href};
2445  
2446 # print("gui_history, view, key_hash_ref = $key_hash_ref \n");
2447 foreach my $sub2_key ( sort keys %{$key_hash_ref} ) {
2448  
2449 my $ans = $key_hash_ref->{$sub2_key};
2450 if ( defined $ans and $ans ne $empty_string ) {
2451  
2452 # print(" 3. key_hash_ref->{$sub2_key}: $sub2_key= $ans\n");
2453 print $fh (
2454 " ( (gui_history->{defaults})->{_add2flow_button_color_href})->{$sub2_key}: $sub2_key= $ans\n"
2455 );
2456 }
2457 else {
2458  
2459 # print(" gui_history-, view, ans is not available \n");
2460 print $fh (
2461 " ( (gui_history->{defaults})->{_add2flow_button_color_href})->{$sub2_key}: $sub2_key= nada\n"
2462 );
2463 }
2464 }
2465 }
2466  
2467 if ( ( $gui_history->get_defaults() )->{_button_href} ) {
2468  
2469 # print additional subsets: _button_href
2470 $key_hash_ref = ( $gui_history->{defaults} )->{_button_href};
2471  
2472 # print("gui_history, view, key_hash_ref = $key_hash_ref \n");
2473 foreach my $sub2_key ( sort keys %{$key_hash_ref} ) {
2474  
2475 my $ans = $key_hash_ref->{$sub2_key};
2476 if ( defined $ans and $ans ne $empty_string ) {
2477  
2478 # print(" key_hash_ref->{$sub2_key}: $sub2_key= $ans\n");
2479 print $fh (
2480 " ( (gui_history->{defaults})->{_button_href})->{$sub2_key}: $sub2_key= $ans\n"
2481 );
2482 }
2483 else {
2484  
2485 # print(" gui_history-, view, ans is not available \n");
2486 print $fh (
2487 " ( (gui_history->{defaults})->{_button_href})->{$sub2_key}: $sub2_key= nada\n"
2488 );
2489 }
2490 }
2491 }
2492 if ( ( $gui_history->get_defaults() )
2493 ->{_delete_from_flow_button_click_seq_href} )
2494 {
2495  
2496 # print additional subsets: delete_from_flow_button
2497 $key_hash_ref = ( $gui_history->get_defaults() )
2498 ->{_delete_from_flow_button_click_seq_href};
2499  
2500 # print("gui_history, view, key_hash_ref = $key_hash_ref \n");
2501 foreach my $sub2_key ( sort keys %{$key_hash_ref} ) {
2502  
2503 my $ans = $key_hash_ref->{$sub2_key};
2504 if ( defined $ans and $ans ne $empty_string ) {
2505  
2506 # print(" 4. key_hash_ref->{$sub2_key}: $sub2_key= $ans\n");
2507 print $fh (
2508 " ( (gui_history->get_defaults() )->{_delete_from_flow_button_click_seq_href})->{$sub2_key}: $sub2_key= $ans\n"
2509 );
2510 }
2511 else {
2512 print $fh (
2513 " ( (gui_history->get_defaults() )->{_delete_from_flow_button_click_seq_href})->{$sub2_key}: $sub2_key= nada\n"
2514 );
2515  
2516 # print(" gui_history-, view, ans is not available \n");
2517 }
2518 }
2519 }
2520  
2521 if ( ( $gui_history->get_defaults() )
2522 ->{_delete_whole_flow_button_click_seq_href} )
2523 {
2524  
2525 # print additional subsets: delete_whole_flow_button
2526 $key_hash_ref = ( $gui_history->get_defaults() )
2527 ->{_delete_whole_flow_button_click_seq_href};
2528  
2529 # print("gui_history, view, key_hash_ref = $key_hash_ref \n");
2530 foreach my $sub2_key ( sort keys %{$key_hash_ref} ) {
2531  
2532 my $ans = $key_hash_ref->{$sub2_key};
2533 if ( defined $ans and $ans ne $empty_string ) {
2534  
2535 # print(" 4. key_hash_ref->{$sub2_key}: $sub2_key= $ans\n");
2536 print $fh (
2537 " ( (gui_history->get_defaults() )->{_delete_whole_flow_button_click_seq_href})->{$sub2_key}: $sub2_key= $ans\n"
2538 );
2539 }
2540 else {
2541 print $fh (
2542 " ( (gui_history->get_defaults() )->{_delete_whole_flow_button_click_seq_href})->{$sub2_key}: $sub2_key= nada\n"
2543 );
2544  
2545 # print(" gui_history-, view, ans is not available \n");
2546 }
2547 }
2548 }
2549  
2550 if ( ( $gui_history->get_defaults() )
2551 ->{_flow_item_down_arrow_button_click_seq_href} )
2552 {
2553  
2554 # print additional subsets: flow_item_down_arrow_button
2555 $key_hash_ref = ( $gui_history->get_defaults() )
2556 ->{_flow_item_down_arrow_button_click_seq_href};
2557  
2558 # print("gui_history, view, key_hash_ref = $key_hash_ref \n");
2559 foreach my $sub2_key ( sort keys %{$key_hash_ref} ) {
2560  
2561 my $ans = $key_hash_ref->{$sub2_key};
2562 if ( defined $ans and $ans ne $empty_string ) {
2563  
2564 # # print(" 5. key_hash_ref->{$sub2_key}: $sub2_key= $ans\n");
2565 print $fh (
2566 " ( (gui_history->get_defaults() )->{_flow_item_down_arrow_button_click_seq_href})->{$sub2_key}: $sub2_key= $ans\n"
2567 );
2568 }
2569 else {
2570 print $fh (
2571 " ( (gui_history->get_defaults() )->{_flow_item_down_arrow_button_click_seq_href})->{$sub2_key}: $sub2_key= nada\n"
2572 );
2573  
2574 # print(" gui_history-, view, ans is not available \n");
2575 }
2576 }
2577 }
2578 if ( ( $gui_history->get_defaults() )
2579 ->{_flow_item_up_arrow_button_click_seq_href} )
2580 {
2581  
2582 # print additional subsets: flow_item_up_arrow_button
2583 $key_hash_ref = ( $gui_history->get_defaults() )
2584 ->{_flow_item_up_arrow_button_click_seq_href};
2585  
2586 # print("gui_history, view, key_hash_ref = $key_hash_ref \n");
2587 foreach my $sub2_key ( sort keys %{$key_hash_ref} ) {
2588  
2589 my $ans = $key_hash_ref->{$sub2_key};
2590 if ( defined $ans and $ans ne $empty_string ) {
2591  
2592 # print(" key_hash_ref->{$sub2_key}: $sub2_key= $ans\n");
2593 print $fh (
2594 " ( (gui_history->get_defaults() )->{_flow_item_up_arrow_button_click_seq_href})->{$sub2_key}: $sub2_key= $ans\n"
2595 );
2596 }
2597 else {
2598 print $fh (
2599 " ( (gui_history->get_defaults() )->{_flow_item_up_arrow_button_click_seq_href})->{$sub2_key}: $sub2_key= nada\n"
2600 );
2601  
2602 # print(" gui_history-, view, ans is not available \n");
2603 }
2604 }
2605 }
2606  
2607 if ( ( $gui_history->get_defaults() )->{_flow_select_color_href} ) {
2608  
2609 # print additional subsets: flow_select_color
2610 $key_hash_ref =
2611 ( $gui_history->get_defaults() )->{_flow_select_color_href};
2612  
2613 # print("gui_history, view, key_hash_ref = $key_hash_ref \n");
2614 foreach my $sub2_key ( sort keys %{$key_hash_ref} ) {
2615  
2616 my $ans = $key_hash_ref->{$sub2_key};
2617 if ( defined $ans and $ans ne $empty_string ) {
2618  
2619 # print(" key_hash_ref->{$sub2_key}: $sub2_key= $ans\n");
2620 print $fh (
2621 " ( (gui_history->get_defaults() )->{_flow_select_color_href})->{$sub2_key}: $sub2_key= $ans\n"
2622 );
2623 }
2624 else {
2625 print $fh (
2626 " ( (gui_history->get_defaults() )->{_flow_select_color_href})->{$sub2_key}: $sub2_key= nada\n"
2627 );
2628  
2629 # print(" gui_history-, view, ans is not available \n");
2630 }
2631 }
2632 }
2633 if ( ( $gui_history->get_defaults() )->{_flow_select_index_href} ) {
2634  
2635 # print additional subsets: flow_select
2636 $key_hash_ref =
2637 ( $gui_history->get_defaults() )->{_flow_select_index_href};
2638  
2639 # print("25 gui_history, view, key_hash_ref = $key_hash_ref \n");
2640 foreach my $sub2_key ( sort keys %{$key_hash_ref} ) {
2641  
2642 my $ans = $key_hash_ref->{$sub2_key};
2643 if ( defined $ans and $ans ne $empty_string ) {
2644  
2645 # print(" 25 key_hash_ref->{$sub2_key}: $sub2_key= $ans\n");
2646 print $fh (
2647 " ( (gui_history->get_defaults() )->{_flow_select_index_href})->{$sub2_key}: $sub2_key= $ans\n"
2648 );
2649 }
2650 else {
2651 print $fh (
2652 " ( (gui_history->get_defaults() )->{_flow_select_index_href})->{$sub2_key}: $sub2_key= nada\n"
2653 );
2654  
2655 # print(" gui_history-, view, ans is not available \n");
2656 }
2657 }
2658 }
2659  
2660 if ( ( $gui_history->get_defaults() )->{_flow_select_click_seq_href}
2661 )
2662 {
2663  
2664 # print additional subsets: flow_select-seq
2665 $key_hash_ref = ( $gui_history->get_defaults() )
2666 ->{_flow_select_click_seq_href};
2667  
2668 # print("gui_history, view, key_hash_ref = $key_hash_ref \n");
2669 foreach my $sub2_key ( sort keys %{$key_hash_ref} ) {
2670  
2671 my $ans = $key_hash_ref->{$sub2_key};
2672 if ( defined $ans and $ans ne $empty_string ) {
2673  
2674 # print(" key_hash_ref->{$sub2_key}: $sub2_key= $ans\n");
2675 print $fh (
2676 " ( (gui_history->get_defaults() )->{_flow_select_click_seq_href})->{$sub2_key}: $sub2_key= $ans\n"
2677 );
2678 }
2679 else {
2680  
2681 # print(" key_hash_ref->{$sub2_key}: $sub2_key= $ans\n");
2682 print $fh (
2683 " ( (gui_history->get_defaults() )->{_flow_select_click_seq_href})->{$sub2_key}: $sub2_key= nada\n"
2684 );
2685  
2686 # print(" gui_history-, view, ans is not available \n");
2687 }
2688 }
2689 }
2690  
2691 if ( ( $gui_history->get_defaults() )->{_flow_type_href} ) {
2692  
2693 # print additional subset: _flow_type_href
2694 $key_hash_ref =
2695 ( $gui_history->get_defaults() )->{_flow_type_href};
2696  
2697 # my $ans = (( $gui_history->get_defaults() )->{_flow_type_href})->{_most_recent};
2698 # print("gui_history, msot recent flow type = $ans\n");
2699 # print("gui_history, view, key_hash_ref = $key_hash_ref \n");
2700 foreach my $sub2_key ( sort keys %{$key_hash_ref} ) {
2701  
2702 my $ans = $key_hash_ref->{$sub2_key};
2703 if ( defined $ans and $ans ne $empty_string ) {
2704  
2705 # print(" key_hash_ref->{$sub2_key}: $sub2_key= $ans\n");
2706 print $fh (
2707 " ( (gui_history->{defaults})->{_flow_type_href})->{$sub2_key}: $sub2_key= $ans\n"
2708 );
2709  
2710 # print (" ( (gui_history->{defaults})->{_flow_type_href})->{$sub2_key}: $sub2_key= $ans\n");
2711 }
2712 else {
2713 print $fh (
2714 " ( (gui_history->{defaults})->{_flow_type_href})->{$sub2_key}: $sub2_key= nada\n"
2715 );
2716  
2717 # print(" gui_history-, view, ans is not available \n");
2718 }
2719 }
2720 }
2721  
2722 if ( ( $gui_history->get_defaults() )
2723 ->{_parameter_color_on_exit_href} )
2724 {
2725  
2726 # print additional subset: _parameter_color_on_exit_click_seq_href
2727 $key_hash_ref =
2728 ( $gui_history->{defaults} )->{_parameter_color_on_exit_href};
2729  
2730 # print("gui_history, view, key_hash_ref = $key_hash_ref \n");
2731 foreach my $sub2_key ( sort keys %{$key_hash_ref} ) {
2732  
2733 my $ans = $key_hash_ref->{$sub2_key};
2734 if ( defined $ans and $ans ne $empty_string ) {
2735  
2736 # print(" key_hash_ref->{$sub2_key}: $sub2_key= $ans\n");
2737 print $fh (
2738 " ( (gui_history->{defaults})->{_parameter_color_on_exit_href})->{$sub2_key}: $sub2_key= $ans\n"
2739 );
2740 }
2741 else {
2742 print $fh (
2743 " ( (gui_history->{defaults})->{_parameter_color_on_exit_href})->{$sub2_key}: $sub2_key= nada\n"
2744 );
2745  
2746 # print(" gui_history-, view, ans is not available \n");
2747 }
2748 }
2749 }
2750 if ( ( $gui_history->get_defaults() )
2751 ->{_parameter_color_on_entry_href} )
2752 {
2753  
2754 # print additional subset: _parameter_color_on_entry_click_seq_href
2755 $key_hash_ref = ( $gui_history->{defaults} )
2756 ->{_parameter_color_on_entry_href};
2757  
2758 # print("gui_history, view, key_hash_ref = $key_hash_ref \n");
2759 foreach my $sub2_key ( sort keys %{$key_hash_ref} ) {
2760  
2761 my $ans = $key_hash_ref->{$sub2_key};
2762 if ( defined $ans and $ans ne $empty_string ) {
2763  
2764 # print(" key_hash_ref->{$sub2_key}: $sub2_key= $ans\n");
2765 print $fh (
2766 " ( (gui_history->{defaults})->{_parameter_color_on_entry_href})->{$sub2_key}: $sub2_key= $ans\n"
2767 );
2768 }
2769 else {
2770 print $fh (
2771 " ( (gui_history->{defaults})->{_parameter_color_on_entry_href})->{$sub2_key}: $sub2_key= nada\n"
2772 );
2773  
2774 # print(" gui_history-, view, ans is not available \n");
2775 }
2776 }
2777 }
2778 if ( ( $gui_history->get_defaults() )
2779 ->{_parameter_index_on_entry_href} )
2780 {
2781  
2782 # print additional subset: _parameter_index_on_entry_href
2783 $key_hash_ref = ( $gui_history->{defaults} )
2784 ->{_parameter_index_on_entry_href};
2785  
2786 # print("gui_history, view, key_hash_ref = $key_hash_ref \n");
2787 foreach my $sub2_key ( sort keys %{$key_hash_ref} ) {
2788  
2789 my $ans = $key_hash_ref->{$sub2_key};
2790 if ( defined $ans and $ans ne $empty_string ) {
2791  
2792 # print(" key_hash_ref->{$sub2_key}: $sub2_key= $ans\n");
2793 print $fh (
2794 " ( (gui_history->{defaults})->{_parameter_index_on_entry_href})->{$sub2_key}: $sub2_key= $ans\n"
2795 );
2796 }
2797 else {
2798 print $fh (
2799 " ( (gui_history->{defaults})->{_parameter_index_on_entry_href})->{$sub2_key}: $sub2_key= nada\n"
2800 );
2801  
2802 # print(" gui_history-, view, ans is not available \n");
2803 }
2804 }
2805 }
2806 if ( ( $gui_history->get_defaults() )
2807 ->{_parameter_index_on_entry_click_seq_href} )
2808 {
2809  
2810 # print additional subset: _parameter_index_on_entry_click_seq_href
2811 $key_hash_ref = ( $gui_history->{defaults} )
2812 ->{_parameter_index_on_entry_click_seq_href};
2813  
2814 # print("gui_history, view, key_hash_ref = $key_hash_ref \n");
2815 foreach my $sub2_key ( sort keys %{$key_hash_ref} ) {
2816  
2817 my $ans = $key_hash_ref->{$sub2_key};
2818 if ( defined $ans and $ans ne $empty_string ) {
2819  
2820 # print(" key_hash_ref->{$sub2_key}: $sub2_key= $ans\n");
2821 print $fh (
2822 " ( (gui_history->{defaults})->{_parameter_index_on_entry_click_seq_href})->{$sub2_key}: $sub2_key= $ans\n"
2823 );
2824 }
2825 else {
2826 print $fh (
2827 " ( (gui_history->{defaults})->{_parameter_index_touched_color_on_entry_click_seq_href})->{$sub2_key}: $sub2_key= nada\n"
2828 );
2829  
2830 # print(" gui_history-, view, ans is not available \n");
2831 }
2832 }
2833 }
2834 if ( ( $gui_history->get_defaults() )
2835 ->{_parameter_index_on_exit_href} )
2836 {
2837  
2838 # print additional subset: _parameter_index_on_exit_click_seq_href
2839 $key_hash_ref =
2840 ( $gui_history->{defaults} )->{_parameter_index_on_exit_href};
2841  
2842 # print("gui_history, view, key_hash_ref = $key_hash_ref \n");
2843 foreach my $sub2_key ( sort keys %{$key_hash_ref} ) {
2844  
2845 my $ans = $key_hash_ref->{$sub2_key};
2846 if ( defined $ans and $ans ne $empty_string ) {
2847  
2848 # print(" key_hash_ref->{$sub2_key}: $sub2_key= $ans\n");
2849 print $fh (
2850 " ( (gui_history->{defaults})->{_parameter_index_on_exit_href})->{$sub2_key}: $sub2_key= $ans\n"
2851 );
2852 }
2853 else {
2854 print $fh (
2855 " ( (gui_history->{defaults})->{_parameter_index_on_exit_href})->{$sub2_key}: $sub2_key= nada\n"
2856 );
2857  
2858 # print(" gui_history-, view, ans is not available \n");
2859 }
2860 }
2861 }
2862 if ( ( $gui_history->get_defaults() )
2863 ->{_parameter_index_on_exit_click_seq_href} )
2864 {
2865  
2866 # print additional subset: _parameter_index_on_exit_click_seq_href
2867 $key_hash_ref = ( $gui_history->{defaults} )
2868 ->{_parameter_index_on_exit_click_seq_href};
2869  
2870 # print("gui_history, view, key_hash_ref = $key_hash_ref \n");
2871 foreach my $sub2_key ( sort keys %{$key_hash_ref} ) {
2872  
2873 my $ans = $key_hash_ref->{$sub2_key};
2874 if ( defined $ans and $ans ne $empty_string ) {
2875  
2876 # print(" key_hash_ref->{$sub2_key}: $sub2_key= $ans\n");
2877 print $fh (
2878 " ( (gui_history->{defaults})->{_parameter_index_on_exit_click_seq_href})->{$sub2_key}: $sub2_key= $ans\n"
2879 );
2880 }
2881 else {
2882 print $fh (
2883 " ( (gui_history->{defaults})->{_parameter_index_on_exit_click_seq_href})->{$sub2_key}: $sub2_key= nada\n"
2884 );
2885  
2886 # print(" gui_history-, view, ans is not available \n");
2887 }
2888 }
2889 }
2890 if (
2891 ( $gui_history->get_defaults() )->{_run_button_click_seq_href} )
2892 {
2893  
2894 # print additional subset: _run_button_click_seq_href
2895 $key_hash_ref =
2896 ( $gui_history->{defaults} )->{_run_button_click_seq_href};
2897  
2898 # print("gui_history, view, key_hash_ref = $key_hash_ref \n");
2899 foreach my $sub2_key ( sort keys %{$key_hash_ref} ) {
2900  
2901 my $ans = $key_hash_ref->{$sub2_key};
2902 if ( defined $ans and $ans ne $empty_string ) {
2903  
2904 # print(" key_hash_ref->{$sub2_key}: $sub2_key= $ans\n");
2905 print $fh (
2906 " ( (gui_history->{defaults})->{_run_button_click_seq_href})->{$sub2_key}: $sub2_key= $ans\n"
2907 );
2908 }
2909 else {
2910 print $fh (
2911 " ( (gui_history->{defaults})->{_run_button_click_seq_href})->{$sub2_key}: $sub2_key= nada\n"
2912 );
2913  
2914 # print(" gui_history-, view, ans is not available \n");
2915 }
2916 }
2917 }
2918 if ( ( $gui_history->get_defaults() )->{_save_button_click_seq_href}
2919 )
2920 {
2921  
2922 # print additional subset: _save_button_click_seq_href
2923 $key_hash_ref =
2924 ( $gui_history->{defaults} )->{_save_button_click_seq_href};
2925  
2926 # print("gui_history, view, key_hash_ref = $key_hash_ref \n");
2927 foreach my $sub2_key ( sort keys %{$key_hash_ref} ) {
2928  
2929 my $ans = $key_hash_ref->{$sub2_key};
2930 if ( defined $ans and $ans ne $empty_string ) {
2931  
2932 # print(" key_hash_ref->{$sub2_key}: $sub2_key= $ans\n");
2933 print $fh (
2934 " ( (gui_history->{defaults})->{_save_button_click_seq_href})->{$sub2_key}: $sub2_key= $ans\n"
2935 );
2936 }
2937 else {
2938 print $fh (
2939 " ( (gui_history->{defaults})->{_save_button_click_seq_href})->{$sub2_key}: $sub2_key= nada\n"
2940 );
2941  
2942 # print(" gui_history-, view, ans is not available \n");
2943 }
2944 }
2945 }
2946 if ( ( $gui_history->get_defaults() )
2947 ->{_save_as_button_click_seq_href} )
2948 {
2949  
2950 # print additional subset: _save_as_button_click_seq_href
2951 $key_hash_ref = ( $gui_history->{defaults} )
2952 ->{_save_as_button_click_seq_href};
2953  
2954 # print("gui_history, view, key_hash_ref = $key_hash_ref \n");
2955 foreach my $sub2_key ( sort keys %{$key_hash_ref} ) {
2956  
2957 my $ans = $key_hash_ref->{$sub2_key};
2958 if ( defined $ans and $ans ne $empty_string ) {
2959  
2960 # print(" key_hash_ref->{$sub2_key}: $sub2_key= $ans\n");
2961 print $fh (
2962 " ( (gui_history->{defaults})->{_save_as_button_click_seq_href})->{$sub2_key}: $sub2_key= $ans\n"
2963 );
2964 }
2965 else {
2966 print $fh (
2967 " ( (gui_history->{defaults})->{_save_as_button_click_seq_href})->{$sub2_key}: $sub2_key= nada\n"
2968 );
2969  
2970 # print(" gui_history-, view, ans is not available \n");
2971 }
2972 }
2973 }
2974 if ( ( $gui_history->get_defaults() )->{_sunix_prog_group_href} ) {
2975  
2976 # print additional subset: _sunix_prog_group_href
2977 $key_hash_ref =
2978 ( $gui_history->{defaults} )->{_sunix_prog_group_href};
2979  
2980 # print("gui_history, view, key_hash_ref = $key_hash_ref \n");
2981 foreach my $sub2_key ( sort keys %{$key_hash_ref} ) {
2982  
2983 my $ans = $key_hash_ref->{$sub2_key};
2984 if ( defined $ans and $ans ne $empty_string ) {
2985  
2986 # print(" key_hash_ref->{$sub2_key}: $sub2_key= $ans\n");
2987 print $fh (
2988 " ( (gui_history->{defaults})->{_sunix_prog_group_href})->{$sub2_key}: $sub2_key= $ans\n"
2989 );
2990 }
2991 else {
2992 print $fh (
2993 " ( (gui_history->{defaults})->{_sunix_prog_group_href})->{$sub2_key}: $sub2_key= nada\n"
2994 );
2995  
2996 # print(" gui_history-, view, ans is not available \n");
2997 }
2998 }
2999 }
3000 if ( ( $gui_history->get_defaults() )
3001 ->{_sunix_prog_group_click_seq_href} )
3002 {
3003  
3004 # print additional subset: _sunix_prog_group_click_seq_href
3005 $key_hash_ref = ( $gui_history->{defaults} )
3006 ->{_sunix_prog_group_click_seq_href};
3007  
3008 # print("gui_history, view, key_hash_ref = $key_hash_ref \n");
3009 foreach my $sub2_key ( sort keys %{$key_hash_ref} ) {
3010  
3011 my $ans = $key_hash_ref->{$sub2_key};
3012 if ( defined $ans and $ans ne $empty_string ) {
3013  
3014 # print(" key_hash_ref->{$sub2_key}: $sub2_key= $ans\n");
3015 print $fh (
3016 " ( (gui_history->{defaults})->{_sunix_prog_group_click_seq_href})->{$sub2_key}: $sub2_key= $ans\n"
3017 );
3018 }
3019 else {
3020 print $fh (
3021 " ( (gui_history->{defaults})->{_sunix_prog_group_click_seq_href})->{$sub2_key}: $sub2_key= nada\n"
3022 );
3023  
3024 # print(" gui_history-, view, ans is not available \n");
3025 }
3026 }
3027 }
3028 if ( ( $gui_history->get_defaults() )
3029 ->{_superflow_select_button_click_seq_href} )
3030 {
3031  
3032 # print additional subset: _superflow_select_button_click_seq_href
3033 $key_hash_ref = ( $gui_history->{defaults} )
3034 ->{_superflow_select_button_click_seq_href};
3035  
3036 # print("gui_history, view, key_hash_ref = $key_hash_ref \n");
3037 foreach my $sub2_key ( sort keys %{$key_hash_ref} ) {
3038  
3039 my $ans = $key_hash_ref->{$sub2_key};
3040 if ( defined $ans and $ans ne $empty_string ) {
3041  
3042 # print(" key_hash_ref->{$sub2_key}: $sub2_key= $ans\n");
3043 print $fh (
3044 " ( (gui_history->{defaults})->{_superflow_select_button_click_seq_href})->{$sub2_key}: $sub2_key= $ans\n"
3045 );
3046 }
3047 else {
3048 print $fh (
3049 " ( (gui_history->{defaults})->{_superflow_select_button_click_seq_href})->{$sub2_key}: $sub2_key= nada\n"
3050 );
3051  
3052 # print(" gui_history-, view, ans is not available \n");
3053 }
3054 }
3055 }
3056 if ( ( $gui_history->get_defaults() )->{_superflow_tool_href} ) {
3057  
3058 # print additional subset: _superflow_tool_href
3059 $key_hash_ref =
3060 ( $gui_history->{defaults} )->{_superflow_tool_href};
3061  
3062 # print("gui_history, view, key_hash_ref = $key_hash_ref \n");
3063 foreach my $sub2_key ( sort keys %{$key_hash_ref} ) {
3064  
3065 my $ans = $key_hash_ref->{$sub2_key};
3066 if ( defined $ans and $ans ne $empty_string ) {
3067  
3068 # print(" key_hash_ref->{$sub2_key}: $sub2_key= $ans\n");
3069 print $fh (
3070 " ( (gui_history->{defaults})->{_superflow_tool_href})->{$sub2_key}: $sub2_key= $ans\n"
3071 );
3072 }
3073 else {
3074 print $fh (
3075 " ( (gui_history->{defaults})->{_superflow_tool_href})->{$sub2_key}: $sub2_key= nada\n"
3076 );
3077  
3078 # print(" gui_history-, view, ans is not available \n");
3079 }
3080 }
3081 }
3082  
3083 if ( ( $gui_history->get_defaults() )
3084 ->{_wipe_plots_button_click_seq_href} )
3085 {
3086  
3087 # print additional subsets: _wipe_plots_button
3088 $key_hash_ref = ( $gui_history->get_defaults() )
3089 ->{_wipe_plots_button_click_seq_href};
3090  
3091 # print("gui_history, view, key_hash_ref = $key_hash_ref \n");
3092 foreach my $sub2_key ( sort keys %{$key_hash_ref} ) {
3093  
3094 my $ans = $key_hash_ref->{$sub2_key};
3095  
3096 if ( defined $ans and $ans ne $empty_string ) {
3097  
3098 # print(" key_hash_ref->{$sub2_key}: $sub2_key= $ans\n");
3099 print $fh (
3100 " ( (gui_history->get_defaults() )->{_wipe_plots_button_click_seq_href})->{$sub2_key}: $sub2_key= $ans\n"
3101 );
3102 }
3103 else {
3104 print $fh (
3105 " ( (gui_history->get_defaults() )->{_wipe_plots_button_click_seq_href})->{$sub2_key}: $sub2_key= nada\n"
3106 );
3107  
3108 # print(" gui_history-, view, ans is not available \n");
3109 }
3110 }
3111 }
3112  
3113 }
3114 else {
3115  
3116 # print $fh (" \nNow, print the attribute values, BUT they can not be pritned directly\n");
3117 # print $fh (" 1.gui_history->{$key} = $gui_history->{$key}\n");
3118 #
3119 # # print (" 1.gui_history->{$key} = $gui_history->{$key}\n");
3120 # my $ans = ( $gui_history->get_defaults() )->{_count};
3121 # print $fh (" 2.gui_history->get_count() = $ans\n");
3122 # print $fh (" 3.gui_history->get_count() = $gui_history->{_count}\n");
3123 #
3124 # # print (" 3.gui_history->get_count() = $gui_history->{_count}\n");
3125 }
3126  
3127 }
3128 close($fh);
3129 }
3130  
3131 # end sub view
3132  
3133 __PACKAGE__->meta->make_immutable;
3134 1;