void ShowDataOrblistCB(Widget w, enum list_names client_data, XmListCallbackStruct *call_data)
ShowDataOrblist displays the n-, alpha- and constant values in the appropriate listboxes if an orbital name is selected in the Orbitals listbox of the Display Data window.
First, when a pseudo orbital was selected, the "*" character is removed from the orbital string (internally, pseudo orbital names are stored without the "*" character).
Then, if the currently selected orbital is equal to the previously selected one (stored in the global variable last_selected_orbital), i.e. the user unselected the name in the Orbitals listbox, the n-, alpha- and constant listboxes are cleared. Otherwise, these are filled by calling XAFillShowDataListbox.
void menuCB(Widget w, enum item_names client_data, XmAnyCallbackStruct *call_data)
menuCB responds to the user's input after a menu item has been selected. From this callback function other procedures may be called, their return values be examined or new windows be displayed.
void OpenDialogCB(Widget w, int client_data, XmSelectionBoxCallbackStruct *call_data)
OpenDialogCB calls all the subprocedures which are necessary to read in atom data files and whose return values have to be treated accordingly.
First an already existing atom is "released", i.e. its data structure is deleted. Now XAScan can be called which reads in the atom data file and stores the values into a new atom data structure. After that the drawing area has to be reset, an already existing GOriginalAtom has to be updated and the Display Data window and Orbitals listbox have to be filled.
Some global variables which are essential for the execution of XA are set to new values in this procedure, so you are advised to read section "What do I have to know before I start?".
void OrbitalListCB(Widget w, char *client_data, XmListCallbackStruct *call_data)
First of all, OrbitalListCB controls the availability of menu items (as it is done in other callback functions too). For example, it is only useful to offer the Draw Data item to the user if at least one orbital name is selected.
Another essential task of OrbitalListCB is the continuous update of the global array GOrbitalListItems which stores all the selected orbital names of the Orbitals listbox. The global array is used in various functions, so changes should only be done in OrbitalListCB except when the Orbitals listbox has to be reset completely, e.g. after deleting an orbital. The additional "*" character of pseudo orbitals is removed before the orbital name is saved in GOrbitalListItems.
void CreateDialogCB(Widget w, int client_data, XmPushButtonCallbackStruct *call_data)
CreateDialogCB controls the steps which are necessary to create a pseudo orbital or update an existing one.
Additionally all selected orbital names in the main Orbitals listbox are "deselected" and the menu items Save PS and Print PS are cancelled.
void PrintDialogCB(Widget w, int client_data, XmSelectionBoxCallbackStruct *call_data)
void PrintPSDialogCB(Widget w, int client_data, XmSelectionBoxCallbackStruct *call_data)
Both procedures create a temporary file in the /tmp directory to save the values/graphs which have to be printed. The command entered by the user is put before this filename, both are saved into a string and the print command is started by using the system procedure.