5 #ifndef _INC_GraphWnd_H
6 #define _INC_GraphWnd_H
11 #include "../CGraphCfg.h"
19 class CGraphRulerTime;
20 class CGraphRulerScale;
21 class CGraphIntervals;
23 #pragma warning( disable : 4244 )
39 bool m_bActiveUpdateMode;
40 bool m_bGroupViewMode;
42 CGraphIntervals* m_pCoordsX;
43 CGraphIntervals* m_pCoordsY;
56 CGraphLabel* m_pwndLabel;
57 CGraphPlot* m_pwndPlot;
58 CGraphRulerTime* m_pwndTime;
59 CGraphRulerScale* m_pwndScale;
62 static int sm_iPrvPenPropPage;
68 void DebugGenerateTestData();
77 void OnInitMenuBase(CMenu* pMenu);
78 BOOL OnCommandBase(WPARAM wParam, LPARAM lParam);
79 void CreatePropsSheet();
83 bool isActveUpdateMode()
const
85 return(m_bActiveUpdateMode);
87 void setActiveUpdateMode(
bool fActive);
88 bool isEditMode()
const
92 void setEditMode(
bool fEditMode);
93 bool isGroupViewMode()
const
95 return m_bGroupViewMode;
97 void setGroupViewMode(
bool fGroupViewMode);
100 void SetActivePen(
ITERATE_t iPen,
bool fChangeForce =
false);
101 int getActivePenIndex()
const
105 const CGraphPen* getActivePenPtr()
const
107 return GetPen(m_iActivePen);
111 const CGraphPen* GetPen(
ITERATE_t i)
const;
112 void DeleteAllPenWnds();
114 int getPenQty()
const
116 return(m_aPens.GetSize());
118 CGraphPenCfg* GetPenCfg(
ITERATE_t i)
const;
123 bool GetPensBoundRect(
CGraphRect& rectBound)
const;
126 void SetCfg(CGraphCfg * pCfg);
127 CGraphCfg* get_Cfg()
const
134 void UpdateRulerTitles(BOOL fXAxis, BOOL fRedraw);
137 void GetViewActualRect(
CGraphRect& rectView)
const
139 rectView = m_rectViewActual;
143 rectView = m_rectView;
145 void SetViewRectFromPenCfg(CGraphPenCfg * pPenCfg);
146 void SetViewRectNow(
const CGraphRect& rectView);
151 return m_rectView.left;
155 return m_rectView.right;
159 return m_rectViewActual.left;
163 return m_rectViewActual.right;
168 return m_rectViewActual.top;
172 return m_rectViewActual.bottom;
176 CGraphIntervals * get_CoordsX();
177 CGraphIntervals * get_CoordsY();
179 virtual INT_PTR OnToolHitTest(
CPoint point, TOOLINFO* pTI)
const;
185 virtual void Serialize(
CArchive& ar);
187 virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
191 virtual void OnModifiedFlag();
192 virtual void OnViewChange();
193 virtual void OnActveUpdateModeChange();
197 virtual ~CGraphWnd();
202 afx_msg
void OnPaint();
203 afx_msg
int OnCreate(LPCREATESTRUCT lpCreateStruct);
204 afx_msg
void OnContextMenu(
CWnd* pWnd,
CPoint point);
205 afx_msg
void OnSize(UINT nType,
int cx,
int cy);
206 afx_msg BOOL OnEraseBkgnd(CDC* pDC);
207 afx_msg
void OnInitMenu(CMenu* pMenu);
208 afx_msg
void OnTimer(UINT_PTR nIDEvent);
209 afx_msg
void OnDestroy();
211 DECLARE_MESSAGE_MAP()
214 #pragma warning( default : 4244 )
#define GRAYGRAPH_LINK
Definition: GrayGraph.h:19
#define ASSERT(exp)
Definition: cDebugAssert.h:87
Definition: cArchive.h:20
Definition: GrayGraph.cpp:29
double GraphVal_t
this is the value type we are plotting. Must also be able to hold GraphTime_t.
Definition: cGraphCfg.h:66
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
cPoint2i CPoint
Compatible with MFC 2d CPoint,CRect.
Definition: cPoint2.h:65
int ITERATE_t
like size_t but signed
Definition: Index.h:28
UINT32 TIMESYS_t
TIMESYS_t = The normal system tick timer. milli-seconds since start of system/app ?
Definition: cTimeSys.h:27