Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
cGraphPenProps.h
Go to the documentation of this file.
1 //
4 //
5 
6 #ifndef _INC_GraphPenProps_H
7 #define _INC_GraphPenProps_H
8 #ifndef NO_PRAGMA_ONCE
9 #pragma once
10 #endif
11 
12 #include "../CGraphCfg.h"
13 
14 #ifdef _MFC_VER
15 namespace GrayGraph
16 {
17 
18 class CGraphPagePenXDisp : public CPropertyPage
19 {
20  DECLARE_DYNCREATE(CGraphPagePenXDisp)
21 
22 // Construction
23 public:
24  CGraphPagePenXDisp();
25  ~CGraphPagePenXDisp();
26 
27 // Dialog Data
28  //{{AFX_DATA(CGraphPagePenXDisp)
29  enum { IDD = IDD_GRAPH_PEN_X_DISP };
30  CStatic m_wndPointStyleLabel;
31  CComboBox m_wndPointStyle;
32  CComboBox m_wndStyle;
33  CTreeCtrl m_wndColorSample;
34  CString m_sLabel;
35  int m_iPointStyle;
36  int m_iStyle;
37  BOOL m_fMasked;
38  BOOL m_bShowExp;
39  BOOL m_bShowAvg;
40  //}}AFX_DATA
41 
42  COLORREF m_Color;
43  COLORREF m_ColorPrv;
44  int m_iFontHeight;
45 
46  void CheckConflictingColors();
47  void EnableControls();
48  bool SetLabelDefault();
49 
50 // Overrides
51  // ClassWizard generate virtual function overrides
52  //{{AFX_VIRTUAL(CGraphPagePenXDisp)
53  public:
54  virtual BOOL OnSetActive();
55  virtual BOOL OnApply();
56  protected:
57  virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
58  //}}AFX_VIRTUAL
59 
60 // Implementation
61 protected:
62  // Generated message map functions
63  //{{AFX_MSG(CGraphPagePenXDisp)
64  afx_msg void OnPenDColor();
65  afx_msg void OnSelchangePenDStyle();
66  afx_msg void OnAnyChange();
67  afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
68  afx_msg void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct);
69  //}}AFX_MSG
70  DECLARE_MESSAGE_MAP()
71 };
73 // CGraphPagePenXSrc dialog
74 
75 class CGraphPagePenXSrc : public CPropertyPage
76 {
77  DECLARE_DYNCREATE(CGraphPagePenXSrc)
78 
79 // Construction
80 public:
81  CGraphPagePenXSrc();
82  ~CGraphPagePenXSrc();
83 
84  bool m_fSrcInit;
85  CGraphDataSource m_Src;
86 
87  void EnableControls();
88  void OnAnyChange();
89  void UpdateSelectionObject();
90 
91 // Dialog Data
92  //{{AFX_DATA(CGraphPagePenXSrc)
93  enum { IDD = IDD_GRAPH_PEN_X_SRC };
94  CWnd m_wndSelectCtl;
95  CStatic m_wndSelectLbl;
96  CEdit m_wndUnits;
97  BOOL m_bShowUnits;
98  CString m_sUnits;
99  //}}AFX_DATA
100 
101 // Overrides
102  // ClassWizard generate virtual function overrides
103  //{{AFX_VIRTUAL(CGraphPagePenXSrc)
104  public:
105  virtual BOOL OnSetActive();
106  virtual BOOL OnApply();
107  protected:
108  virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
109  //}}AFX_VIRTUAL
110 
111 // Implementation
112 protected:
113  // Generated message map functions
114  //{{AFX_MSG(CGraphPagePenXSrc)
115  afx_msg void OnPenSUnitShow();
116  //}}AFX_MSG
117  DECLARE_MESSAGE_MAP()
118 };
119 
121 // CGraphPagePenXRange dialog
122 
123 class CGraphPagePenXRange : public CPropertyPage
124 {
125  DECLARE_DYNCREATE(CGraphPagePenXRange)
126 
127 // Construction
128 public:
129  CGraphPagePenXRange();
130  ~CGraphPagePenXRange();
131  void UpdateValidData();
132 
133 // Dialog Data
134  //{{AFX_DATA(CGraphPagePenXRange)
135  enum { IDD = IDD_GRAPH_PEN_X_RANGE };
136  CButton m_wndFitValue;
137  CButton m_wndFitTime;
138  CDateTimeCtrl m_wndTimeStop2;
139  CDateTimeCtrl m_wndTimeStop1;
140  CDateTimeCtrl m_wndTimeStart2;
141  CDateTimeCtrl m_wndTimeStart1;
142  CTime m_TimeStartDate;
143  CTime m_TimeStartTime;
144  CTime m_TimeStopDate;
145  CTime m_TimeStopTime;
146  CString m_sValMax;
147  CString m_sValMin;
148  BOOL m_fTimeScaleSync;
149  BOOL m_fPenUnitSync;
150  CString m_sSamples;
151  //}}AFX_DATA
152 
153 // Overrides
154  // ClassWizard generate virtual function overrides
155  //{{AFX_VIRTUAL(CGraphPagePenXRange)
156  public:
157  virtual BOOL OnApply();
158  virtual BOOL OnSetActive();
159  protected:
160  virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
161  //}}AFX_VIRTUAL
162 
163 // Implementation
164 protected:
165  // Generated message map functions
166  //{{AFX_MSG(CGraphPagePenXRange)
167  afx_msg void OnDatetimechangePenSTimeStart(NMHDR* pNMHDR, LRESULT* pResult);
168  afx_msg void OnDatetimechangePenSTimeStart2(NMHDR* pNMHDR, LRESULT* pResult);
169  afx_msg void OnDatetimechangePenSTimeStop(NMHDR* pNMHDR, LRESULT* pResult);
170  afx_msg void OnDatetimechangePenSTimeStop2(NMHDR* pNMHDR, LRESULT* pResult);
171  afx_msg void OnPenRFitTime();
172  afx_msg void OnPenRFitVal();
173  virtual BOOL OnInitDialog();
174  afx_msg void OnAnyChange();
175  //}}AFX_MSG
176  DECLARE_MESSAGE_MAP()
177 };
178 
180 // CGraphPenProps
181 
182 class CGraphPen;
183 class CGraphProps;
184 class CGraphWnd;
185 
186 class CGraphPenProps : public CPropertySheet
187 {
189  DECLARE_DYNAMIC(CGraphPenProps)
190 
191 // Construction
192 public:
193  CGraphPenProps(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage,
194  CGraphCfg* pCfg,
195  CGraphPenCfg* pPenCfg,
196  CGraphPen* pPenWnd );
197 
198  CGraphCfg* m_pCfg; // The parent CGraphCfg this is coming from.
199  CGraphPenCfg* m_pPenCfg; // What pen Cfg are we editing ?
200  CGraphPen* m_pPenWnd; // This is a live active pen.
201 
202 // Attributes
203 public:
204  CGraphPagePenXDisp m_PenXDisp;
205  CGraphPagePenXSrc m_PenXSrc;
206  CGraphPagePenXRange m_PenXRange;
207 
208 // Operations
209 public:
210  void OnModifiedFlag();
211  CWnd* GetTrueParent() const;
212  CGraphWnd * GetTrendWindow();
213 
214 // Overrides
215  // ClassWizard generated virtual function overrides
216  //{{AFX_VIRTUAL(CGraphPenProps)
217  //}}AFX_VIRTUAL
218 
219 // Implementation
220 public:
221  virtual ~CGraphPenProps();
222 
223  // Generated message map functions
224 protected:
225  //{{AFX_MSG(CGraphPenProps)
226  //}}AFX_MSG
227  DECLARE_MESSAGE_MAP()
228 };
229 
231 
232 //{{AFX_INSERT_LOCATION}}
233 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
234 };
235 #endif
236 #endif // !defined(_INC_GraphPenProps_H)
#define IDD_GRAPH_PEN_X_SRC
Definition: resource.h:34
#define IDD_GRAPH_PEN_X_DISP
Definition: resource.h:33
#define IDD_GRAPH_PEN_X_RANGE
Definition: resource.h:5
#define DECLARE_DYNAMIC(c)
Definition: cObject.h:105
UINT32 COLORREF
ABGR (high to low bits)
Definition: cVariantData.h:21
Definition: GrayGraph.cpp:29
cWndHandle CWnd
Definition: cWndHandle.h:669
cString CString
Definition: cString.h:639