/************************************************************************ ** ** FILE : hasetmisc.c ** ** ZWECK : ** ** AUTOR : Michael C. Ancutici ** Universitaet Stuttgart, Fakultaet Informatik ** ** DATUM : 14.03.93 ** *************************************************************************/ #include "hasetmisc.h" #include "hawin.h" #include "misc.h" #include "ihasub" #include Widget HaParButton; Widget HaParMenu; Widget HaParEntry; Widget HaSetMEntry; #define schreibe(w, text) XtVaSetValues( w , XtNlabel, text, NULL) static Pixmap IHaSubPixmap; BOOLEAN HaSetAnzeigen = FALSE; BOOLEAN HaSetSeriell = FALSE; BOOLEAN HaSetZufall = TRUE; /************************************************************************* ** FUNKTION: SetSimStatus ** ZWECK: ** EINGABE: ** AUSGABE: ** RETURN: ** ANMERK: *************************************************************************/ static void SetSimStatus() { if ( (HaSetSeriell) ) if ( (HaSetZufall) ) schreibe( HaSimLabel, "Sim: SP"); else schreibe( HaSimLabel, "Sim: SM"); else if ( (HaSetZufall) ) schreibe( HaSimLabel, "Sim: PR"); else schreibe( HaSimLabel, "Sim: PM"); } /************************************************************************* ** FUNKTION: HaParSelect ** ZWECK: ** EINGABE: ** AUSGABE: ** RETURN: ** ANMERK: *************************************************************************/ static void HaSetSelect( w, client_data, call_data) Widget w; XtPointer client_data, call_data; { int PaneNum = (int) client_data; switch( PaneNum) { case 0: HaSetSeriell = FALSE; HaSetZufall = TRUE; SetSimStatus(); break; case 1: HaSetSeriell = HaSetZufall = FALSE; SetSimStatus(); break; case 2: HaSetSeriell = HaSetZufall = TRUE; SetSimStatus(); break; case 3: HaSetSeriell = TRUE; HaSetZufall = FALSE; SetSimStatus(); break; case 4: HaSetAnzeigen = ( !(HaSetAnzeigen) ); schreibe( HaAnzLabel, ( (HaSetAnzeigen) ? "S" : "") ); break; } } /************************************************************************* ** FUNKTION: HaInstSetMenu ** ZWECK: ** EINGABE: ** AUSGABE: ** RETURN: ** ANMERK: *************************************************************************/ #define HA_SET_MENU_ENTRYS 5 void HaSetInstMenu() { int i; static String SetMenuEntryLabel[] = { " Parallel Random ", " Parallel Manual ", " Sequential Random ", " Sequential Manual ", " Show "}; static String SetMenuEntryName[] = { "HaParMsme", "HaParZsme", "HaSerMsme", "HaSerZsme", "HaAnzsme"}; HaSetButton = XtVaCreateManagedWidget( "HaSetButton", menuButtonWidgetClass, HaTopPane, XtNlabel, "Settings", XtNmenuName, "HaSetMenu", NULL); HaSetMenu = XtVaCreatePopupShell( "HaSetMenu", simpleMenuWidgetClass, HaSetButton, NULL); for (i=0; i