www.pudn.com > Gesture[20040824].rar > GestureView.h
// GestureView.h : interface of the CGestureView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_GESTUREVIEW_H__04D983F5_08A6_426E_BA39_38F386AA6867__INCLUDED_)
#define AFX_GESTUREVIEW_H__04D983F5_08A6_426E_BA39_38F386AA6867__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "gestureDoc.h"
typedef enum
{ Empty , ShowBkgImage, ShowHandAvi , ShowBkgAvi ,
ShowThreshImage , ShowFeatureImage , ShowCompositedImage }
ShowStatus;
typedef enum {Stopped, Paused, Playing} AviStatus;
class CGestureView : public CView
{
private:
CRect m_BkgAviWin, m_HandAviWin, m_BkgImageWin, m_ResultWin;
AviStatus m_AviState;
ShowStatus m_ShowState;
bool m_bPlayingLoop;
public:
void InitializeShowingWindows( CImage *image );
void SetAviStatus (AviStatus status) { m_AviState = status; }
void SetShowStatus(ShowStatus status){ m_ShowState = status; }
BOOL CanPlay() { return ( m_AviState==Stopped || m_AviState==Paused ) && m_ShowState>ShowBkgImage; };
BOOL CanStop() { return m_AviState==Playing || m_AviState==Paused; };
BOOL CanPause() { return m_AviState==Playing || m_AviState==Stopped; };
void SetMediaPlay();
void SetMediaPause();
void SetMediaStop();
protected: // create from serialization only
CGestureView();
DECLARE_DYNCREATE(CGestureView)
// Attributes
public:
CGestureDoc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CGestureView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CGestureView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CGestureView)
afx_msg void OnShowBkgvideo();
afx_msg void OnUpdateShowBkgvideo(CCmdUI* pCmdUI);
afx_msg void OnShowHandvideo();
afx_msg void OnUpdateShowHandvideo(CCmdUI* pCmdUI);
afx_msg void OnMediaNextframe();
afx_msg void OnUpdateMediaNextframe(CCmdUI* pCmdUI);
afx_msg void OnMediaPause();
afx_msg void OnUpdateMediaPause(CCmdUI* pCmdUI);
afx_msg void OnMediaPlay();
afx_msg void OnUpdateMediaPlay(CCmdUI* pCmdUI);
afx_msg void OnMediaPrevframe();
afx_msg void OnUpdateMediaPrevframe(CCmdUI* pCmdUI);
afx_msg void OnMediaStop();
afx_msg void OnUpdateMediaStop(CCmdUI* pCmdUI);
afx_msg void OnShowThresholdresult();
afx_msg void OnUpdateShowThresholdresult(CCmdUI* pCmdUI);
afx_msg void OnShowFeatureresult();
afx_msg void OnUpdateShowFeatureresult(CCmdUI* pCmdUI);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in GestureView.cpp
inline CGestureDoc* CGestureView::GetDocument()
{ return (CGestureDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_GESTUREVIEW_H__04D983F5_08A6_426E_BA39_38F386AA6867__INCLUDED_)