*\r
* Copyright 2005 Alessandro Scotti\r
*\r
+ * Enhancements Copyright 2009, 2010, 2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc.\r
+ *\r
* ------------------------------------------------------------------------\r
*\r
* GNU XBoard is free software: you can redistribute it and/or modify\r
\r
static HDC hdcPB = NULL;\r
static HBITMAP hbmPB = NULL;\r
-static HPEN pens[6]; // [HGM] put all pens in one array\r
+static HPEN pens[PEN_ANY+1]; // [HGM] put all pens in one array\r
static HBRUSH hbrHist[3] = { NULL, NULL, NULL };\r
\r
Boolean EvalGraphIsUp()\r
}\r
\r
// [HGM] front-end, added as wrapper to avoid use of LineTo and MoveToEx in other routines (so they can be back-end) \r
-void DrawSegment( int x, int y, int *lastX, int *lastY, enum PEN penType )\r
+void DrawSegment( int x, int y, int *lastX, int *lastY, int penType )\r
{\r
POINT stPt;\r
if(penType == PEN_NONE) MoveToEx( hdcPB, x, y, &stPt ); else {\r
\r
// back-end painting; calls back front-end primitives for lines, rectangles and text\r
PaintEvalGraph();\r
- SetWindowText(hWnd, MakeEvalTitle(T_("Evaluation Graph")));\r
+ SetWindowText(hWnd, MakeEvalTitle(differentialView ? T_("Blunder Graph") : T_("Evaluation Graph")));\r
\r
/* Copy bitmap into destination DC */\r
BitBlt( hDC, 0, 0, nWidthPB, nHeightPB, hdcPB, 0, 0, SRCCOPY );\r
EndPaint( hDlg, &stPS );\r
break;\r
\r
+ case WM_MOUSEWHEEL:\r
+ if((short)HIWORD(wParam) < 0) appData.zoom++;\r
+ if((short)HIWORD(wParam) > 0 && appData.zoom > 1) appData.zoom--;\r
+ goto paint;\r
+ case WM_RBUTTONDOWN:\r
+ differentialView = !differentialView;\r
case WM_REFRESH_GRAPH:\r
+ paint:\r
hDC = GetDC( hDlg );\r
DisplayEvalGraph( hDlg, hDC );\r
ReleaseDC( hDlg, hDC );\r