Implement highlighting in engine output by through generic method
[xboard.git] / xengineoutput.c
index f83dcf0..4d94616 100644 (file)
@@ -83,6 +83,7 @@ static int currentPV, highTextStart[2], highTextEnd[2];
 static Pixmap icons[8]; // [HGM] this front-end array translates back-end icon indicator to handle
 static Widget memoWidget;
 #endif
+static void *memoWidget;
 
 #ifdef TODO_GTK
 static void
@@ -147,9 +148,6 @@ InsertIntoMemo (int which, char * text, int where)
     if(where < highTextStart[which]) { // [HGM] multiPVdisplay: move highlighting
        int len = strlen(text);
        highTextStart[which] += len; highTextEnd[which] += len;
-#ifdef TODO_GTK
-       XawTextSetSelection( edit, highTextStart[which], highTextEnd[which] );
-#endif
     }
 }
 
@@ -162,40 +160,6 @@ Shift<Btn3Down>: select-start() extend-end() SelectPV(1) \n \
 Any<Btn3Down>: select-start() extend-end() SelectPV(0) \n \
 <Btn3Up>: StopPV() \n";
 
-#ifdef TODO_GTK
-void
-SelectPV (Widget w, XEvent * event, String * params, Cardinal * nParams)
-{      // [HGM] pv: translate click to PV line, and load it for display
-       String val;
-       int start, end;
-       XawTextPosition index, dummy;
-       int x, y;
-       Arg arg;
-
-       x = event->xmotion.x; y = event->xmotion.y;
-       currentPV = (w != memoWidget);
-       XawTextGetSelectionPos(w, &index, &dummy);
-       XtSetArg(arg, XtNstring, &val);
-       XtGetValues(w, &arg, 1);
-       shiftKey = strcmp(params[0], "0");
-       if(LoadMultiPV(x, y, val, index, &start, &end, currentPV)) {
-           XawTextSetSelection( w, start, end );
-           highTextStart[currentPV] = start; highTextEnd[currentPV] = end;
-       }
-}
-#endif
-
-#ifdef TODO_GTK
-void
-StopPV (Widget w, XEvent * event, String * params, Cardinal * nParams)
-{      // [HGM] pv: on right-button release, stop displaying PV
-        XawTextUnsetSelection( w );
-        highTextStart[currentPV] = highTextEnd[currentPV] = 0;
-        UnLoadPV();
-        XtCallActionProc(w, "beginning-of-file", event, NULL, 0);
-}
-#endif
-
 //------------------------------- pane switching -----------------------------------
 
 void