*
* Copyright 2005 Alessandro Scotti
*
- * Enhancements Copyright 2009, 2010 Free Software Foundation, Inc.
+ * Enhancements Copyright 2009, 2010, 2011 Free Software Foundation, Inc.
*
* ------------------------------------------------------------------------
*
#define _LL_ 100
-// imports from xboard.c
-extern Widget formWidget, shellWidget, boardWidget, menuBarWidget;
-extern Display *xDisplay;
-extern Window xBoardWindow;
-extern int squareSize;
-extern Pixmap xMarkPixmap, wIconPixmap, bIconPixmap;
-extern char *layoutName;
-
Pixmap icons[8]; // [HGM] this front-end array translates back-end icon indicator to handle
Widget outputField[2][7]; // [HGM] front-end array to translate output field to window handle
int EngineOutputIsUp();
void SetEngineColorIcon( int which );
-/* Imports from backend.c */
-extern int opponentKibitzes;
-
-/* Imports from xboard.c */
-extern Arg layoutArgs[2], formArgs[2], messageArgs[4];
-
//extern WindowPlacement wpEngineOutput;
Position engineOutputX = -1, engineOutputY = -1;
XtSetValues(outputField[which][field], &arg, 1);
}
+void SetEngineOutputTitle(char *title)
+{
+ Arg arg;
+ XtSetArg(arg, XtNtitle, (XtArgVal) title);
+ XtSetValues(engineOutputShell, &arg, 1);
+}
+
void InsertIntoMemo( int which, char * text, int where )
{
XawTextBlock t;
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
-extern char *selected_fen_position;
-
Boolean SendPositionSelection(Widget w, Atom *selection, Atom *target,
Atom *type_return, XtPointer *value_return,
unsigned long *length_return, int *format_return); // from xboard.c
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;
int j;
Widget edit;
static int needInit = TRUE;
- static char *title = _("Engine output"), *text = _("This feature is experimental");
+ static char *title = N_("Engine output"), *text = N_("This feature is experimental");
if (engineOutputShell == NULL) {
engineOutputShell =
- EngineOutputCreate(title, text);
+ EngineOutputCreate(_(title), _(text));
XtRealizeWidget(engineOutputShell);
CatchDeleteWindow(engineOutputShell, "EngineOutputPopDown");
if( needInit ) {
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++;
+ XtSetArg(args[j], XtNiconName, (XtArgVal) _(title)); j++;
+ XtSetArg(args[j], XtNtitle, (XtArgVal) _(title)); j++;
XtSetValues(engineOutputShell, args, j);
}
j=0;
XtSetArg(args[j], XtNleftBitmap, xMarkPixmap); j++;
- XtSetValues(XtNameToWidget(menuBarWidget, "menuMode.Show Engine Output"),
+ XtSetValues(XtNameToWidget(menuBarWidget, "menuView.Show Engine Output"),
args, j);
engineOutputDialogUp = True;
XSync(xDisplay, False);
j=0;
XtSetArg(args[j], XtNleftBitmap, None); j++;
- XtSetValues(XtNameToWidget(menuBarWidget, "menuMode.Show Engine Output"),
+ XtSetValues(XtNameToWidget(menuBarWidget, "menuView.Show Engine Output"),
args, j);
engineOutputDialogUp = False;