X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwengineoutput.c;h=b9d13f59a051c6d42497377d9fadce54eae6d0eb;hb=HEAD;hp=2acb145e3a81bf775e04aff5d6b6c05bc1674c6b;hpb=8d1cc97c26458f4f5a8ffbfaaea5aaf71a5dcbca;p=xboard.git diff --git a/winboard/wengineoutput.c b/winboard/wengineoutput.c index 2acb145..b9d13f5 100644 --- a/winboard/wengineoutput.c +++ b/winboard/wengineoutput.c @@ -5,6 +5,9 @@ * * Copyright 2005 Alessandro Scotti * + * Enhancements Copyright 2009, 2010, 2011, 2012, 2013, 2014, 2015, + * 2016 Free Software Foundation, Inc. + * * ------------------------------------------------------------------------ * * GNU XBoard is free software: you can redistribute it and/or modify @@ -223,7 +226,8 @@ void ResizeWindowControls( int mode ) InvalidateRect( GetDlgItem(hDlg,IDC_EngineMemo2), NULL, FALSE ); } -static int currentPV, highTextStart[2], highTextEnd[2]; +static int currentPV; +int highTextStart[2], highTextEnd[2]; extern RECT boardRect; VOID @@ -237,7 +241,7 @@ GetMemoLine(HWND hDlg, int x, int y) memo = currentPV ? IDC_EngineMemo2 : IDC_EngineMemo1; index = SendDlgItemMessage( hDlg, memo, EM_CHARFROMPOS, 0, (LPARAM) &pt ); GetDlgItemText(hDlg, memo, buf, sizeof(buf)); - if(LoadMultiPV(x, y, buf, index, &start, &end)) { + if(LoadMultiPV(x, y, buf, index, &start, &end, currentPV)) { SetCapture(hDlg); SendMessage( outputField[currentPV][nMemo], EM_SETSEL, (WPARAM)start, (LPARAM)end ); highTextStart[currentPV] = start; highTextEnd[currentPV] = end; @@ -274,6 +278,11 @@ void DoSetWindowText(int which, int field, char *s_label) SetWindowText( outputField[which][field], s_label ); } +void SetEngineOutputTitle(char *title) +{ + SetWindowText( engineOutputDialog, title ); +} + // This seems pure front end LRESULT CALLBACK EngineOutputProc( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam ) { @@ -284,6 +293,7 @@ LRESULT CALLBACK EngineOutputProc( HWND hDlg, UINT message, WPARAM wParam, LPARA if( engineOutputDialog == NULL ) { engineOutputDialog = hDlg; + Translate(hDlg, DLG_EngineOutput); RestoreWindowPlacement( hDlg, &wpEngineOutput ); /* Restore window placement */ ResizeWindowControls( windowMode ); @@ -331,7 +341,8 @@ LRESULT CALLBACK EngineOutputProc( HWND hDlg, UINT message, WPARAM wParam, LPARA case WM_NOTIFY: if( wParam == IDC_EngineMemo1 || wParam == IDC_EngineMemo2 ) { MSGFILTER * lpMF = (MSGFILTER *) lParam; - if( lpMF->msg == WM_RBUTTONDOWN && (lpMF->wParam & (MK_CONTROL | MK_SHIFT)) == 0 ) { + if( lpMF->msg == WM_RBUTTONDOWN && (lpMF->wParam & (MK_CONTROL)) == 0 ) { + shiftKey = (lpMF->wParam & MK_SHIFT) != 0; // [HGM] remember last shift status currentPV = (wParam == IDC_EngineMemo2); GetMemoLine(hDlg, LOWORD(lpMF->lParam), HIWORD(lpMF->lParam)); }