0028316: Coding Rules - Elimilate confusing aliases of Standard_Real type in V3d_View
[occt.git] / samples / mfc / standard / 09_Animation / src / AnimationView3D.h
CommitLineData
7fd59977 1// AnimationView.h : interface of the CAnimationView3D class
2//
3/////////////////////////////////////////////////////////////////////////////
4
5#if !defined(AFX_ANIMATIONVIEW3D_H__79840E88_1001_11D2_B8C1_0000F87A77C1_3D_INCLUDED_)
6#define AFX_ANIMATIONVIEW3D_H__79840E88_1001_11D2_B8C1_0000F87A77C1_3D_INCLUDED_
7
8#if _MSC_VER >= 1000
9#pragma once
10#endif // _MSC_VER >= 1000
11
12#include "Tune.h"
13#include "AnimationDoc.h"
14#include "..\..\Common\res\OCC_Resource.h"
15
16enum View3D_CurrentAction {
17 CurrentAction3d_Nothing,
18 CurrentAction3d_DynamicZooming,
19 CurrentAction3d_WindowZooming,
20 CurrentAction3d_DynamicPanning,
21 CurrentAction3d_GlobalPanning,
22 CurrentAction3d_DynamicRotation,
23 CurrentAction3d_Fly,
24 CurrentAction3d_Turn
25};
26
27class CAnimationView3D : public CView
28{
29protected: // create from serialization only
30 CAnimationView3D();
31 DECLARE_DYNCREATE(CAnimationView3D)
32
33// Attributes
34public:
35 CAnimationDoc* GetDocument();
36
37// Operations
38public:
39
40// Overrides
41 // ClassWizard generated virtual function overrides
42 //{{AFX_VIRTUAL(CAnimationView3D)
43 public:
44 void FitAll() { if ( !myView.IsNull() ) myView->FitAll(); myView->ZFitAll(); };
45 virtual void OnDraw(CDC* pDC); // overridden to draw this view
46 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
47 virtual void OnInitialUpdate(); // CasCade
48 protected:
49
50 //}}AFX_VIRTUAL
51
52// Implementation
53public:
54 virtual ~CAnimationView3D();
55#ifdef _DEBUG
56 virtual void AssertValid() const;
57 virtual void Dump(CDumpContext& dc) const;
58#endif
59 void SetDimensions ();
60 void ReloadData();
61 CTune m_Tune;
b5ac8292 62 void SetFocal (double theFocus, double theAngle);
7fd59977 63 void Fly (int x , int y);
64 void Turn (int x , int y);
65 void Roll (int x , int y);
66 void Twist (int x , int y);
67
68protected:
69 double m_dAngle;
70 BOOL m_bShift;
71 int m_cx , m_cy ;
72 int m_curx , m_cury ;
73
74// Generated message map functions
75protected:
76 //{{AFX_MSG(CAnimationView3D)
77 afx_msg void OnBUTTONAxo();
78 afx_msg void OnBUTTONBack();
79 afx_msg void OnBUTTONBottom();
80 afx_msg void OnBUTTONFront();
81 afx_msg void OnBUTTONHlrOff();
82 afx_msg void OnBUTTONHlrOn();
83 afx_msg void OnBUTTONLeft();
84 afx_msg void OnBUTTONPan();
85 afx_msg void OnBUTTONPanGlo();
86 afx_msg void OnBUTTONReset();
87 afx_msg void OnBUTTONRight();
88 afx_msg void OnBUTTONRot();
89 afx_msg void OnBUTTONTop();
90 afx_msg void OnBUTTONZoomAll();
91 afx_msg void OnFileExportImage();
92 afx_msg void OnSize(UINT nType, int cx, int cy);
93 afx_msg void OnBUTTONZoomProg();
94 afx_msg void OnBUTTONZoomWin();
95 afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
96 afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
97 afx_msg void OnMButtonDown(UINT nFlags, CPoint point);
98 afx_msg void OnMButtonUp(UINT nFlags, CPoint point);
99 afx_msg void OnMouseMove(UINT nFlags, CPoint point);
100 afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
101 afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
102 afx_msg void OnUpdateBUTTONHlrOff(CCmdUI* pCmdUI);
103 afx_msg void OnUpdateBUTTONHlrOn(CCmdUI* pCmdUI);
104 afx_msg void OnUpdateBUTTONPanGlo(CCmdUI* pCmdUI);
105 afx_msg void OnUpdateBUTTONPan(CCmdUI* pCmdUI);
106 afx_msg void OnUpdateBUTTONZoomProg(CCmdUI* pCmdUI);
107 afx_msg void OnUpdateBUTTONZoomWin(CCmdUI* pCmdUI);
108 afx_msg void OnUpdateBUTTONRot(CCmdUI* pCmdUI);
109
110 afx_msg void OnChangeBackground();
111 afx_msg void OnTimer(UINT_PTR nIDEvent);
112
113 afx_msg void OnSensitivity();
114 afx_msg void OnBUTTONFly();
115 afx_msg void OnBUTTONTurn();
116 afx_msg void OnUpdateBUTTONFly(CCmdUI* pCmdUI);
117 afx_msg void OnUpdateBUTTONTurn(CCmdUI* pCmdUI);
118 afx_msg void OnViewDisplaystatus();
119 afx_msg void OnUpdateViewDisplaystatus(CCmdUI* pCmdUI);
120 //}}AFX_MSG
121
122public :
123 afx_msg void OnStop();
124 afx_msg void OnRestart();
125protected:
126
127 DECLARE_MESSAGE_MAP()
128private:
92efcf78 129 Handle(V3d_View) myView;
7fd59977 130public:
92efcf78 131 Handle(V3d_View)& GetView() { return myView;};
7fd59977 132 void DisplayTuneDialog();
133private:
de75ed09 134 Standard_Integer myXmin;
135 Standard_Integer myYmin;
136 Standard_Integer myXmax;
137 Standard_Integer myYmax;
ee2be2a8 138 Standard_Real myCurZoom;
de75ed09 139 Standard_Boolean myHlrModeIsOn;
140
de75ed09 141 View3D_CurrentAction myCurrentMode;
142 double m_Atx , m_Aty , m_Atz ;
143 double m_Eyex , m_Eyey , m_Eyez ;
144 double m_FlySens ;
145 double m_TurnSens ;
146 double m_Focus ;
7fd59977 147
148private:
149 enum LineStyle { Solid, Dot, ShortDash, LongDash, Default };
150 CPen* m_Pen;
151 virtual void DrawRectangle (const Standard_Integer MinX ,
152 const Standard_Integer MinY ,
153 const Standard_Integer MaxX ,
154 const Standard_Integer MaxY ,
155 const Standard_Boolean Draw ,
156 const LineStyle aLineStyle = Default );
157};
158
159#ifndef _DEBUG // debug version in AnimationView.cpp
160inline CAnimationDoc* CAnimationView3D::GetDocument()
161 { return (CAnimationDoc*)m_pDocument; }
162#endif
163
164/////////////////////////////////////////////////////////////////////////////
165
166//{{AFX_INSERT_LOCATION}}
167// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
168
169#endif // !defined(AFX_ANIMATIONVIEW3D_H__79840E88_1001_11D2_B8C1_0000F87A77C1_3D_INCLUDED_)