-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSpecAlignView.h
107 lines (92 loc) · 2.53 KB
/
SpecAlignView.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
// SpecAlignView.h : interface of the CSpecAlignView class
//
#pragma once
#include "ntspec.h"
#include "fullView.h"
#include "SpecAlignDoc.h"
class CSpecAlignView : public CScrollView
{
protected: // create from serialization only
CSpecAlignView();
DECLARE_DYNCREATE(CSpecAlignView)
// Attributes
public:
CSpecAlignDoc* GetDocument() const;
fullView allSpec;
ntspec spectra[5000];
//vector <ntspec> spectra;
ntspec avg;
bool displayAvg;
bool m_Track;
bool m_Zoom;
bool m_Crop;
bool m_Pick;
bool m_Rem;
double lrange;
bool vAll;
bool fDraw;
private:
bool created;
unsigned int numSpec;
unsigned int tnumSpec;
// Operations
public:
void DoZoom(CPoint point);
void DoPan(CPoint point);
void DoPick(CPoint pt);
void UnZoom();
void DoCursor();
void clearBackups();
void viewAllSpec(bool fastDraw);
// Overrides
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual void OnInitialUpdate(); // called first time after construct
virtual void OnUpdate(CView *pSender,LPARAM lHint, CObject *pHint);
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
// Implementation
public:
virtual ~CSpecAlignView();
int updateScroll();
void updatePane(int cx);
void updateSrn(int cx, int cy);
void drawSpec(bool reRange, bool fastDraw);
void drawAnno();
void drawPeaks();
void drawBase();
bool drawModels();
void rmSpec(int pos);
void moveSpec(int oldp, int newp);
void setUnStackVisible();
void createAvg();
void removeBase();
void removeModels();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
void createSpec();
// Generated message map functions
protected:
//{{AFX_MSG(CSpecAlignView)
afx_msg void OnSize(UINT nType, int cx, int cy);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
public:
// afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnParentNotify(UINT message, LPARAM lParam);
// afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
// afx_msg void OnNcLButtonUp(UINT nHitTest, CPoint point);
// afx_msg void OnMouseMove(UINT nFlags, CPoint point);
virtual BOOL OnScroll(UINT nScrollCode, UINT nPos, BOOL bDoScroll = TRUE);
afx_msg void OnGetMinMaxInfo(MINMAXINFO* lpMMI);
};
#ifndef _DEBUG // debug version in SpecAlignView.cpp
inline CSpecAlignDoc* CSpecAlignView::GetDocument() const
{ return reinterpret_cast<CSpecAlignDoc*>(m_pDocument); }
#endif