« lib/App/SeismicUnixGui/sunix/model/sufdmod1.pm
↑ Summary
lib/App/SeismicUnixGui/sunix/shapeNcut/suwind.pm »
| 1 | package App::SeismicUnixGui::misc::decisions; | ||
| 2 | |||
| 3 | =head1 DOCUMENTATION | ||
| 4 | |||
| 5 | |||
| 6 | =head2 SYNOPSIS | ||
| 7 | |||
| 8 | PERL PERL PROGRAM NAME: decisions.pm | ||
| 9 | AUTHOR: Juan Lorenzo | ||
| 10 | DATE: June 22 2017 | ||
| 11 | |||
| 12 | DESCRIPTION | ||
| 13 | |||
| 14 | |||
| 15 | BASED ON: | ||
| 16 | Version 0.1 April 18 2017 | ||
| 17 | Added a simple configuration file readable | ||
| 18 | flow | ||
| 19 | and writable using Config::Simple (CPAN) | ||
| 20 | |||
| 21 | Version 0.2 | ||
| 22 | incorporate more object oriented classes | ||
| 23 | |||
| 24 | TODO: Simple (ASCII) local configuration | ||
| 25 | file is Project_Variables.config | ||
| 26 | |||
| 27 | =cut | ||
| 28 | |||
| 29 | =head2 USE | ||
| 30 | |||
| 31 | =head3 NOTES | ||
| 32 | only sets values internally | ||
| 33 | does not modify values that are used outside the package | ||
| 34 | used to confirm the suitablility of conditions | ||
| 35 | before proceeding. | ||
| 36 | |||
| 37 | |||
| 38 | =head4 Examples | ||
| 39 | |||
| 40 | |||
| 41 | =head2 CHANGES and their DATES | ||
| 42 | |||
| 43 | =cut | ||
| 44 | |||
| 45 | =head2 Notes from bash | ||
| 46 | |||
| 47 | =cut | ||
| 48 | |||
| 49 | use Moose; | ||
| 50 | our $VERSION = '1.0.0'; | ||
| 51 | |||
| 52 | =head2 inheritance | ||
| 53 | |||
| 54 | =cut | ||
| 55 | |||
| 56 | extends 'App::SeismicUnixGui::misc::gui_history' => { -version => 0.0.2 }; | ||
| 57 | use aliased 'App::SeismicUnixGui::misc::gui_history'; | ||
| 58 | |||
| 59 | =head2 Import modules | ||
| 60 | |||
| 61 | =cut | ||
| 62 | |||
| 63 | use aliased 'App::SeismicUnixGui::misc::L_SU_global_constants'; | ||
| 64 | |||
| 65 | =head2 Instantiation | ||
| 66 | |||
| 67 | =cut | ||
| 68 | |||
| 69 | my $get = L_SU_global_constants->new(); | ||
| 70 | my $gui_history = gui_history->new(); | ||
| 71 | |||
| 72 | =head Local variables | ||
| 73 | |||
| 74 | =cut | ||
| 75 | |||
| 76 | my $flow_type = $get->flow_type_href(); | ||
| 77 | |||
| 78 | # holds gui_history | ||
| 79 | my $decisions_href; | ||
| 80 | my $var = $get->var(); | ||
| 81 | my $empty_string = $var->{_empty_string}; | ||
| 82 | my $true = $var->{_true}; | ||
| 83 | my $false = $var->{_false}; | ||
| 84 | |||
| 85 | =head2 private hash | ||
| 86 | |||
| 87 | 27 | ||
| 88 | |||
| 89 | =cut | ||
| 90 | |||
| 91 | my $decisions = { | ||
| 92 | |||
| 93 | _has_used_SaveAs_button => $false, | ||
| 94 | _has_used_Save_button => $false, | ||
| 95 | _has_used_Save_superflow => $false, | ||
| 96 | _has_used_open_perl_file_button => $false, | ||
| 97 | _is_Delete_file_button => $false, | ||
| 98 | _is_delete_from_flow_button => $false, | ||
| 99 | _is_delete_whole_flow_button => $false, | ||
| 100 | _is_flow_listbox_grey_w => $false, | ||
| 101 | _is_flow_listbox_pink_w => $false, | ||
| 102 | _is_flow_listbox_green_w => $false, | ||
| 103 | _is_flow_listbox_blue_w => $false, | ||
| 104 | _is_last_flow_index_touched => $false, | ||
| 105 | _is_last_flow_index_touched_grey => $false, | ||
| 106 | _is_last_flow_index_touched_pink => $false, | ||
| 107 | _is_last_flow_index_touched_green => $false, | ||
| 108 | _is_last_flow_index_touched_blue => $false, | ||
| 109 | _is_last_parameter_index_touched_grey => $false, | ||
| 110 | _is_last_parameter_index_touched_pink => $false, | ||
| 111 | _is_last_parameter_index_touched_green => $false, | ||
| 112 | _is_last_parameter_index_touched_blue => $false, | ||
| 113 | _is_last_parameter_index_touched_color => $false, | ||
| 114 | _is_last_path_touched => $false, | ||
| 115 | _is_neutral_flow => $false, | ||
| 116 | _is_open_file_button => $false, | ||
| 117 | _is_SaveAs_file_button => $false, | ||
| 118 | _is_select_file_button => $false, | ||
| 119 | _is_pre_built_superflow => $false, | ||
| 120 | _is_run_select_button => $false, | ||
| 121 | _is_prog_name => $false, | ||
| 122 | _is_user_built_flow => $false, | ||
| 123 | |||
| 124 | }; | ||
| 125 | |||
| 126 | =head2 sub reset | ||
| 127 | |||
| 128 | |||
| 129 | =cut | ||
| 130 | |||
| 131 | sub reset { | ||
| 132 | my ($self) = @_; | ||
| 133 | |||
| 134 | $decisions = { | ||
| 135 | |||
| 136 | _has_used_SaveAs_button => $false, | ||
| 137 | _has_used_Save_button => $false, | ||
| 138 | _has_used_Save_superflow => $false, | ||
| 139 | _has_used_open_perl_file_button => $false, | ||
| 140 | _is_Delete_file_button => $false, | ||
| 141 | _is_delete_from_flow_button => $false, | ||
| 142 | _is_delete_whole_flow_button => $false, | ||
| 143 | _is_flow_listbox_grey_w => $false, | ||
| 144 | _is_flow_listbox_pink_w => $false, | ||
| 145 | _is_flow_listbox_green_w => $false, | ||
| 146 | _is_flow_listbox_blue_w => $false, | ||
| 147 | _is_last_flow_index_touched_grey => $false, | ||
| 148 | _is_last_flow_index_touched_pink => $false, | ||
| 149 | _is_last_flow_index_touched_green => $false, | ||
| 150 | _is_last_flow_index_touched_blue => $false, | ||
| 151 | _is_last_parameter_index_touched_grey => $false, | ||
| 152 | _is_last_parameter_index_touched_pink => $false, | ||
| 153 | _is_last_parameter_index_touched_green => $false, | ||
| 154 | _is_last_parameter_index_touched_blue => $false, | ||
| 155 | _is_last_flow_index_touched => $false, | ||
| 156 | _is_last_parameter_index_touched_color => $false, | ||
| 157 | _is_last_path_touched => $false, | ||
| 158 | _is_neutral_flow => $false, | ||
| 159 | _is_open_file_button => $false, | ||
| 160 | _is_SaveAs_file_button => $false, | ||
| 161 | _is_select_file_button => $false, | ||
| 162 | _is_pre_built_superflow => $false, | ||
| 163 | _is_run_select_button => $false, | ||
| 164 | _is_prog_name => $false, | ||
| 165 | _is_user_built_flow => $false, | ||
| 166 | |||
| 167 | }; | ||
| 168 | } | ||
| 169 | |||
| 170 | =head2 sub _reset | ||
| 171 | |||
| 172 | |||
| 173 | =cut | ||
| 174 | |||
| 175 | sub _reset { | ||
| 176 | my ($self) = @_; | ||
| 177 | |||
| 178 | $decisions = { | ||
| 179 | |||
| 180 | _has_used_SaveAs_button => $false, | ||
| 181 | _has_used_Save_button => $false, | ||
| 182 | _has_used_Save_superflow => $false, | ||
| 183 | _has_used_open_perl_file_button => $false, | ||
| 184 | _is_Delete_file_button => $false, | ||
| 185 | _is_delete_from_flow_button => $false, | ||
| 186 | _is_delete_whole_flow_button => $false, | ||
| 187 | _is_flow_listbox_grey_w => $false, | ||
| 188 | _is_flow_listbox_pink_w => $false, | ||
| 189 | _is_flow_listbox_green_w => $false, | ||
| 190 | _is_flow_listbox_blue_w => $false, | ||
| 191 | _is_last_flow_index_touched => $false, | ||
| 192 | _is_last_flow_index_touched_grey => $false, | ||
| 193 | _is_last_flow_index_touched_pink => $false, | ||
| 194 | _is_last_flow_index_touched_green => $false, | ||
| 195 | _is_last_flow_index_touched_blue => $false, | ||
| 196 | _is_last_parameter_index_touched_grey => $false, | ||
| 197 | _is_last_parameter_index_touched_pink => $false, | ||
| 198 | _is_last_parameter_index_touched_green => $false, | ||
| 199 | _is_last_parameter_index_touched_blue => $false, | ||
| 200 | _is_last_parameter_index_touched_color => $false, | ||
| 201 | _is_last_path_touched => $false, | ||
| 202 | _is_open_file_button => $false, | ||
| 203 | _is_SaveAs_file_button => $false, | ||
| 204 | _is_select_file_button => $false, | ||
| 205 | _is_pre_built_superflow => $false, | ||
| 206 | _is_run_select_button => $false, | ||
| 207 | _is_prog_name => $false, | ||
| 208 | _is_user_built_flow => $false, | ||
| 209 | |||
| 210 | }; | ||
| 211 | |||
| 212 | } | ||
| 213 | |||
| 214 | =head2 sub get4_FileDialog_Delete | ||
| 215 | |||
| 216 | |||
| 217 | =cut | ||
| 218 | |||
| 219 | sub get4FileDialog_Delete { | ||
| 220 | my ( $self, $hash_ref ) = @_; | ||
| 221 | |||
| 222 | if ( | ||
| 223 | ( | ||
| 224 | $decisions->{_is_flow_listbox_grey_w} | ||
| 225 | || $decisions->{_is_flow_listbox_pink_w} | ||
| 226 | || $decisions->{_is_flow_listbox_green_w} | ||
| 227 | || $decisions->{_is_flow_listbox_blue_w} | ||
| 228 | && $decisions->{_is_Delete_file_button} | ||
| 229 | ) | ||
| 230 | or ( $decisions->{_is_neutral_flow} | ||
| 231 | && $decisions->{_is_Delete_file_button} ) | ||
| 232 | ) | ||
| 233 | { | ||
| 234 | return ($true); | ||
| 235 | } | ||
| 236 | else { | ||
| 237 | print( | ||
| 238 | "decisions,get4FileDialog_Delete,grey: $decisions->{_is_flow_listbox_grey_w}, and pink listbox: $decisions->{_is_flow_listbox_pink_w}\n" | ||
| 239 | ); | ||
| 240 | print( | ||
| 241 | "decisions,get4FileDialog_Delete,green: $decisions->{_is_flow_listbox_green_w}, and blue listbox: $decisions->{_is_flow_listbox_blue_w}\n" | ||
| 242 | ); | ||
| 243 | print( | ||
| 244 | "decisions,get4FileDialog_Delete: decisions->{_is_Delete_file_button}: $decisions->{_is_Delete_file_button}\n" | ||
| 245 | ); | ||
| 246 | return ($false); | ||
| 247 | } | ||
| 248 | } | ||
| 249 | |||
| 250 | =head2 sub get4_FileDialog_select | ||
| 251 | |||
| 252 | |||
| 253 | =cut | ||
| 254 | |||
| 255 | sub get4FileDialog_select { | ||
| 256 | my ( $self, $hash_ref ) = @_; | ||
| 257 | |||
| 258 | # print ("decisions,get4FileDialog_select,grey: $decisions->{_is_flow_listbox_grey_w}, and pink listbox: $decisions->{_is_flow_listbox_pink_w}\n"); | ||
| 259 | # print ("decisions,get4FileDialog_select,green: $decisions->{_is_flow_listbox_green_w}, and blue listbox: $decisions->{_is_flow_listbox_blue_w}\n"); | ||
| 260 | # print ("decisions,get4FileDialog_select,left: decisions->{_is_last_path_touched}: $decisions->{_is_last_path_touched}\n"); | ||
| 261 | # print ("decisions,get4FileDialog_select,left: decisions->{_is_pre_built_superflow}: $decisions->{_is_selected_file_name}\n"); | ||
| 262 | # print ("decisions,get4FileDialog_select,left: decisions->{_is_pre_built_superflow}: $decisions->{_is_selected_path}\n"); | ||
| 263 | |||
| 264 | if ( | ||
| 265 | ( | ||
| 266 | $decisions->{_is_flow_listbox_grey_w} | ||
| 267 | || $decisions->{_is_flow_listbox_pink_w} | ||
| 268 | || $decisions->{_is_flow_listbox_green_w} | ||
| 269 | || $decisions->{_is_flow_listbox_blue_w} | ||
| 270 | || $decisions->{_is_pre_built_superflow} | ||
| 271 | || $decisions->{_is_last_path_touched} | ||
| 272 | ) | ||
| 273 | && ( $decisions->{_is_selected_file_name} | ||
| 274 | || $decisions->{_is_selected_path} | ||
| 275 | ) # for data file name, not pl file name | ||
| 276 | |||
| 277 | ) | ||
| 278 | { | ||
| 279 | return ($true); | ||
| 280 | } | ||
| 281 | else { | ||
| 282 | return ($false); | ||
| 283 | } | ||
| 284 | } | ||
| 285 | |||
| 286 | =head2 sub get4FileDialog_open_perl | ||
| 287 | |||
| 288 | =cut | ||
| 289 | |||
| 290 | sub get4FileDialog_open_perl { | ||
| 291 | my ($self) = @_; | ||
| 292 | |||
| 293 | if ( | ||
| 294 | $decisions->{_is_open_file_button} | ||
| 295 | || $decisions->{_is_selected_file_name} | ||
| 296 | || !( $decisions->{_is_selected_path} | ||
| 297 | ) # for data file name, not pl file name | ||
| 298 | ) | ||
| 299 | { | ||
| 300 | return ($true); | ||
| 301 | } | ||
| 302 | else { | ||
| 303 | return ($false); | ||
| 304 | } | ||
| 305 | |||
| 306 | # if ( $decisions->{_is_flow_listbox_grey_w} | ||
| 307 | # || $decisions->{_is_flow_listbox_pink_w} | ||
| 308 | # || $decisions->{_is_flow_listbox_green_w} | ||
| 309 | # || $decisions->{_is_flow_listbox_blue_w} | ||
| 310 | # || $decisions->{_is_pre_built_superflow} | ||
| 311 | # || $decisions->{_is_selected_file_name} | ||
| 312 | # || !( | ||
| 313 | # $decisions->{_is_selected_path} ) # for data file name, not pl file name | ||
| 314 | # ) | ||
| 315 | # { | ||
| 316 | # return ($true); | ||
| 317 | # } | ||
| 318 | # else { | ||
| 319 | # if ( $decisions->{_is_open_file_button} ) { | ||
| 320 | # return ($true); | ||
| 321 | # } | ||
| 322 | # } | ||
| 323 | } | ||
| 324 | |||
| 325 | =head2 sub get4_FileDialog_SaveAs | ||
| 326 | |||
| 327 | |||
| 328 | =cut | ||
| 329 | |||
| 330 | sub get4FileDialog_SaveAs { | ||
| 331 | my ($self) = @_; | ||
| 332 | |||
| 333 | # can not save a pre-built superflows under arbitrary name | ||
| 334 | if ( $decisions->{_is_pre_built_superflow} ) { | ||
| 335 | return ($false); | ||
| 336 | |||
| 337 | } | ||
| 338 | elsif ( | ||
| 339 | ( | ||
| 340 | $decisions->{_is_flow_listbox_grey_w} | ||
| 341 | || $decisions->{_is_flow_listbox_pink_w} | ||
| 342 | || $decisions->{_is_flow_listbox_green_w} | ||
| 343 | || $decisions->{_is_flow_listbox_blue_w} | ||
| 344 | || $decisions->{_is_flow_listbox_color_w} | ||
| 345 | ) | ||
| 346 | && $decisions->{_is_SaveAs_file_button} | ||
| 347 | ) | ||
| 348 | { | ||
| 349 | # print("decisions,get4FileDialog_SaveAs: $true\n"); | ||
| 350 | |||
| 351 | # print("decisions: \n | ||
| 352 | # _is_flow_listbox_grey_ = $decisions->{_is_flow_listbox_grey_w}\n | ||
| 353 | # _is_flow_listbox_pink_w = $decisions->{_is_flow_listbox_pink_w}\n | ||
| 354 | # _is_flow_listbox_green_w = $decisions->{_is_flow_listbox_green_w}\n | ||
| 355 | # _is_flow_listbox_blue_w = $decisions->{_is_flow_listbox_blue_w}\n | ||
| 356 | # _is_flow_listbox_color_w = $decisions->{_is_flow_listbox_color_w}\n | ||
| 357 | # _is_SaveAs_file_button = $decisions->{_is_SaveAs_file_button}\n"); | ||
| 358 | return ($true); | ||
| 359 | |||
| 360 | } | ||
| 361 | else { | ||
| 362 | print("decisions,get4FileDialog_SaveAs,exception to rules \n"); | ||
| 363 | } | ||
| 364 | |||
| 365 | return (0); | ||
| 366 | } | ||
| 367 | |||
| 368 | =head2 sub get4flow_select | ||
| 369 | OK if we are selecting a user-built flow box | ||
| 370 | |||
| 371 | |||
| 372 | =cut | ||
| 373 | |||
| 374 | sub get4flow_select { | ||
| 375 | my ($self) = @_; | ||
| 376 | |||
| 377 | my $result; | ||
| 378 | |||
| 379 | # print("decisions, get4flow_select, write gui_history.txt\n"); | ||
| 380 | # $gui_history->view(); | ||
| 381 | |||
| 382 | my $most_recent_flow_type = | ||
| 383 | ( ( $gui_history->get_defaults() )->{_flow_type_href} )->{_most_recent}; | ||
| 384 | |||
| 385 | if ( $most_recent_flow_type eq $flow_type->{_user_built} ) { | ||
| 386 | |||
| 387 | # print( | ||
| 388 | # "decisions get4flow_select, prior_flow_type = $most_recent_flow_type \n" | ||
| 389 | # ); | ||
| 390 | |||
| 391 | $result = $true; | ||
| 392 | |||
| 393 | } | ||
| 394 | elsif ( $most_recent_flow_type eq $flow_type->{_pre_built_superflow} ) { | ||
| 395 | |||
| 396 | $result = $false; | ||
| 397 | } | ||
| 398 | else { | ||
| 399 | print( | ||
| 400 | "decisions, get4flow_select, most_recent_flow_type is unknown \n"); | ||
| 401 | } | ||
| 402 | |||
| 403 | return ($result); | ||
| 404 | |||
| 405 | } | ||
| 406 | |||
| 407 | #=head2 sub get4flow_select | ||
| 408 | # | ||
| 409 | # | ||
| 410 | #=cut | ||
| 411 | # | ||
| 412 | #sub get4flow_select { | ||
| 413 | # my ($self) = @_; | ||
| 414 | # my @state; | ||
| 415 | # | ||
| 416 | # $state[0] = $decisions->{_is_flow_listbox_grey_w}; | ||
| 417 | # $state[1] = $decisions->{_is_flow_listbox_pink_w}; | ||
| 418 | # $state[2] = $decisions->{_is_flow_listbox_green_w}; | ||
| 419 | # $state[3] = $decisions->{_is_flow_listbox_blue_w}; | ||
| 420 | # | ||
| 421 | # #$state[4] = $decisions->{_is_last_flow_index_touched}; | ||
| 422 | # #$state[5] = $decisions->{_is_last_parameter_index_touched_color}; | ||
| 423 | # # $state[12] = $decisions->{_is_prog_name}; | ||
| 424 | # | ||
| 425 | # $state[4] = $decisions->{_is_last_flow_index_touched_grey}; | ||
| 426 | # $state[5] = $decisions->{_is_last_flow_index_touched_pink}; | ||
| 427 | # $state[6] = $decisions->{_is_last_flow_index_touched_green}; | ||
| 428 | # $state[7] = $decisions->{_is_last_flow_index_touched_blue}; | ||
| 429 | # | ||
| 430 | # $state[8] = $decisions->{_is_last_parameter_index_touched_grey}; | ||
| 431 | # $state[9] = $decisions->{_is_last_parameter_index_touched_pink}; | ||
| 432 | # $state[10] = $decisions->{_is_last_parameter_index_touched_green}; | ||
| 433 | # $state[11] = $decisions->{_is_last_parameter_index_touched_blue}; | ||
| 434 | # | ||
| 435 | # my $condition1 = ( $state[0] || $state[1] || $state[2] || $state[3] ); | ||
| 436 | # my $condition2 = ( $state[4] || $state[5] || $state[6] || $state[7] ); | ||
| 437 | # my $condition3 = ( $state[8] || $state[9] || $state[10] || $state[11] ); | ||
| 438 | # | ||
| 439 | # if ( $condition1 && $condition2 && $condition3 && $state[12] ) { | ||
| 440 | # | ||
| 441 | ## if ( ($state[0] || $state[1] || $state[2] || $state[3]) && | ||
| 442 | ## ($state[4] && $state[5] && $state[12]) ) { | ||
| 443 | # print(" decisions,get4flow_select, state is true: $true\n"); | ||
| 444 | ## print(" decisions,get4flow_select, TRUE states: | ||
| 445 | ## 0:$state[0],1:$state[1],02:$state[2],3:$state[3] | ||
| 446 | ## ,4:$state[4],05:$state[5],06:$state[6],07:$state[7],08:$state[8],09:$state[9], | ||
| 447 | ## 10:$state[10],11:$state[11],12:$state[12]\n"); | ||
| 448 | # | ||
| 449 | # return ($true); | ||
| 450 | # | ||
| 451 | # } | ||
| 452 | # else { | ||
| 453 | # print("decisions,get4flow_select, state is false: $false\n"); | ||
| 454 | # print(" decisions,get4flow_select, FALSE states: | ||
| 455 | # 0:$state[0],1:$state[1],02:$state[2],3:$state[3] | ||
| 456 | # ,4:$state[4],05:$state[5],06:$state[6],07:$state[7],08:$state[8],09:$state[9], | ||
| 457 | # 10:$state[10],11:$state[11],12:$state[12]\n"); | ||
| 458 | # return ($false); | ||
| 459 | # } | ||
| 460 | #} | ||
| 461 | |||
| 462 | =head2 sub get4delete_from_flow_button | ||
| 463 | |||
| 464 | foreach my $key (sort keys %$decisions) { | ||
| 465 | print ("decisions,get4delete_from_flow_button4,key is $key, value is $decisions->{$key}\n"); | ||
| 466 | } | ||
| 467 | |||
| 468 | =cut | ||
| 469 | |||
| 470 | sub get4delete_from_flow_button { | ||
| 471 | my ($self) = @_; | ||
| 472 | my @state; | ||
| 473 | |||
| 474 | $state[1] = $decisions->{_is_flow_listbox_grey_w}; | ||
| 475 | $state[2] = $decisions->{_is_flow_listbox_pink_w}; | ||
| 476 | $state[3] = $decisions->{_is_flow_listbox_green_w}; | ||
| 477 | $state[4] = $decisions->{_is_flow_listbox_blue_w}; | ||
| 478 | $state[5] = $decisions->{_is_flow_listbox_color_w}; | ||
| 479 | $state[6] = $decisions->{_is_delete_from_flow_button}; | ||
| 480 | |||
| 481 | if ( ( $state[1] || $state[2] || $state[3] || $state[4] || $state[5] ) | ||
| 482 | && $state[6] ) | ||
| 483 | { | ||
| 484 | # print(" decisions,get4delete_from_flow_button, state is $true\n"); | ||
| 485 | return ($true); | ||
| 486 | } | ||
| 487 | else { | ||
| 488 | print(" decisions,get4delete_from_flow_button, state is $false\n"); | ||
| 489 | return ($false); | ||
| 490 | } | ||
| 491 | } | ||
| 492 | |||
| 493 | =head2 sub get4delete_whole_flow_button | ||
| 494 | |||
| 495 | =cut | ||
| 496 | |||
| 497 | sub get4delete_whole_flow_button { | ||
| 498 | my ($self) = @_; | ||
| 499 | my @state; | ||
| 500 | |||
| 501 | $state[1] = $decisions->{_is_flow_listbox_grey_w}; | ||
| 502 | $state[2] = $decisions->{_is_flow_listbox_pink_w}; | ||
| 503 | $state[3] = $decisions->{_is_flow_listbox_green_w}; | ||
| 504 | $state[4] = $decisions->{_is_flow_listbox_blue_w}; | ||
| 505 | $state[5] = $decisions->{_is_flow_listbox_color_w}; | ||
| 506 | $state[6] = $decisions->{_is_delete_whole_flow_button}; | ||
| 507 | |||
| 508 | if ( ( $state[1] || $state[2] || $state[3] || $state[4] || $state[5] ) | ||
| 509 | && $state[6] ) | ||
| 510 | { | ||
| 511 | # print(" decisions,get4delete_whole_flow_button, state is $true\n"); | ||
| 512 | return ($true); | ||
| 513 | } | ||
| 514 | else { | ||
| 515 | print(" decisions,get4delete_whole_flow_button, state is $false\n"); | ||
| 516 | print( | ||
| 517 | " decisions,get4delete_whole_flow_button, \n | ||
| 518 | state[1]=$state[1],state[2]=$state[2],state[3]=$state[3]],state[4]=$state[4]\n | ||
| 519 | ],state[5]=$state[5],state[6]=$state[6]\n" | ||
| 520 | ); | ||
| 521 | return ($false); | ||
| 522 | } | ||
| 523 | } | ||
| 524 | |||
| 525 | =head2 sub get4help | ||
| 526 | |||
| 527 | |||
| 528 | =cut | ||
| 529 | |||
| 530 | sub get4help { | ||
| 531 | my ($self) = @_; | ||
| 532 | my @state; | ||
| 533 | |||
| 534 | $state[0] = $decisions->{_is_flow_listbox_grey_w}; | ||
| 535 | $state[1] = $decisions->{_is_flow_listbox_pink_w}; | ||
| 536 | $state[2] = $decisions->{_is_flow_listbox_green_w}; | ||
| 537 | $state[3] = $decisions->{_is_flow_listbox_blue_w}; | ||
| 538 | |||
| 539 | $state[4] = $decisions->{_is_last_flow_index_touched_grey}; | ||
| 540 | $state[5] = $decisions->{_is_last_flow_index_touched_pink}; | ||
| 541 | $state[6] = $decisions->{_is_last_flow_index_touched_green}; | ||
| 542 | $state[7] = $decisions->{_is_last_flow_index_touched_blue}; | ||
| 543 | |||
| 544 | $state[8] = $decisions->{_is_last_parameter_index_touched_grey}; | ||
| 545 | $state[9] = $decisions->{_is_last_parameter_index_touched_pink}; | ||
| 546 | $state[10] = $decisions->{_is_last_parameter_index_touched_green}; | ||
| 547 | $state[11] = $decisions->{_is_last_parameter_index_touched_blue}; | ||
| 548 | |||
| 549 | $state[12] = $decisions->{_is_prog_name}; | ||
| 550 | |||
| 551 | $state[13] = $decisions->{_is_sunix_listbox}; | ||
| 552 | $state[14] = $decisions->{_is_pre_built_superflow}; | ||
| 553 | $state[15] = $decisions->{_is_sunix_listbox}; | ||
| 554 | |||
| 555 | # $state[4] = $decisions->{_is_last_flow_index_touched}; | ||
| 556 | # $state[5] = $decisions->{_is_last_parameter_index_touched_color}; | ||
| 557 | # $state[6] = $decisions->{_is_prog_name}; | ||
| 558 | # $state[7] = $decisions->{_is_sunix_listbox}; | ||
| 559 | # $state[8] = $decisions->{_is_pre_built_superflow}; | ||
| 560 | |||
| 561 | # print("decisions,get4help,states:$state[0],$state[1],$state[2],$state[3],$state[4],$state[5],$state[6],$state[7],$state[8]\n"); | ||
| 562 | # print("decisions,get4help,states:$state[9],$state[10],$state[11],$state[12],$state[13],$state[14],$state[15]\n"); | ||
| 563 | |||
| 564 | my $condition1 = ( $state[0] || $state[1] || $state[2] || $state[3] ); | ||
| 565 | my $condition2 = ( $state[4] || $state[5] || $state[6] || $state[7] ); | ||
| 566 | my $condition3 = ( $state[8] || $state[9] || $state[10] || $state[11] ); | ||
| 567 | my $condition4 = ( $condition2 && $condition3 && $state[12] ); | ||
| 568 | my $condition5 = $condition1 && $condition4; | ||
| 569 | |||
| 570 | # my $condition = ( ($state[0] || $state[1] || $state[2] || $state[3]) | ||
| 571 | # && ($state[4] && $state[5] && $state[6]) ); | ||
| 572 | |||
| 573 | if ( $condition5 || $state[13] || $state[14] || $state[15] ) { | ||
| 574 | |||
| 575 | # if ( $condition || $state[7] ||$state[8] ) { | ||
| 576 | # print(" decisions,get4help, state is true: $true\n"); | ||
| 577 | |||
| 578 | return ($true); | ||
| 579 | |||
| 580 | } | ||
| 581 | else { | ||
| 582 | # print("decisions,get4help, state is false: $false\n"); | ||
| 583 | print("decisions,get4help, state is false: $false\n"); | ||
| 584 | print( | ||
| 585 | " decisions,get4flow_select, states: | ||
| 586 | 0:$state[0],1:$state[1],02:$state[2],3:$state[3] | ||
| 587 | ,4:$state[4],05:$state[5],06:$state[6],07:$state[7] | ||
| 588 | ,8:$state[8],09:$state[9],10:$state[10],11:$state[11],12:$state[12] | ||
| 589 | ,13:$state[13],14:$state[14],15:$state[15]\n" | ||
| 590 | ); | ||
| 591 | |||
| 592 | return ($false); | ||
| 593 | } | ||
| 594 | } | ||
| 595 | |||
| 596 | =head2 sub get4run_select | ||
| 597 | |||
| 598 | |||
| 599 | =cut | ||
| 600 | |||
| 601 | sub get4run_select { | ||
| 602 | my ($self) = @_; | ||
| 603 | my @state; | ||
| 604 | $state[1] = $decisions->{_has_used_SaveAs_button}; | ||
| 605 | $state[2] = $decisions->{_has_used_Save_button}; | ||
| 606 | $state[3] = $decisions->{_has_used_Save_superflow}; | ||
| 607 | $state[4] = $decisions->{_has_used_open_perl_file_button}; | ||
| 608 | |||
| 609 | if ( $state[1] || $state[2] || $state[3] || $state[3] ) { | ||
| 610 | |||
| 611 | # print(" decisions,get4run_select, state is $true\n"); | ||
| 612 | return ($true); | ||
| 613 | } | ||
| 614 | else { | ||
| 615 | # print(" decisions,get4run_select, state is $false\n"); | ||
| 616 | return ($false); | ||
| 617 | } | ||
| 618 | } | ||
| 619 | |||
| 620 | =head2 sub set4_FileDialog_Delete | ||
| 621 | |||
| 622 | |||
| 623 | =cut | ||
| 624 | |||
| 625 | sub set4FileDialog_Delete { | ||
| 626 | my ( $self, $hash_ref ) = @_; | ||
| 627 | _reset(); | ||
| 628 | |||
| 629 | $decisions->{_is_Delete_file_button} = $hash_ref->{_is_Delete_file_button}; | ||
| 630 | $decisions->{_is_neutral_flow} = $hash_ref->{_is_neutral_flow}; | ||
| 631 | $decisions->{_is_flow_listbox_grey_w} = | ||
| 632 | $hash_ref->{_is_flow_listbox_grey_w}; | ||
| 633 | $decisions->{_is_flow_listbox_pink_w} = | ||
| 634 | $hash_ref->{_is_flow_listbox_pink_w}; | ||
| 635 | $decisions->{_is_flow_listbox_green_w} = | ||
| 636 | $hash_ref->{_is_flow_listbox_green_w}; | ||
| 637 | $decisions->{_is_flow_listbox_blue_w} = | ||
| 638 | $hash_ref->{_is_flow_listbox_blue_w}; | ||
| 639 | $decisions->{_is_pre_built_superflow} = | ||
| 640 | $hash_ref->{_is_pre_built_superflow}; | ||
| 641 | $decisions->{_is_user_built_superflow} = | ||
| 642 | $hash_ref->{_is_user_built_superflow}; | ||
| 643 | |||
| 644 | # print("decisions, set4FileDialog_Delete, decisions->{_is_Delete_file_button}: $decisions->{_is_Delete_file_button}\n"); | ||
| 645 | # print("decisions, set4FileDialog_Delete, decisions->{_is_flow_listbox_grey_w}: $decisions->{_is_flow_listbox_grey_w}\n"); | ||
| 646 | # print("decisions, set4FileDialog_Delete, decisions->{_is_flow_listbox_green_w}: $decisions->{_is_flow_listbox_green_w} \n"); | ||
| 647 | # print("decisions, set4FileDialog_Delete, decisions->{_is_pre_built_superflow}: $decisions->{_is_pre_built_superflow}\n"); | ||
| 648 | # print("decisions, set4FileDialog_Delete, decisions->{_is_user_built_flow}: $decisions->{_is_user_built_flow}\n"); | ||
| 649 | |||
| 650 | return ($empty_string); | ||
| 651 | |||
| 652 | } | ||
| 653 | |||
| 654 | =head2 sub set4_FileDialog_select | ||
| 655 | |||
| 656 | my $selected_file_name = $hash_ref->{_selected_file_name}; | ||
| 657 | print("decisions,selected_file_name:$selected_file_name\n"); | ||
| 658 | |||
| 659 | if ( $selected_file_name ne '') { | ||
| 660 | $decisions->{_is_selected_file_name} = $true; | ||
| 661 | } | ||
| 662 | |||
| 663 | =cut | ||
| 664 | |||
| 665 | sub set4FileDialog_select { | ||
| 666 | my ( $self, $hash_ref ) = @_; | ||
| 667 | _reset(); | ||
| 668 | |||
| 669 | $decisions->{_is_flow_listbox_grey_w} = | ||
| 670 | $hash_ref->{_is_flow_listbox_grey_w}; | ||
| 671 | $decisions->{_is_flow_listbox_pink_w} = | ||
| 672 | $hash_ref->{_is_flow_listbox_pink_w}; | ||
| 673 | $decisions->{_is_flow_listbox_green_w} = | ||
| 674 | $hash_ref->{_is_flow_listbox_green_w}; | ||
| 675 | $decisions->{_is_flow_listbox_blue_w} = | ||
| 676 | $hash_ref->{_is_flow_listbox_blue_w}; | ||
| 677 | $decisions->{_is_flow_listbox_color_w} = | ||
| 678 | $hash_ref->{_is_flow_listbox_color_w}; | ||
| 679 | $decisions->{_is_pre_built_superflow} = | ||
| 680 | $hash_ref->{_is_pre_built_superflow}; | ||
| 681 | $decisions->{_is_selected_file_name} = $hash_ref->{_is_selected_file_name}; | ||
| 682 | $decisions->{_is_selected_path} = $hash_ref->{_is_selected_path}; | ||
| 683 | |||
| 684 | if ( $hash_ref->{_last_path_touched} ne '' ) { | ||
| 685 | $decisions->{_is_last_path_touched} = $true; | ||
| 686 | |||
| 687 | # print ("decisions, set4FileDialog_select,last_path_touched:$hash_ref->{_last_path_touched}\n"); | ||
| 688 | } | ||
| 689 | |||
| 690 | # print ("decisions, set4FileDialog_select,left and right listbox:$decisions->{_is_flow_listbox_grey_w} , $decisions->{_is_flow_listbox_green_w} superflow is $decisions->{_is_pre_built_superflow} selected_file_name= $decisions->{_is_selected_file_name}\n"); | ||
| 691 | |||
| 692 | return ($empty_string); | ||
| 693 | |||
| 694 | } | ||
| 695 | |||
| 696 | =head2 sub set4FileDialog_open_perl | ||
| 697 | |||
| 698 | =cut | ||
| 699 | |||
| 700 | sub set4FileDialog_open_perl { | ||
| 701 | my ( $self, $hash_ref ) = @_; | ||
| 702 | |||
| 703 | _reset(); | ||
| 704 | $decisions->{_is_open_file_button} = $hash_ref->{_is_open_file_button}; | ||
| 705 | $decisions->{_is_flow_listbox_grey_w} = | ||
| 706 | $hash_ref->{_is_flow_listbox_grey_w}; | ||
| 707 | $decisions->{_is_flow_listbox_pink_w} = | ||
| 708 | $hash_ref->{_is_flow_listbox_pink_w}; | ||
| 709 | $decisions->{_is_flow_listbox_green_w} = | ||
| 710 | $hash_ref->{_is_flow_listbox_green_w}; | ||
| 711 | $decisions->{_is_flow_listbox_blue_w} = | ||
| 712 | $hash_ref->{_is_flow_listbox_blue_w}; | ||
| 713 | |||
| 714 | # $decisions->{_is_pre_built_superflow} = | ||
| 715 | # $hash_ref->{_is_pre_built_superflow}; | ||
| 716 | $decisions->{_is_selected_file_name} = $hash_ref->{_is_selected_file_name}; | ||
| 717 | $decisions->{_is_selected_path} = $hash_ref->{_is_selected_path}; | ||
| 718 | |||
| 719 | # print("decisions, set4FileDialog_open_perl\n"); | ||
| 720 | # foreach my $key (sort keys %$decisions) { | ||
| 721 | # print (" decisions key is $key, value is $decisions->{$key}\n"); | ||
| 722 | # } | ||
| 723 | |||
| 724 | return ($empty_string); | ||
| 725 | |||
| 726 | } | ||
| 727 | |||
| 728 | =head2 sub set4_FileDialog_SaveAs | ||
| 729 | |||
| 730 | |||
| 731 | =cut | ||
| 732 | |||
| 733 | sub set4FileDialog_SaveAs { | ||
| 734 | my ( $self, $hash_ref ) = @_; | ||
| 735 | _reset(); | ||
| 736 | |||
| 737 | $decisions->{_is_SaveAs_file_button} = $hash_ref->{_is_SaveAs_file_button}; | ||
| 738 | $decisions->{_is_flow_listbox_grey_w} = | ||
| 739 | $hash_ref->{_is_flow_listbox_grey_w}; | ||
| 740 | $decisions->{_is_flow_listbox_pink_w} = | ||
| 741 | $hash_ref->{_is_flow_listbox_pink_w}; | ||
| 742 | $decisions->{_is_flow_listbox_green_w} = | ||
| 743 | $hash_ref->{_is_flow_listbox_green_w}; | ||
| 744 | $decisions->{_is_flow_listbox_blue_w} = | ||
| 745 | $hash_ref->{_is_flow_listbox_blue_w}; | ||
| 746 | $decisions->{_is_pre_built_superflow} = | ||
| 747 | $hash_ref->{_is_pre_built_superflow}; | ||
| 748 | $decisions->{_is_user_built_superflow} = | ||
| 749 | $hash_ref->{_is_user_built_superflow}; | ||
| 750 | |||
| 751 | # print("decisions, set4FileDialog_SaveAs, decisions->{_is_SaveAs_file_button}: $decisions->{_is_SaveAs_file_button}\n"); | ||
| 752 | # print("decisions, set4FileDialog_SaveAs, decisions->{_is_flow_listbox_grey_w}: $decisions->{_is_flow_listbox_grey_w}\n"); | ||
| 753 | # print("decisions, set4FileDialog_SaveAs, decisions->{_is_flow_listbox_green_w}: $decisions->{_is_flow_listbox_green_w} \n"); | ||
| 754 | # print("decisions, set4FileDialog_SaveAs, decisions->{_is_pre_built_superflow}: $decisions->{_is_pre_built_superflow}\n"); | ||
| 755 | # print("decisions, set4FileDialog_SaveAs, decisions->{_is_user_built_flow}: $decisions->{_is_user_built_flow}\n"); | ||
| 756 | |||
| 757 | return ($empty_string); | ||
| 758 | |||
| 759 | } | ||
| 760 | |||
| 761 | =head2 sub set4delete_from_flow_button | ||
| 762 | |||
| 763 | |||
| 764 | =cut | ||
| 765 | |||
| 766 | sub set4delete_from_flow_button { | ||
| 767 | my ( $self, $hash_ref ) = @_; | ||
| 768 | _reset(); | ||
| 769 | |||
| 770 | $decisions->{_is_flow_listbox_grey_w} = | ||
| 771 | $hash_ref->{_is_flow_listbox_grey_w}; | ||
| 772 | $decisions->{_is_flow_listbox_pink_w} = | ||
| 773 | $hash_ref->{_is_flow_listbox_pink_w}; | ||
| 774 | $decisions->{_is_flow_listbox_green_w} = | ||
| 775 | $hash_ref->{_is_flow_listbox_green_w}; | ||
| 776 | $decisions->{_is_flow_listbox_blue_w} = | ||
| 777 | $hash_ref->{_is_flow_listbox_blue_w}; | ||
| 778 | $decisions->{_is_flow_listbox_color_w} = | ||
| 779 | $hash_ref->{_is_flow_listbox_color_w}; | ||
| 780 | $decisions->{_is_delete_from_flow_button} = | ||
| 781 | $hash_ref->{_is_delete_from_flow_button}; | ||
| 782 | |||
| 783 | return ($empty_string); | ||
| 784 | } | ||
| 785 | |||
| 786 | =head2 sub set4delete_whole_flow_button | ||
| 787 | |||
| 788 | =cut | ||
| 789 | |||
| 790 | sub set4delete_whole_flow_button { | ||
| 791 | my ( $self, $hash_ref ) = @_; | ||
| 792 | _reset(); | ||
| 793 | |||
| 794 | $decisions->{_is_flow_listbox_grey_w} = | ||
| 795 | $hash_ref->{_is_flow_listbox_grey_w}; | ||
| 796 | $decisions->{_is_flow_listbox_pink_w} = | ||
| 797 | $hash_ref->{_is_flow_listbox_pink_w}; | ||
| 798 | $decisions->{_is_flow_listbox_green_w} = | ||
| 799 | $hash_ref->{_is_flow_listbox_green_w}; | ||
| 800 | $decisions->{_is_flow_listbox_blue_w} = | ||
| 801 | $hash_ref->{_is_flow_listbox_blue_w}; | ||
| 802 | $decisions->{_is_flow_listbox_color_w} = | ||
| 803 | $hash_ref->{_is_flow_listbox_color_w}; | ||
| 804 | $decisions->{_is_delete_whole_flow_button} = | ||
| 805 | $hash_ref->{_is_delete_whole_flow_button}; | ||
| 806 | |||
| 807 | return ($empty_string); | ||
| 808 | } | ||
| 809 | |||
| 810 | =head2 sub set4flow_select | ||
| 811 | Account for null prog_name case | ||
| 812 | |||
| 813 | =cut | ||
| 814 | |||
| 815 | sub set4flow_select { | ||
| 816 | my ( $self, $hash_ref ) = @_; | ||
| 817 | |||
| 818 | if ($hash_ref) { | ||
| 819 | |||
| 820 | $decisions->{_is_flow_listbox_grey_w} = | ||
| 821 | $hash_ref->{_is_flow_listbox_grey_w}; | ||
| 822 | $decisions->{_is_flow_listbox_pink_w} = | ||
| 823 | $hash_ref->{_is_flow_listbox_pink_w}; | ||
| 824 | $decisions->{_is_flow_listbox_green_w} = | ||
| 825 | $hash_ref->{_is_flow_listbox_green_w}; | ||
| 826 | $decisions->{_is_flow_listbox_blue_w} = | ||
| 827 | $hash_ref->{_is_flow_listbox_blue_w}; | ||
| 828 | $decisions->{_is_last_flow_index_touched} = | ||
| 829 | $hash_ref->{_is_last_flow_index_touched}; | ||
| 830 | $decisions->{_is_last_flow_index_touched_grey} = | ||
| 831 | $hash_ref->{_is_last_flow_index_touched_grey}; | ||
| 832 | $decisions->{_is_last_flow_index_touched_pink} = | ||
| 833 | $hash_ref->{_is_last_flow_index_touched_pink}; | ||
| 834 | $decisions->{_is_last_flow_index_touched_green} = | ||
| 835 | $hash_ref->{_is_last_flow_index_touched_green}; | ||
| 836 | $decisions->{_is_last_flow_index_touched_blue} = | ||
| 837 | $hash_ref->{_is_last_flow_index_touched_blue}; | ||
| 838 | $decisions->{_is_last_parameter_index_touched_grey} = | ||
| 839 | $hash_ref->{_is_last_parameter_index_touched_grey}; | ||
| 840 | $decisions->{_is_last_parameter_index_touched_pink} = | ||
| 841 | $hash_ref->{_is_last_parameter_index_touched_pink}; | ||
| 842 | $decisions->{_is_last_parameter_index_touched_green} = | ||
| 843 | $hash_ref->{_is_last_parameter_index_touched_green}; | ||
| 844 | $decisions->{_is_last_parameter_index_touched_blue} = | ||
| 845 | $hash_ref->{_is_last_parameter_index_touched_blue}; | ||
| 846 | $decisions->{_is_last_parameter_index_touched_color} = | ||
| 847 | $hash_ref->{_is_last_parameter_index_touched_color}; | ||
| 848 | |||
| 849 | if ( defined $hash_ref->{_prog_name_sref} ) | ||
| 850 | { # does it have *_spec.pm and regular *.pm | ||
| 851 | $decisions->{_is_prog_name} = $true; | ||
| 852 | } | ||
| 853 | else { | ||
| 854 | print( | ||
| 855 | "\n1. decisions, set4flow_select, program does not have spec.pm:---$decisions->{_is_prog_name}---\n" | ||
| 856 | ); | ||
| 857 | $decisions->{_is_prog_name} = $false; | ||
| 858 | } | ||
| 859 | |||
| 860 | # print("\n1. decisions, set4flow_select, program name is---$decisions->{_is_prog_name}---\n"); | ||
| 861 | # print(" decisions,set4flow_select, left and right listbox are $decisions->{_is_flow_listbox_grey_w}$decisions->{_is_flow_listbox_green_w}\n"); | ||
| 862 | } | ||
| 863 | |||
| 864 | return ($empty_string); | ||
| 865 | } | ||
| 866 | |||
| 867 | sub set_hash_ref { | ||
| 868 | my ( $self, $hash_ref ) = @_; | ||
| 869 | |||
| 870 | $gui_history->set_defaults($hash_ref); | ||
| 871 | $decisions_href = $gui_history->get_defaults(); | ||
| 872 | |||
| 873 | return ($empty_string); | ||
| 874 | } | ||
| 875 | |||
| 876 | =head2 sub set4help | ||
| 877 | |||
| 878 | |||
| 879 | =cut | ||
| 880 | |||
| 881 | sub set4help { | ||
| 882 | my ( $self, $hash_ref ) = @_; | ||
| 883 | |||
| 884 | if ($hash_ref) { | ||
| 885 | |||
| 886 | $decisions->{_is_flow_listbox_grey_w} = | ||
| 887 | $hash_ref->{_is_flow_listbox_grey_w}; | ||
| 888 | $decisions->{_is_flow_listbox_pink_w} = | ||
| 889 | $hash_ref->{_is_flow_listbox_pink_w}; | ||
| 890 | $decisions->{_is_flow_listbox_green_w} = | ||
| 891 | $hash_ref->{_is_flow_listbox_green_w}; | ||
| 892 | $decisions->{_is_flow_listbox_blue_w} = | ||
| 893 | $hash_ref->{_is_flow_listbox_blue_w}; | ||
| 894 | $decisions->{_is_last_flow_index_touched_grey} = | ||
| 895 | $hash_ref->{_is_last_flow_index_touched_grey}; | ||
| 896 | $decisions->{_is_last_flow_index_touched_pink} = | ||
| 897 | $hash_ref->{_is_last_flow_index_touched_pink}; | ||
| 898 | $decisions->{_is_last_flow_index_touched_green} = | ||
| 899 | $hash_ref->{_is_last_flow_index_touched_green}; | ||
| 900 | $decisions->{_is_last_flow_index_touched_blue} = | ||
| 901 | $hash_ref->{_is_last_flow_index_touched_blue}; | ||
| 902 | $decisions->{_is_last_parameter_index_touched_grey} = | ||
| 903 | $hash_ref->{_is_last_parameter_index_touched_grey}; | ||
| 904 | $decisions->{_is_last_parameter_index_touched_pink} = | ||
| 905 | $hash_ref->{_is_last_parameter_index_touched_pink}; | ||
| 906 | $decisions->{_is_last_parameter_index_touched_green} = | ||
| 907 | $hash_ref->{_is_last_parameter_index_touched_green}; | ||
| 908 | |||
| 909 | $decisions->{_is_last_flow_index_touched} = | ||
| 910 | $hash_ref->{_is_last_flow_index_touched}; | ||
| 911 | $decisions->{_is_last_parameter_index_touched_color} = | ||
| 912 | $hash_ref->{_is_last_parameter_index_touched_color}; | ||
| 913 | $decisions->{_is_sunix_listbox} = $hash_ref->{_is_sunix_listbox}; | ||
| 914 | $decisions->{_is_pre_built_superflow} = | ||
| 915 | $hash_ref->{_is_pre_built_superflow}; | ||
| 916 | |||
| 917 | if ( $hash_ref->{_prog_name_sref} ) { | ||
| 918 | $decisions->{_is_prog_name} = $true; | ||
| 919 | } | ||
| 920 | else { | ||
| 921 | # print("\n1. decisions, set4help, program name is---$decisions->{_is_prog_name}---\n"); | ||
| 922 | $decisions->{_is_prog_name} = $false; | ||
| 923 | } | ||
| 924 | |||
| 925 | # print("\n1. decisions, set4help program name is---$decisions->{_is_prog_name}---\n"); | ||
| 926 | # print(" decisions,set4help, left and right listbox are $decisions->{_is_flow_listbox_grey_w}$decisions->{_is_flow_listbox_green_w}\n"); | ||
| 927 | } | ||
| 928 | |||
| 929 | return ($empty_string); | ||
| 930 | } | ||
| 931 | |||
| 932 | =head2 sub set4run_select | ||
| 933 | |||
| 934 | used by both pre-built superflows and user-built flows | ||
| 935 | |||
| 936 | =cut | ||
| 937 | |||
| 938 | sub set4run_select { | ||
| 939 | my ( $self, $hash_ref ) = @_; | ||
| 940 | _reset(); #OK JML | ||
| 941 | |||
| 942 | $decisions->{_has_used_SaveAs_button} = | ||
| 943 | $hash_ref->{_has_used_SaveAs_button}; | ||
| 944 | $decisions->{_has_used_Save_button} = $hash_ref->{_has_used_Save_button}; | ||
| 945 | $decisions->{_has_used_Save_superflow} = | ||
| 946 | $hash_ref->{_has_used_Save_superflow}; | ||
| 947 | $decisions->{_has_used_open_perl_file_button} = | ||
| 948 | $hash_ref->{_has_used_open_perl_file_button}; | ||
| 949 | $decisions->{_is_Save_button} = $hash_ref->{_is_Save_button}; | ||
| 950 | |||
| 951 | # print("decisions,set4run_select, _has_used_SaveAs_button= $decisions->{_has_used_SaveAs_button} \n"); | ||
| 952 | # print("decisions,set4run_select, _has_used_Save_button= $decisions->{_has_used_Save_button} \n"); | ||
| 953 | # print("decisions,set4run_select, _is_Save_button= $decisions->{_is_Save_button} \n"); | ||
| 954 | return ($empty_string); | ||
| 955 | |||
| 956 | } | ||
| 957 | |||
| 958 | 1; |