void EngineOutputPopUp () { static int needInit = TRUE; static char *title = N_("Engine output"); if (GenericPopUp(engoutOptions, _(title), EngOutDlg, BoardWindow, NONMODAL, appData.topLevel)) { if(engoutOptions[STRIDE-1].type != Break) DisplayFatalError(_("Mismatch of STRIDE in nengineoutput.c\nChange and recompile!"), 0, 2); AddHandler(&engoutOptions[MEMO], EngOutDlg, 6); AddHandler(&engoutOptions[MEMO+STRIDE], EngOutDlg, 6); if( needInit ) { InitEngineOutput(&engoutOptions[0], &engoutOptions[MEMO]); // make icon bitmaps needInit = FALSE; } SetEngineColorIcon( 0 ); SetEngineColorIcon( 1 ); SetEngineState( 0, STATE_IDLE, "" ); SetEngineState( 1, STATE_IDLE, "" ); } else { SetIconName(EngOutDlg, _(title)); SetDialogTitle(EngOutDlg, _(title)); } MarkMenu("View.EngineOutput", EngOutDlg); ShowThinkingEvent(); // [HGM] thinking: might need to prompt engine for thinking output }
void EngineOutputPopDown () { Arg args[16]; int j; if (!engineOutputDialogUp) return; DoClearMemo(1); j = 0; XtSetArg(args[j], XtNx, &engineOutputX); j++; XtSetArg(args[j], XtNy, &engineOutputY); j++; XtSetArg(args[j], XtNwidth, &engineOutputW); j++; XtSetArg(args[j], XtNheight, &engineOutputH); j++; XtGetValues(engineOutputShell, args, j); wpEngineOutput.x = engineOutputX - 4; wpEngineOutput.y = engineOutputY - 23; wpEngineOutput.width = engineOutputW; wpEngineOutput.height = engineOutputH; XtPopdown(engineOutputShell); XSync(xDisplay, False); j=0; XtSetArg(args[j], XtNleftBitmap, None); j++; XtSetValues(XtNameToWidget(menuBarWidget, "menuView.Show Engine Output"), args, j); engineOutputDialogUp = False; ShowThinkingEvent(); // [HGM] thinking: might need to shut off thinking output }
void HideThinkingProc () { appData.hideThinkingFromHuman = !appData.hideThinkingFromHuman; // [HGM] thinking: taken out of ShowThinkingEvent ShowThinkingEvent(); MARK_MENU_ITEM("Options.HideThinking", appData.hideThinkingFromHuman); }
void EngineOutputPopUp () { Arg args[16]; int j; Widget edit; static int needInit = TRUE; static char *title = N_("Engine output"), *text = N_("This feature is experimental"); if (engineOutputShell == NULL) { engineOutputShell = EngineOutputCreate(_(title), _(text)); XtRealizeWidget(engineOutputShell); CatchDeleteWindow(engineOutputShell, "EngineOutputPopDown"); if( needInit ) { InitializeEngineOutput(); needInit = FALSE; } SetEngineColorIcon( 0 ); SetEngineColorIcon( 1 ); SetEngineState( 0, STATE_IDLE, "" ); SetEngineState( 1, STATE_IDLE, "" ); } else { edit = XtNameToWidget(engineOutputShell, "*form.text"); j = 0; XtSetArg(args[j], XtNstring, text); j++; XtSetValues(edit, args, j); j = 0; XtSetArg(args[j], XtNiconName, (XtArgVal) _(title)); j++; XtSetArg(args[j], XtNtitle, (XtArgVal) _(title)); j++; XtSetValues(engineOutputShell, args, j); } XtPopup(engineOutputShell, XtGrabNone); XSync(xDisplay, False); j=0; XtSetArg(args[j], XtNleftBitmap, xMarkPixmap); j++; XtSetValues(XtNameToWidget(menuBarWidget, "menuView.Show Engine Output"), args, j); engineOutputDialogUp = True; ShowThinkingEvent(); // [HGM] thinking: might need to prompt engine for thinking output }
void ShowThinkingProc () { appData.showThinking = !appData.showThinking; // [HGM] thinking: taken out of ShowThinkingEvent ShowThinkingEvent(); }