-
Notifications
You must be signed in to change notification settings - Fork 2
/
OnStationView.h
220 lines (209 loc) · 8.05 KB
/
OnStationView.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
// OnStationView.h : interface of the COnStationView class
//
/////////////////////////////////////////////////////////////////////////////
#include "settings.h"
#include "gworld.h"
#include "compasswidget.h"
#include "nodetree.h"
enum TRACKTYPE {T_LEFT,T_LEFTSHIFT,T_LEFTCONTROL,T_RIGHT,T_RIGHTSHIFT,T_RIGHTCONTROL};
class COnStationView : public CView
{
private:
void SetColorTable(HDC hdcMemory);
//What is our window on this system?
float m_fRotateClockwise;
float m_fRotateTilt;
float m_fXPan;
float m_fYPan;
float m_fZPan;
float m_fMetersPerCM;
void HandlePrintOfView(CDC * pDC,CRect rPrintedPage,float fLeft,float fTop,float fRight,float fBottom/*,int iYpos*/);
void TrackMouse(TRACKTYPE T, CPoint oldPoint);
BOOL m_bRotatingSystem;
BOOL m_bTopHalf;
float m_fMouseConvertX;
float m_fMouseConvertY;
//Clips to the appropriate half of the screen
//depending on the view mode and so forth
BOOL ClipCursor(CPoint oldPoint);
void OnRotateDelta(int iX,int iY);
void OnMoveDelta(int iX,int iY,int iZ);
void OnZoomDelta(int iZoom);
CRect GetMyClientArea();
CRect GetMyBottomClientArea();
#ifdef _DEBUG
void SetupTestGeometry();
#endif
protected: // create from serialization only
HGLRC m_hRC; // Rendering Context
HDC m_hDC; // Device Context
CPalette m_GLPalette; // Logical Palette
COnStationView();
DECLARE_DYNCREATE(COnStationView)
CGWorld * m_MyGWorld;
CCompassWidget m_Compass;
#ifdef _DEBUG
void PerformanceMetrics();
#endif
//printer support
void GetPrintedPageBoundaries(CRect * rPage,int iPageNumber,float * fLeft,float *fTop,float *fRight,float *fBottom);
void GetPrinterInformation(CDC *dc);
int m_nPageWidth;
int m_nPageHeight;
int m_iWidthInPages;
int m_iHeightInPages;
int m_iTopFudge; //The fudge variables show how much extra was added to
int m_iBottomFudge; //make room for rulers and the like
int m_iLeftFudge;
int m_iRightFudge;
CQuery * m_pType;
CQuery * m_pComment;
CRect m_PrintedAreaRectangle;
BOOL m_bAnimate; //Auto rotate the cave if this is set.
int m_iAnimateDeltaX;
int m_iAnimateDeltaY;
void GLRenderScene(int iHalf=0);
void GLSetupRC(void *pData);
void InitializePalette(void);
void DrawGDIOverlay(CDC * pDC,int iHalfOfScreen);
// Attributes
public:
COnStationDoc* GetDocument();
void DeleteContents();
void SetCommentQuery(CQuery *pType,CQuery * pComment);
void ShowCompass(BOOL bShowCompass);
void SetExactView(float fClockwise,float fTilt,float fScale, float fDx,float fDy,float fDz);
void RedrawView();
// Operations
public:
BOOL OnQueryNewPalette();
void OnPaletteChanged(CWnd* pFocusWnd);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(COnStationView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual void OnPrint(CDC *,CPrintInfo *);
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
virtual void OnInitialUpdate();
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
virtual void OnEndPrintPreview(CDC* pDC, CPrintInfo* pInfo, POINT point, CPreviewView* pView);
//}}AFX_VIRTUAL
void SetScalingAndLighting(int iHalf=0);
BOOL GetViewportAndExtents(int iHalf,CRect * pViewPort,float * fLeft,float *fRight,float *fTop,float *fBottom);
void OnSize(UINT nType, int cx, int cy);
// Implementation
public:
virtual ~COnStationView();
void RecalculateGeometry(BOOL bGeometry);
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
void UpdateColorScheme(CCmdUI *pCmdUI,int iIndex);
public:
void RefreshStatusIndicators(CMainFrame *frm);
void PickColorScheme(int iIndex);
// Generated message map functions
protected:
//{{AFX_MSG(COnStationView)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnUpdateDrawmodeBlunderColoring(CCmdUI* pCmdUI);
afx_msg void OnDrawmodeBlunderColoring();
afx_msg void OnUpdateDrawmodeAgecoloring(CCmdUI* pCmdUI);
afx_msg void OnDrawmodeAgecoloring();
afx_msg void OnFilePrintPreview();
afx_msg void OnExportDxf();
afx_msg void OnUpdateDrawmodeDepthcoding(CCmdUI* pCmdUI);
afx_msg void OnDrawmodeDepthcoding();
afx_msg void OnUpdateDrawmodePerspective(CCmdUI* pCmdUI);
afx_msg void OnDrawmodePerspective();
afx_msg void OnUpdateViewNamenone(CCmdUI* pCmdUI);
afx_msg void OnViewNamenone();
afx_msg void OnQueryBlunders();
afx_msg void OnUpdateViewNamejunctions(CCmdUI* pCmdUI);
afx_msg void OnViewNamejunctions();
afx_msg void OnUpdateViewNameall(CCmdUI* pCmdUI);
afx_msg void OnViewNameall();
afx_msg void OnViewSetexactview();
afx_msg void OnMovementProfileview();
afx_msg void OnUpdateMovementProfileview(CCmdUI* pCmdUI);
afx_msg void OnMovementPlanview();
afx_msg void OnUpdateMovementPlanview(CCmdUI* pCmdUI);
afx_msg void OnMovementMixedview();
afx_msg void OnUpdateMovementMixedview(CCmdUI* pCmdUI);
afx_msg void OnMovementFreeformview();
afx_msg void OnUpdateMovementFreeformview(CCmdUI* pCmdUI);
afx_msg void OnUpdateViewSurfaceoverlay(CCmdUI* pCmdUI);
afx_msg void OnViewSurfaceoverlay();
afx_msg void OnViewSurfaceandlocationsurveys();
afx_msg void OnUpdateViewSurfaceandlocationsurveys(CCmdUI* pCmdUI);
afx_msg void OnViewCloseloops();
afx_msg void OnUpdateViewCloseloops(CCmdUI* pCmdUI);
afx_msg void OnEditConfigurecolors();
afx_msg void OnViewPassageoptions();
afx_msg void OnDrawmodeColorscheme1();
afx_msg void OnUpdateDrawmodeColorscheme1(CCmdUI* pCmdUI);
afx_msg void OnDrawmodeColorscheme2();
afx_msg void OnUpdateDrawmodeColorscheme2(CCmdUI* pCmdUI);
afx_msg void OnDrawmodeColorscheme3();
afx_msg void OnUpdateDrawmodeColorscheme3(CCmdUI* pCmdUI);
afx_msg void OnDrawmodeColorscheme4();
afx_msg void OnUpdateDrawmodeColorscheme4(CCmdUI* pCmdUI);
afx_msg void OnDrawmodeColorscheme5();
afx_msg void OnUpdateDrawmodeColorscheme5(CCmdUI* pCmdUI);
afx_msg void OnDrawmodeColorscheme6();
afx_msg void OnUpdateDrawmodeColorscheme6(CCmdUI* pCmdUI);
afx_msg void OnDrawmodeColorscheme7();
afx_msg void OnUpdateDrawmodeColorscheme7(CCmdUI* pCmdUI);
afx_msg void OnDrawmodeColorscheme8();
afx_msg void OnUpdateDrawmodeColorscheme8(CCmdUI* pCmdUI);
afx_msg void OnEditOrphanedshots();
afx_msg void OnUpdateEditOrphanedshots(CCmdUI* pCmdUI);
afx_msg void OnViewInformation();
afx_msg void OnEditBookmarks();
afx_msg void OnOptionsMarkfixedpoints();
afx_msg void OnUpdateOptionsMarkfixedpoints(CCmdUI* pCmdUI);
afx_msg void OnOptionsClosureerrors();
afx_msg void OnShowReferenceGrid();
afx_msg void OnUpdateShowReferenceGrid(CCmdUI * pCmdUI);
afx_msg void OnZoomIn();
afx_msg void OnZoomOut();
afx_msg void OnMenuNorth();
afx_msg void OnMenuSouth();
afx_msg void OnMenuEast();
afx_msg void OnMenuWest();
afx_msg void OnMenuRotateLeft();
afx_msg void OnMenuRotateRight();
afx_msg void OnMenuTiltForward();
afx_msg void OnMenuTiltBack();
afx_msg void OnUpdateOptionsClosureerrors(CCmdUI* pCmdUI);
afx_msg void OnFilePrintingpreferences();
afx_msg void OnFileExportvrmlfile();
afx_msg void OnEditSearchstationcomments();
afx_msg void OnViewFullscreen();
afx_msg void OnViewFullscreenEsckey();
afx_msg void OnDestroy();
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnViewportStartingposition();
afx_msg void OnSearchShowstation();
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
afx_msg void OnViewAnimate();
afx_msg void OnUpdateViewAnimate(CCmdUI* pCmdUI);
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnViewDistancebetweenstations();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in OnStationView.cpp
inline COnStationDoc* COnStationView::GetDocument()
{ return (COnStationDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////