analysis_main.set_display_flags | (<job_frame_display>, <button_frame_display>, <separator_display>, <apply_button_display>) |
Input: | ||
None. | ||
Output: | ||
LOGICAL | <job_frame_display> | A flag specifying whether the job name / job description frame should be displayed (TRUE) or not (FALSE). |
LOGICAL | <button_frame_display> | A flag specifying whether the button frame should be displayed (TRUE) or not (FALSE). |
LOGICAL | <separator_display> | A flag specifying whether the separator widget should be displayed (TRUE) or not (FALSE). |
LOGICAL | <apply_button_display> | A flag specifying whether the Apply button should be displayed (TRUE) or not (FALSE). |
Error Conditions: | ||
None. |
Note: | For the same reasons mentioned above, this call should be made every time an action-object change occurs. |
analysis_main.dont_commit_on_apply | () |
Input: | ||
None. | ||
Output: | ||
LOGICAL | <job_frame_display> | A flag specifying whether the job name / job description frame should be displayed (TRUE) or not (FALSE). |
LOGICAL | <button_frame_display> | A flag specifying whether the button frame should be displayed (TRUE) or not (FALSE). |
LOGICAL | <separator_display> | A flag specifying whether the separator widget should be displayed (TRUE) or not (FALSE). |
LOGICAL | <apply_button_display> | A flag specifying whether the Apply button should be displayed (TRUE) or not (FALSE). |
Error Conditions: | ||
None. |
analysis_main.dont_update_on_apply | () |
analysis_main.disable_jobname_and_description | () |
analysis_main.set_jobname_blank | () |
analysis_main.load_job_name_dbox | () |
Input: | ||
STRING | <job_name> | The name of the job to be loaded in the job name databox. |
Output: | ||
None. | ||
Error Conditions: | ||
None. |
analysis_main.set_jobname_current | () |
analysis_main.refresh_jobname_listbox | () |
<analysis_type> | ( <num_actions>, <action_labels>, <num_objects>, <object_labels>, <num_methods>, <method_labels>, <num_buttons>, <button_labels>, <button_callbacks>, <apply_class>, <callback_diagnostics>) |
Input: | ||
None. | ||
Output: | ||
INTEGER | <num_actions> | The number of actions valid for this analysis code / analysis type combination. The maximum number of actions allowed is 20. |
STRING ARRAY | <action_labels> | An array of <num_actions> strings containing the names of all the actions. |
INTEGER ARRAY | <num_objects> | A <num_actions> array containing the number of objects for each action. There must be at least one object per every action, but the name of this object can be blank. The maximum number of objects allowed per any action is 20. |
STRING ARRAY | <object_labels> | A <num_actions>*max( <num_objects> ) array containing all the names of the objects per the chosen action. |
INTEGER ARRAY | <num_methods> | A <num_actions>*max( <num_objects> ) array containing the number of methods valid for every action-object combination. Methods are optional. The maximum number of methods allowed for any action-object combination is 20. |
STRING ARRAY | <method_labels> | A <num_actions>*max( <num_objects> ) *max(<num_methods> ) array containing the names of all the methods per action and object. |
INTEGER ARRAY | <num_buttons> | A <num_actions>*max( <num_objects> ) array containing the number of buttons for every action-object combination. Buttons are optional. The maximum number of buttons allowed for a action-object combination is 10, but only 5 or 6 buttons can Be placed on the main Analysis form at a given time before the form becomes too large for the computer screen. |
STRING ARRAY | <button_labels> | A <num_actions>*max( <num_objects> )*max( <num_buttons> ) array containing all the button labels per action and object. |
STRING ARRAY | <button_callbacks> | A <num_actions>*max( <num_objects> )*max (<num_buttons> ) array containing the names of the PCL classes to be activated when the button is selected. Button callbacks are optional; they may be blank. |
STRING | <apply_class> | The name of the PCL class which contains the “apply” function activated by the Apply button on the main Analysis form. This class is optional; it may be blank. |
LOGICAL | <callback_diagnostics> | A flag specifying if all Analysis function calls made by the “analysis_main” class should be echoed to the command line (TRUE) or not (FALSE). Set this flag to TRUE during development in order to debug or just to get a better understanding of the interactions between the main Analysis form and the Analysis functions. |
Error Conditions: | ||
None. |
Note: | 1. As seen is the example below, the size of argument arrays or strings should not be explicitly stated in the <analysis_type> function so that compatibility is maintained with the “analysis_main” class regardless of the dimensions used in “analysis_main”. In other words, declare the argument <object_labels> listed above as “STRING object_labels[]()” instead of “STRING object_labels[31](20,20)”. 2. All string arguments listed in the above call have a maximum of 31 characters. |
/* $Header: /madrid/users9/pflib/pcl/custom/RCS/johncode_load_aom_data.pcl,v 1.1 92/12/11 20:55:13 sprack Exp Locker: sprack $ */
/*$$h */
/*
* Purpose:
* Define the option menu selections, button labels, and
* button pcl classes for John Code.
*/
CLASS johncode_load_aom_data
/*---------------------------------------------------------------------
*$$ FUNCTION structural
*
* Purpose:
* Load the option menu data for "John Code-Structural".
*/
FUNCTION structural( num_actions, action_items, @
num_objects, object_items, @
num_methods, method_items, @
num_buttons, button_labels, @
button_callbacks, preference_class, @
callback_diagnostics )
/*
* Local declarations:
*/
INTEGER num_actions
STRING action_items[]()
INTEGER num_objects()
STRING object_items[]()
INTEGER num_methods()
STRING method_items[]()
INTEGER num_buttons()
STRING button_labels[]()
STRING button_callbacks[]()
STRING preference_class[]
LOGICAL callback_diagnostics
*$$ FUNCTION structural
*
* Purpose:
* Load the option menu data for "John Code-Structural".
*/
FUNCTION structural( num_actions, action_items, @
num_objects, object_items, @
num_methods, method_items, @
num_buttons, button_labels, @
button_callbacks, preference_class, @
callback_diagnostics )
/*
* Local declarations:
*/
INTEGER num_actions
STRING action_items[]()
INTEGER num_objects()
STRING object_items[]()
INTEGER num_methods()
STRING method_items[]()
INTEGER num_buttons()
STRING button_labels[]()
STRING button_callbacks[]()
STRING preference_class[]
LOGICAL callback_diagnostics
/*
* Define the Actions, Objects and Methods. Note that at least
* one actions must exist and for every action, one object
* must exist. Methods are optional.
*/
num_actions = 3
action_items(1) = ~Analyze”
action_items(2) = "Read Results File"
action_items(3) = "Read Input File"
num_objects(1) = 2
num_objects(2) = 1
num_objects(3) = 1
object_items(1,1) = "Entire Model"
object_items(1,2) = "Current Group"
object_items(2,1) = "Results Entities"
object_items(3,1) = "Model Data"
num_methods(1,1) = 3
num_methods(1,2) = 3
num_methods(2,1) = 1
num_methods(3,1) = 1
method_items(1,1,1) = "Full Run"
method_items(1,1,2) = "Check Run"
method_items(1,1,3) = "Input File Only"
method_items(1,2,1) = "Full Run"
method_items(1,2,2) = "Check Run"
method_items(1,2,3) = "Input File Only"
method_items(2,1,1) = "Translate"
method_items(3,1,1) = "Translate"
/*
* Define the number of buttons for each action-object
* combinations. Then define the button labels and
* callbacks.
*/
num_buttons(1,1) = 3
num_buttons(1,2) = 3
num_buttons(2,1) = 2
num_buttons(3,1) = 2
button_labels(1,1,1) = "Button One"
button_labels(1,1,2) = "Button Two"
button_labels(1,1,3) = "Button Three"
button_labels(1,2,1) = "Button One"
button_labels(1,2,2) = "Button Two"
button_labels(1,2,3) = "Button Three"
button_labels(2,1,1) = "Button One"
button_labels(2,1,2) = "Button Two"
button_labels(3,1,1) = "Button One"
button_labels(3,1,2) = "Button Two"
button_callbacks(1,1,1) = " "
button_callbacks(1,1,2) = " "
button_callbacks(1,1,3) = " "
button_callbacks(1,2,1) = " "
button_callbacks(1,2,2) = " "
button_callbacks(1,2,3) = " "
button_callbacks(2,1,1) = " "
button_callbacks(2,1,2) = " "
button_callbacks(3,1,1) = " "
button_callbacks(3,1,2) = " "
/*
* Define the class for general button functions, such as
* the "apply" function.
*/
preference_class = " "
callback_diagnostics = FALSE
END FUNCTION /* structural */
END CLASS /* johncode_load_aom_data */
analysis_main.button_class_closed | ( <associated_class>) |
Input: | ||
STRING | <associated_class> | The name of the class whose form is being closed. |
Output: | ||
None. | ||
Error Conditions: | ||
None. |
analysis_main.get_analysis_menu_items | (<item_orders>, <item_labels>) |
Input: | ||
None. | ||
Output: | ||
INTEGER ARRAY | <item_orders> | A 3 element vector containing the order of the current action in the list of valid actions, the order of the current object in the list of objects valid for the chosen action, and the order of the current method in the list of methods valid for the chosen action-object selection. As an example, let us look at the case where the valid objects under “Import” are “Model,” “Results” and “Both” and there are no methods. If the object-method selection is “Import” - “Both” “ “, the <items> would be [2,3,0]. |
STRING ARRAY | <item_labels> | A 3 element vector of strings containing the names of the currently chosen action-object-method. In the above example, <item_labels> would be [“Import,” “Both,” “ “]. The maximum length of each string is 31 characters. |
Error Conditions: | ||
None. |
analysis_main.get_job_name_and_desc | (<job_name>, <job_description>) |
Input: | ||
None. | ||
Output: | ||
STRING | <job_name> | The name of the currently selected job. The maximum length of this string is 31 characters. |
STRING | <job_description> | The description of the currently selected job. The maximum length of this string is 256 characters. |
Error Conditions: | ||
None. |
analysis_main.get_current_job_info | (<job_name>, <job_description>, <job_id>, <parameter_set_id>, <job_status>) |
Input: | ||
None. | ||
Output: | ||
STRING | <job_name> | The name of the currently selected job. The maximum length of this string is 31 characters. |
STRING | <job_description> | The description of the currently selected job. The maximum length of this string is 256 characters. |
INTEGER | <job_id> | The ID of the current job. |
INTEGER | <parameter_set_id> | The ID of the parameter set associated with this job. |
INTEGER | <job_status> | The status of the current job. |
Error Conditions: | ||
None. |
analysis_main.get_code_and_type | (<analysis_code_name>, <analysis_code_id>, <analysis_type_name>, <analysis_type_id>) |
Input: | ||
None. | ||
Output: | ||
STRING | <analysis_code_name> | The name of the current analysis code. This string has a maximum of 31 characters. |
INTEGER | <analysis_code_id> | The ID of the current analysis code. |
STRING | <analysis_type_name> | The name of the current analysis type. This string has a maximum of 31 characters. |
INTEGER | <analysis_type_id> | The ID of the current analysis type. |
Error Conditions: | ||
None. |
analysis_main.get_file_suffixes | (<model_suffix>, <results_suffix>) |
Input: | ||
None. | ||
Output: | ||
STRING | <model_suffix> | The user defined model file suffix of the current analysis code. The maximum length of this string is 4 characters. |
STRING | <results_suffix> | The user defined results file suffix of the current analysis code. The maximum length of this string is 4 characters. |
Error Conditions: | ||
None. |
analysis_main.get_panel_info | (<form_id>, <first_y_location>, <job_frame_id>, <button_frame_id>, <separator_id>, <apply_button_id>) |
Input: | ||
None. | ||
Output: | ||
widget | <form_id> | The ID of the main Analysis form. |
REAL | <first_y_location> | The Y position on the main Analysis form of the first widget following the Analysis Code / Analysis Type text box. |
widget | <job_frame_id> | The ID of the job name / job description frame. |
widget | <button_frame_id> | The ID of the button frame. |
widget | <separator_id> | The ID of the separator widget. |
widget | <apply_button_id> | The ID of the apply button. |
Error Conditions: | ||
None. |
Note: | The values returned by “get_panel_info” are invariant with respect to action-object selection, so this calls only needs to be made once. But the main Analysis form is refreshed every time an action-object change is made (including when the analysis preference is changed or when the main Analysis for is closed and then re-opened), so any modifications to the main Analysis form must be repeated every time a action-object change is made. A good place for any main Analysis form changes would be the <apply_class>.option_menu_change_is_done function. |