5 #ifndef _INC_GraphPlot_H
6 #define _INC_GraphPlot_H
11 #include "../GrayGraph.h"
12 #include "../CGraphCoords.h"
21 enum GRAPH_CHANGE_TYPE
35 #define WM_USER_GRAPH_NOTIFICATION (WM_USER+1)
36 virtual ~CGraphChange()
40 class CGraphChangeScale :
public CGraphChange
48 class CGraphChangeData :
public CGraphChange
61 class CGraphPlot :
public CWnd
66 DECLARE_DYNCREATE(CGraphPlot)
73 CRect m_rectImageChanged;
80 cNewPtr<cRectTracker> m_pZoomRect;
89 void DrawAxis(CDC& DC);
91 void DrawGraphWindow(CDC* pDC,
CRect&
rect);
92 void OnZoomDrag(
CPoint point);
93 void OnChangeAddPointNow(CGraphChangeData* pChange);
95 void InvalidateGraphRect(
const CRect* prect =
nullptr);
99 virtual INT_PTR OnToolHitTest(
CPoint point, TOOLINFO* pTI);
104 CGraphPlot(CGraphWnd* parentWnd);
105 virtual ~CGraphPlot();
110 void DoFit(
int fitType);
114 BOOL PostChangeMsg(GRAPH_CHANGE_TYPE wParam, CGraphChange* lParam =
nullptr)
118 return PostMessage(WM_USER_GRAPH_NOTIFICATION, (WPARAM)wParam, (LPARAM)lParam);
121 bool get_AutoScale()
const
125 bool put_AutoScale(
bool fAutoScale);
126 bool get_AutoScroll()
const
128 return m_bAutoScroll;
130 bool put_AutoScroll(
bool fAutoScroll);
139 virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
145 virtual void AssertValid()
const;
146 virtual void Dump(CDumpContext& dc)
const;
152 afx_msg
void OnMouseMove(UINT nFlags,
CPoint point);
153 afx_msg
void OnSize(UINT nType,
int cx,
int cy);
154 afx_msg
int OnCreate(LPCREATESTRUCT lpCreateStruct);
155 afx_msg
void OnPaint();
156 afx_msg BOOL OnEraseBkgnd(CDC* pDC);
157 afx_msg
void OnLButtonDown(UINT nFlags,
CPoint point);
158 afx_msg BOOL OnSetCursor(
CWnd* pWnd, UINT nHitTest, UINT message);
159 afx_msg
void OnLButtonDblClk(UINT nFlags,
CPoint point);
160 afx_msg
void OnLButtonUp(UINT nFlags,
CPoint point);
161 afx_msg LRESULT OnChangeMsg(WPARAM wParam, LPARAM lParam);
162 afx_msg
void OnContextMenu(
CWnd* pWnd,
CPoint point);
163 afx_msg
void OnInitMenu(CMenu* pMenu);
165 DECLARE_MESSAGE_MAP()
Definition: GrayGraph.cpp:29
cRectT< GraphVal_t > CGraphRect
x/y rect or time/value rect.
Definition: cGraphCfg.h:67
cTimeFile CGraphTime
Definition: cGraphCfg.h:60
cRectI CRect
Compatible with MFC 2d CRect.
Definition: cRectI.h:243
cWndHandle CWnd
Definition: cWndHandle.h:669
interface const RECTQ_t & rect
Definition: cQuadtree.h:44
cPoint2i CPoint
Compatible with MFC 2d CPoint,CRect.
Definition: cPoint2.h:65
int ITERATE_t
like size_t but signed
Definition: Index.h:28
uint16 index
Definition: sample3.cpp:29