String *prms, Cardinal *nprms));
void AnimateUserMove P((Widget w, XEvent * event,
String * params, Cardinal * nParams));
+void HandlePV P((Widget w, XEvent * event,
+ String * params, Cardinal * nParams));
void WhiteClock P((Widget w, XEvent *event,
String *prms, Cardinal *nprms));
void BlackClock P((Widget w, XEvent *event,
{ "DrawPosition", DrawPositionProc },
{ "HandleUserMove", HandleUserMove },
{ "AnimateUserMove", AnimateUserMove },
+ { "HandlePV", HandlePV },
+ { "UnLoadPV", UnLoadPV },
{ "FileNameAction", FileNameAction },
{ "AskQuestionProc", AskQuestionProc },
{ "AskQuestionReplyAction", AskQuestionReplyAction },
"<Btn1Down>: HandleUserMove() \n \
<Btn1Up>: HandleUserMove() \n \
<Btn1Motion>: AnimateUserMove() \n \
+ <Btn3Motion>: HandlePV() \n \
+ <Btn3Up>: UnLoadPV() \n \
Shift<Btn2Down>: XawPositionSimpleMenu(menuB) XawPositionSimpleMenu(menuD)\
PieceMenuPopup(menuB) \n \
Any<Btn2Down>: XawPositionSimpleMenu(menuW) XawPositionSimpleMenu(menuD) \
Cardinal *num_params;
{
String whichMenu;
+
+ if (event->type != ButtonRelease) UnLoadPV(); // [HGM] pv
if (event->type != ButtonPress) return;
if (errorUp) ErrorPopDown();
switch (gameMode) {
case IcsExamining:
whichMenu = params[0];
break;
+ case IcsObserving:
+ if(!appData.icsEngineAnalyze) return;
case IcsPlayingWhite:
case IcsPlayingBlack:
- case EditGame:
+ if(!appData.zippyPlay) goto noZip;
+ case AnalyzeMode:
+ case AnalyzeFile:
case MachinePlaysWhite:
case MachinePlaysBlack:
- if (appData.testLegality &&
+ case TwoMachinesPlay: // [HGM] pv: use for showing PV
+ if (!appData.dropMenu) {
+ LoadPV(event->xbutton.x, event->xbutton.y);
+ return;
+ }
+ if(gameMode == TwoMachinesPlay || gameMode == AnalyzeMode ||
+ gameMode == AnalyzeFile || gameMode == IcsObserving) return;
+ case EditGame:
+ noZip:
+ if (!appData.dropMenu || appData.testLegality &&
gameInfo.variant != VariantBughouse &&
gameInfo.variant != VariantCrazyhouse) return;
SetupDropMenu();
DragPieceMove(event->xmotion.x, event->xmotion.y);
}
+void HandlePV (Widget w, XEvent * event,
+ String * params, Cardinal * nParams)
+{ // [HGM] pv: walk PV
+ MovePV(event->xmotion.x, event->xmotion.y, lineGap + BOARD_HEIGHT * (squareSize + lineGap));
+}
+
Widget CommentCreate(name, text, mutable, callback, lines)
char *name, *text;
int /*Boolean*/ mutable;