6 * Copyright (C) 2002 Robert Dickenson <robd@reactos.org>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 #ifndef __GRAPH_CTRL_H__
24 #define __GRAPH_CTRL_H__
37 void SetXUnits(const char* string);
38 void SetYUnits(const char* string);
42 BOOL Create(DWORD dwStyle, const RECT& rect, HWND hParentWnd, UINT nID=NULL);
48 int m_nShiftPixels; /* amount to shift with each new point */
51 char m_strXUnitsString[50];
52 char m_strYUnitsString[50];
54 COLORREF m_crBackColor; /* background color */
55 COLORREF m_crGridColor; /* grid color */
56 COLORREF m_crPlotColor[MAX_PLOTS]; /* data color */
58 double m_dCurrentPosition[MAX_PLOTS]; /* current position */
59 double m_dPreviousPosition[MAX_PLOTS]; /* previous position */
61 /* those were protected fields */
62 int m_nHalfShiftPixels;
63 int m_nPlotShiftPixels;
69 double m_dLowerLimit; /* lower bounds */
70 double m_dUpperLimit; /* upper bounds */
72 double m_dVerticalFactor;
78 HBITMAP m_bitmapOldGrid;
79 HBITMAP m_bitmapOldPlot;
83 HPEN m_penPlot[MAX_PLOTS];
88 extern WNDPROC OldGraphCtrlWndProc;
89 double GraphCtrl_AppendPoint(TGraphCtrl* this,
90 double dNewPoint0, double dNewPoint1,
91 double dNewPoint2, double dNewPoint3);
92 BOOL GraphCtrl_Create(TGraphCtrl* this, HWND hWnd, HWND hParentWnd,
94 void GraphCtrl_DrawPoint(TGraphCtrl* this);
95 void GraphCtrl_InvalidateCtrl(TGraphCtrl* this);
96 void GraphCtrl_Paint(TGraphCtrl* this, HWND hWnd, HDC dc);
97 void GraphCtrl_Reset(TGraphCtrl* this);
98 void GraphCtrl_Resize(TGraphCtrl* this);
99 void GraphCtrl_SetBackgroundColor(TGraphCtrl* this, COLORREF
101 void GraphCtrl_SetGridColor(TGraphCtrl* this, COLORREF color);
102 void GraphCtrl_SetPlotColor(TGraphCtrl* this, int plot, COLORREF
104 void GraphCtrl_SetRange(TGraphCtrl* this, double dLower, double
105 dUpper, int nDecimalPlaces);
107 INT_PTR CALLBACK GraphCtrl_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
113 #endif /* __GRAPH_CTRL_H__ */