www.pudn.com > CurveEditor.rar > CurveEditorView.h
// CurveEditorView.h : interface of the CCurveEditorView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_CURVEEDITORVIEW_H__C64CACC5_8B89_11D3_B0A8_0000B436C984__INCLUDED_)
#define AFX_CURVEEDITORVIEW_H__C64CACC5_8B89_11D3_B0A8_0000B436C984__INCLUDED_
#include "..\aglib.h" // Added by ClassView
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "VectorOperator.h"
#include "CurveEditorDoc.h"
class CCurveEditorView : public CView
{
protected: // create from serialization only
CCurveEditorView();
DECLARE_DYNCREATE(CCurveEditorView)
// Attributes
public:
CCurveEditorDoc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CCurveEditorView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
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);
//}}AFX_VIRTUAL
// Implementation
public:
void OnAlwaysShowIntersection();
LONG OnMainFrameCommand(WPARAM wParam, LPARAM lParam);
void DrawAll();
LONG OnControlPadNotify(WPARAM wParam, LPARAM lParam);
virtual ~CCurveEditorView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
CDC m_dcMem;
CBitmap m_bmp, *m_pBmpOld;
CRect m_rectFront, m_rectLeft, m_rectTop, m_rectUser;
int m_cxWnd, m_cyWnd;
int m_cxScr, m_cyScr;
int m_nCurrentPane;
POSITION m_posPointCatched;
VECTOR m_vCtrlPointOld;
int m_nCurrentCurve;
COLORREF m_rgb[2];
VECTOR Pn, Px, Po;
double k, kOld;
double kNormal, kNormalOld;
double alpha, alphaOld;
double theta, thetaOld;
CPoint m_pointDown;
CPoint m_pointOld;
bool m_bScale;
bool m_bRotate;
bool m_bDown;
bool m_bAlwaysShowInts;
bool m_bAlwaysSplitPoint;
bool m_bShowTangent;
CPoint m_pointMouse;
HWND m_hWndObjects;
// Generated message map functions
protected:
void ChangeCurve(CPoint point);
bool m_bMoveIntersection;
void DrawSplitPoint();
void OnRotateView();
void OnScaleView();
void OnIncreaseCurveOrder();
void OnDecreaseCurveOrder();
int WhichPane(CPoint point);
VECTOR2D ProjectParallel(VECTOR& P1, VECTOR& Pn, VECTOR& Px);
void DrawCube();
void DrawCurve();
void DrawSplit();
//{{AFX_MSG(CCurveEditorView)
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnAlwaysShowSplitPoint();
afx_msg void OnUpdateAlwaysShowSplitPoint(CCmdUI* pCmdUI);
afx_msg void OnShowTangent();
afx_msg void OnUpdateShowTangent(CCmdUI* pCmdUI);
afx_msg void OnNewCurves();
afx_msg void OnMoveIntersection();
afx_msg void OnUpdateMoveIntersection(CCmdUI* pCmdUI);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in CurveEditorView.cpp
inline CCurveEditorDoc* CCurveEditorView::GetDocument()
{ return (CCurveEditorDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CURVEEDITORVIEW_H__C64CACC5_8B89_11D3_B0A8_0000B436C984__INCLUDED_)