ReactOS  0.4.12-dev-14-gd0c8636
graphctl.h
Go to the documentation of this file.
1 /*
2  * ReactOS Task Manager
3  *
4  * graphctl.h
5  *
6  * Copyright (C) 2002 Robert Dickenson <robd@reactos.org>
7  *
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.
12  *
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.
17  *
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 Street, Fifth Floor, Boston, MA 02110-1301 USA
21  */
22 
23 #pragma once
24 
25 #define MAX_PLOTS 4
26 #define MAX_CTRLS 4
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 #if 0
33 
34 /* Attributes */
35 public:
36  void SetXUnits(const char* string);
37  void SetYUnits(const char* string);
38 
39  /* Operations */
40 public:
41  BOOL Create(DWORD dwStyle, const RECT& rect, HWND hParentWnd, UINT nID=NULL);
42 
43 #endif
44 
45 typedef struct
46 {
47  int m_nShiftPixels; /* amount to shift with each new point */
49 
50  char m_strXUnitsString[50];
51  char m_strYUnitsString[50];
52 
53  COLORREF m_crBackColor; /* background color */
54  COLORREF m_crGridColor; /* grid color */
55  COLORREF m_crPlotColor[MAX_PLOTS]; /* data color */
56 
57  double m_dCurrentPosition[MAX_PLOTS]; /* current position */
58  double m_dPreviousPosition[MAX_PLOTS]; /* previous position */
59 
60 /* those were protected fields */
67 
68  double m_dLowerLimit; /* lower bounds */
69  double m_dUpperLimit; /* upper bounds */
70  double m_dRange;
72 
81  HBRUSH m_brushBack;
82  HPEN m_penPlot[MAX_PLOTS];
85 } TGraphCtrl;
86 
89  double dNewPoint0, double dNewPoint1,
90  double dNewPoint2, double dNewPoint3);
91 void GraphCtrl_Create(TGraphCtrl* this, HWND hWnd, HWND hParentWnd,
92 UINT nID);
93 void GraphCtrl_Dispose(TGraphCtrl* this);
95 void GraphCtrl_InvalidateCtrl(TGraphCtrl* this, BOOL bResize);
97 void GraphCtrl_Reset(TGraphCtrl* this);
98 void GraphCtrl_Resize(TGraphCtrl* this);
100 color);
103 color);
104 void GraphCtrl_SetRange(TGraphCtrl* this, double dLower, double
105 dUpper, int nDecimalPlaces);
106 
108 
109 #ifdef __cplusplus
110 }
111 #endif
#define HDC
Definition: msvc.h:22
INT_PTR CALLBACK GraphCtrl_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: graphctl.c:543
void GraphCtrl_Dispose(TGraphCtrl *this)
Definition: graphctl.c:104
Definition: tftpd.h:59
WNDPROC OldGraphCtrlWndProc
Definition: graphctl.c:27
double GraphCtrl_AppendPoint(TGraphCtrl *this, double dNewPoint0, double dNewPoint1, double dNewPoint2, double dNewPoint3)
Definition: graphctl.c:357
#define HBITMAP
Definition: msvc.h:28
_In_ BOOLEAN Create
Definition: pstypes.h:511
#define CALLBACK
Definition: compat.h:27
HWND hWnd
Definition: settings.c:17
HBITMAP m_bitmapOldGrid
Definition: graphctl.h:77
int m_nPlotShiftPixels
Definition: graphctl.h:62
HDC dc
Definition: cylfrac.c:34
HBITMAP m_bitmapPlot
Definition: graphctl.h:80
int32_t INT_PTR
Definition: typedefs.h:62
int m_nShiftPixels
Definition: graphctl.h:47
void GraphCtrl_Resize(TGraphCtrl *this)
Definition: graphctl.c:496
& rect
Definition: startmenu.cpp:1413
WPARAM wParam
Definition: combotst.c:138
HWND m_hParentWnd
Definition: graphctl.h:74
double m_dUpperLimit
Definition: graphctl.h:69
#define MAX_PLOTS
Definition: graphctl.h:25
int m_nPlotHeight
Definition: graphctl.h:65
UINT_PTR WPARAM
Definition: windef.h:207
COLORREF m_crBackColor
Definition: graphctl.h:53
HDC m_dcGrid
Definition: graphctl.h:75
void GraphCtrl_InvalidateCtrl(TGraphCtrl *this, BOOL bResize)
Definition: graphctl.c:187
void GraphCtrl_Reset(TGraphCtrl *this)
HWND m_hWnd
Definition: graphctl.h:73
HBITMAP m_bitmapGrid
Definition: graphctl.h:79
GLuint color
Definition: glext.h:6243
LONG_PTR LPARAM
Definition: windef.h:208
int m_nYDecimals
Definition: graphctl.h:48
static void NAME() plot(struct gl_context *ctx, struct LineInfo *line, int ix, int iy)
Definition: s_aalinetemp.h:37
void GraphCtrl_SetGridColor(TGraphCtrl *this, COLORREF color)
Definition: graphctl.c:162
smooth NULL
Definition: ftsmooth.c:416
COLORREF m_crGridColor
Definition: graphctl.h:54
void GraphCtrl_SetBackgroundColor(TGraphCtrl *this, COLORREF color)
Definition: graphctl.c:178
int m_nPlotWidth
Definition: graphctl.h:66
unsigned int BOOL
Definition: ntddk_ex.h:94
int m_nClientWidth
Definition: graphctl.h:64
HBITMAP m_bitmapOldPlot
Definition: graphctl.h:78
unsigned int UINT
Definition: ndis.h:50
unsigned long DWORD
Definition: ntddk_ex.h:95
double m_dLowerLimit
Definition: graphctl.h:68
double m_dRange
Definition: graphctl.h:70
int m_nHalfShiftPixels
Definition: graphctl.h:61
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2859
RECT m_rectPlot
Definition: graphctl.h:84
double m_dVerticalFactor
Definition: graphctl.h:71
void GraphCtrl_SetPlotColor(TGraphCtrl *this, int plot, COLORREF color)
Definition: graphctl.c:169
RECT m_rectClient
Definition: graphctl.h:83
HBRUSH m_brushBack
Definition: graphctl.h:81
void GraphCtrl_Paint(TGraphCtrl *this, HWND hWnd, HDC dc)
Definition: graphctl.c:374
int m_nClientHeight
Definition: graphctl.h:63
void GraphCtrl_DrawPoint(TGraphCtrl *this)
Definition: graphctl.c:410
void GraphCtrl_Create(TGraphCtrl *this, HWND hWnd, HWND hParentWnd, UINT nID)
Definition: graphctl.c:123
DWORD COLORREF
Definition: windef.h:290
void GraphCtrl_SetRange(TGraphCtrl *this, double dLower, double dUpper, int nDecimalPlaces)
Definition: graphctl.c:134
HDC m_dcPlot
Definition: graphctl.h:76
LPARAM lParam
Definition: combotst.c:139