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__
35 int m_nShiftPixels
; /* amount to shift with each new point */
38 char m_strXUnitsString
[50];
39 char m_strYUnitsString
[50];
41 COLORREF m_crBackColor
; /* background color */
42 COLORREF m_crGridColor
; /* grid color */
43 COLORREF m_crPlotColor
[MAX_PLOTS
]; /* data color */
45 double m_dCurrentPosition
[MAX_PLOTS
]; /* current position */
46 double m_dPreviousPosition
[MAX_PLOTS
]; /* previous position */
48 /* those were protected fields */
49 int m_nHalfShiftPixels
;
50 int m_nPlotShiftPixels
;
56 double m_dLowerLimit
; /* lower bounds */
57 double m_dUpperLimit
; /* upper bounds */
59 double m_dVerticalFactor
;
65 HBITMAP m_bitmapOldGrid
;
66 HBITMAP m_bitmapOldPlot
;
70 HPEN m_penPlot
[MAX_PLOTS
];
75 extern WNDPROC OldGraphCtrlWndProc
;
76 double GraphCtrl_AppendPoint(TGraphCtrl
* this,
77 double dNewPoint0
, double dNewPoint1
,
78 double dNewPoint2
, double dNewPoint3
);
79 void GraphCtrl_Create(TGraphCtrl
* this, HWND hWnd
, HWND hParentWnd
, UINT nID
);
80 void GraphCtrl_Reset(TGraphCtrl
* this);
81 void GraphCtrl_SetBackgroundColor(TGraphCtrl
* this, COLORREF
83 void GraphCtrl_SetGridColor(TGraphCtrl
* this, COLORREF color
);
84 void GraphCtrl_SetPlotColor(TGraphCtrl
* this, int plot
, COLORREF
86 void GraphCtrl_SetRange(TGraphCtrl
* this, double dLower
, double
87 dUpper
, int nDecimalPlaces
);
89 INT_PTR CALLBACK
GraphCtrl_WndProc(HWND hWnd
, UINT message
, WPARAM wParam
, LPARAM lParam
);
95 #endif /* __GRAPH_CTRL_H__ */