X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=nhistory.c;h=e1d9766e8a28eec317697a3033da09ee3cc42e06;hb=7d2cf8e719aefa423f406fbf094e59b37a2c7ef1;hp=cefb706ae1d8ae427f96be3b3af31a82aa23fb58;hpb=cbb23e5f23cee542f8099c7f80fd07df8d9f0a08;p=xboard.git diff --git a/nhistory.c b/nhistory.c index cefb706..e1d9766 100644 --- a/nhistory.c +++ b/nhistory.c @@ -26,8 +26,8 @@ #include #include "common.h" +#include "frontend.h" #include "backend.h" -#include "xhistory.h" #include "dialogs.h" #include "gettext.h" @@ -62,6 +62,12 @@ AppendToHistoryMemo (char * text, int bold, int colorNr) return AppendText(&historyOptions[0], text); // for now ignore bold & color stuff, as Xaw cannot handle that } +void +HighlightMove (int from, int to, Boolean highlight) +{ + HighlightText (&historyOptions[0], from, to, highlight); +} + char *historyText; int @@ -77,6 +83,12 @@ Option historyOptions[] = { { 0, NO_OK, 0, NULL, (void*) NULL, "", NULL, EndMark , "" } }; +void +ScrollToCurrent (int caretPos) +{ + ScrollToCursor(&historyOptions[0], caretPos); +} + // ------------ standard entry points into MoveHistory code ----------- Boolean @@ -95,7 +107,7 @@ void HistoryPopUp () { if(GenericPopUp(historyOptions, _("Move list"), HistoryDlg, BoardWindow, NONMODAL, 1)) - AddHandler(&historyOptions[0], 0); + AddHandler(&historyOptions[0], HistoryDlg, 0); MarkMenu("View.MoveHistory", HistoryDlg); }