Position engineOutputX = -1, engineOutputY = -1;
Dimension engineOutputW, engineOutputH;
-Widget engineOutputShell;
+Widget engineOutputShell = NULL;
static int engineOutputDialogUp;
/* Module variables */
void DoSetWindowText(int which, int field, char *s_label)
{
- Arg arg;
+ Arg args[16];
- XtSetArg(arg, XtNlabel, (XtArgVal) s_label);
- XtSetValues(outputField[which][field], &arg, 1);
+ XtSetArg(args[0], XtNlabel, (XtArgVal) s_label);
+ XtSetValues(outputField[which][field], args, 1);
+}
+
+void SetEngineOutputTitle(char *title)
+{
+ Arg args[16];
+ if(engineOutputShell==NULL) return;
+ XtSetArg(args[0], XtNtitle, (XtArgVal) title);
+ XtSetValues(engineOutputShell, args, 1);
}
void InsertIntoMemo( int which, char * text, int where )
void DoClearMemo(int which)
{
- Widget edit;
-
- edit = XtNameToWidget(engineOutputShell, which ? "*form2.text" : "*form.text");
- XtCallActionProc(edit, "select-all", NULL, NULL, 0);
- XtCallActionProc(edit, "kill-selection", NULL, NULL, 0);
+ Widget edit = XtNameToWidget(engineOutputShell, which ? "*form2.text" : "*form.text");
+ Arg arg;
+// XtCallActionProc(edit, "select-all", NULL, NULL, 0);
+// XtCallActionProc(edit, "kill-selection", NULL, NULL, 0);
+ XtSetArg(arg, XtNstring, ""); // clear without disturbing selection!
+ XtSetValues(edit, &arg, 1);
}
// cloned from CopyPositionProc. Abuse selected_fen_position to hold selection
char memoTranslations[] =
":Ctrl<Key>c: CopyMemoProc() \n \
<Btn3Motion>: HandlePV() \n \
-<Btn3Down>: select-start() SelectPV() \n \
+Shift<Btn3Down>: select-start() SelectPV(1) \n \
+Any<Btn3Down>: select-start() SelectPV(0) \n \
<Btn3Up>: extend-end() StopPV() \n";
void
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)) {
XawTextSetSelection( outputField[currentPV][nMemo], start, end );
highTextStart[currentPV] = start; highTextEnd[currentPV] = end;