X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwevalgraph.c;h=e8abe46ece4fdb4f83a9a925d3513c3d63a5b516;hb=4011e8678d85310eedf19fd00aa5d96a9a60770a;hp=ee71b609e81a53d0c335db4e4536c80dbdda79c0;hpb=c37d45adc7d98a702a7459ccdc0ac23df01a476e;p=xboard.git diff --git a/winboard/wevalgraph.c b/winboard/wevalgraph.c index ee71b60..e8abe46 100644 --- a/winboard/wevalgraph.c +++ b/winboard/wevalgraph.c @@ -5,7 +5,7 @@ * * Copyright 2005 Alessandro Scotti * - * Enhancements Copyright 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. + * Enhancements Copyright 2009, 2010, 2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc. * * ------------------------------------------------------------------------ * @@ -51,7 +51,7 @@ static COLORREF crBlack = RGB( 0xAD, 0x5D, 0x3D ); static HDC hdcPB = NULL; static HBITMAP hbmPB = NULL; -static HPEN pens[6]; // [HGM] put all pens in one array +static HPEN pens[PEN_ANY+1]; // [HGM] put all pens in one array static HBRUSH hbrHist[3] = { NULL, NULL, NULL }; Boolean EvalGraphIsUp() @@ -156,7 +156,7 @@ static VOID DisplayEvalGraph( HWND hWnd, HDC hDC ) // back-end painting; calls back front-end primitives for lines, rectangles and text PaintEvalGraph(); - SetWindowText(hWnd, MakeEvalTitle(T_("Evaluation Graph"))); + SetWindowText(hWnd, MakeEvalTitle(differentialView ? T_("Blunder Graph") : T_("Evaluation Graph"))); /* Copy bitmap into destination DC */ BitBlt( hDC, 0, 0, nWidthPB, nHeightPB, hdcPB, 0, 0, SRCCOPY ); @@ -208,7 +208,14 @@ LRESULT CALLBACK EvalGraphProc( HWND hDlg, UINT message, WPARAM wParam, LPARAM l EndPaint( hDlg, &stPS ); break; + case WM_MOUSEWHEEL: + if((short)HIWORD(wParam) < 0) appData.zoom++; + if((short)HIWORD(wParam) > 0 && appData.zoom > 1) appData.zoom--; + goto paint; + case WM_RBUTTONDOWN: + differentialView = !differentialView; case WM_REFRESH_GRAPH: + paint: hDC = GetDC( hDlg ); DisplayEvalGraph( hDlg, hDC ); ReleaseDC( hDlg, hDC );