#include "frontend.h"\r
#include "backend.h"\r
\r
-/* Imports from winboard.c */\r
-extern BOOLEAN evalGraphDialogUp; // should be back-end variable, and defined here\r
-\r
/* Module globals */ // used to communicate between back-end and front-end part\r
static ChessProgramStats_Move * currPvInfo;\r
static int currFirst = 0;\r
DrawHistograms();\r
}\r
\r
-Boolean EvalGraphIsUp()\r
-{\r
- return evalGraphDialogUp;\r
-}\r
-\r
// ------------------------------------------ front-end starts here ----------------------------------------------\r
\r
#include <commdlg.h>\r
\r
#define WM_REFRESH_GRAPH (WM_USER + 1)\r
\r
-void EvalGraphSet( int first, int last, int current, ChessProgramStats_Move * pvInfo );\r
-void EvalGraphPopUp();\r
-void EvalGraphPopDown();\r
-Boolean EvalGraphIsUp();\r
-\r
// calls of front-end part into back-end part\r
extern int GetMoveIndexFromPoint( int x, int y );\r
extern void PaintEvalGraph( void );\r
\r
/* Imports from winboard.c */\r
-extern HWND evalGraphDialog;\r
-extern BOOLEAN evalGraphDialogUp; // should be back-end, really\r
+static BOOLEAN evalGraphDialogUp; // should be back-end, really\r
\r
extern HINSTANCE hInst;\r
extern HWND hwndMain;\r
static HPEN pens[6]; // [HGM] put all pens in one array\r
static HBRUSH hbrHist[3] = { NULL, NULL, NULL };\r
\r
+Boolean EvalGraphIsUp()\r
+{\r
+ return evalGraphDialogUp;\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
static void DrawSegment( int x, int y, int *lastX, int *lastY, int penType )\r
{\r
break;\r
\r
/* Support for captionless window */\r
-#if 0\r
- case WM_NCLBUTTONDBLCLK:\r
- if( wParam == HTCAPTION ) {\r
- int index;\r
- POINT mouse_xy;\r
- POINTS pts = MAKEPOINTS(lParam);\r
-\r
- mouse_xy.x = pts.x;\r
- mouse_xy.y = pts.y;\r
- ScreenToClient( hDlg, &mouse_xy );\r
-\r
- index = GetMoveIndexFromPoint( mouse_xy.x, mouse_xy.y );\r
-\r
- if( index >= 0 && index < currLast ) {\r
- ToNrEvent( index + 1 );\r
- }\r
- }\r
- break;\r
-\r
- case WM_NCHITTEST:\r
- {\r
- LRESULT res = DefWindowProc( hDlg, message, wParam, lParam );\r
-\r
- if( res == HTCLIENT ) res = HTCAPTION;\r
-\r
- SetWindowLong( hDlg, DWL_MSGRESULT, res );\r
-\r
- return TRUE;\r
- }\r
- break;\r
-#endif\r
-\r
case WM_CLOSE:\r
EvalGraphPopDown();\r
break;\r