home *** CD-ROM | disk | FTP | other *** search
/ Xentax forum attachments archive / xentax.7z / 8090 / ModelEdit.7z / KeyframeWnd.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-03-08  |  3.9 KB  |  139 lines

  1. #if !defined(AFX_KEYFRAMEWND_H__59C0D230_2C80_11D1_9462_0020AFF7CDC1__INCLUDED_)
  2. #define AFX_KEYFRAMEWND_H__59C0D230_2C80_11D1_9462_0020AFF7CDC1__INCLUDED_
  3.  
  4. #if _MSC_VER >= 1000
  5. #pragma once
  6. #endif // _MSC_VER >= 1000
  7. // KeyframeWnd.h : header file
  8. //
  9.  
  10.  
  11. class CModelEditDlg;
  12.  
  13. /////////////////////////////////////////////////////////////////////////////
  14. // CKeyframeWnd window
  15.  
  16. class CKeyframeWnd : public CWnd
  17. {
  18. // Construction
  19. public:
  20.     CKeyframeWnd();
  21.  
  22. // Attributes
  23. public:
  24.  
  25.     CMoArray<BOOL>    m_Tagged;    // Track what keyframes are tagged.
  26.     DWORD            m_iWnd;        // Which keyframe window are we?
  27.  
  28. protected:
  29.  
  30.     CDC            m_dcOffscreen;
  31.     CBitmap        m_bmpOffscreen;
  32.     CBitmap*    m_pOldBmpOffscreen;
  33.  
  34.     CDC            m_dcTopMarker;
  35.     CBitmap        m_bmpTopMarker;
  36.     CBitmap*    m_pOldBmpTopMarker;
  37.  
  38.     CDC            m_dcBottomMarker;
  39.     CBitmap        m_bmpBottomMarker;
  40.     CBitmap*    m_pOldBmpBottomMarker;
  41.  
  42.     CRect        m_rcTopMarker;
  43.     CRect        m_rcBottomMarker;
  44.     CRect        m_rcKeyframes;
  45.     
  46.     CBrush        m_brBackground;
  47.  
  48.     ModelAnim*    m_pModelAnim;
  49.     DWORD        m_nCurrentTime;
  50.     CMoArray<int>    m_XVal;
  51.  
  52.     BOOL        m_bTracking;
  53.     BOOL        m_bSelectionBox;
  54.     CPoint        m_ptOld;
  55.  
  56.     CPoint        m_ptStartBox;
  57.     CPoint        m_ptEndBox;
  58.  
  59.     COLORREF    m_crKeyframe;
  60.     COLORREF    m_crKeyframeString;
  61.     COLORREF    m_crTaggedKeyframe;
  62.     COLORREF    m_crTaggedKeyframeString;
  63.  
  64.     // Tracks whether the window has been selected.
  65.     // Basically chooses whether the animation controls affect this window.
  66.     BOOL        m_bActive;
  67.  
  68.     //this function will verify that this operation can be performed given the current animation
  69.     //settings, and will inform the user and return false if it cannot
  70.     bool        CanPerformOperation(const char* pszDescription);
  71.  
  72.  
  73. // Operations
  74. public:
  75.  
  76.     inline CModelEditDlg* GetModelEditDlg()    {return (CModelEditDlg*)GetParent();}
  77.  
  78.     // Change active status.
  79.     BOOL            IsActive()                {return m_bActive;}
  80.     void            SetActive(BOOL bActive)    {m_bActive = bActive;}
  81.  
  82.     // Initialize tagged array to the size of our animation.
  83.     BOOL            InitTaggedArray();
  84.  
  85.     void            SetAnim (ModelAnim* pAnim);
  86.     ModelAnim*        GetAnim() {return m_pModelAnim;}
  87.  
  88.     void            SetTime (DWORD nCurrentTime);
  89.     DWORD            ForceNearestKeyframe();
  90.     void            RemoveKeyframe (DWORD nKeyframe);
  91.     void            MoveKeyframe (DWORD nDst, DWORD nSrc);
  92.     void            DoEditKeyframeTime( DWORD nKeyframe, DWORD dwNewKeyframeTime );
  93.     void            DoEditKeyframeString( DWORD nKeyframe, CString &sFrameString );
  94.     DWORD            GetNearestKeyframe( int x );
  95.     BOOL            DoTagKeyframes( DWORD nStartKeyframe, DWORD nEndKeyframe, BOOL bForce = FALSE, BOOL bTag = TRUE );
  96.     void            Redraw( );
  97.  
  98. // Overrides
  99.     // ClassWizard generated virtual function overrides
  100.     //{{AFX_VIRTUAL(CKeyframeWnd)
  101.     //}}AFX_VIRTUAL
  102.  
  103. // Implementation
  104. public:
  105.     virtual ~CKeyframeWnd();
  106.  
  107.     // Generated message map functions
  108. protected:
  109.     //{{AFX_MSG(CKeyframeWnd)
  110.     afx_msg void OnPaint();
  111.     afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  112.     afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
  113.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  114.     afx_msg void OnDestroy();
  115.     afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  116.     afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  117.     afx_msg void OnClipAfter();
  118.     afx_msg void OnClipBefore();
  119.     afx_msg void OnTagKeyframe();
  120.     afx_msg void OnTagAll();
  121.     afx_msg void OnUnTagAll();
  122.     afx_msg void OnInsertTimeDelay();
  123.     afx_msg void OnUntagKeyframe();
  124.     afx_msg void OnEditKeyframeTime();
  125.     afx_msg void OnDeleteKeyframe();
  126.     afx_msg void OnDeleteTaggedKeyframes();
  127.     afx_msg void OnEditTaggedKeyframeString();
  128.     afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
  129.     //}}AFX_MSG
  130.     DECLARE_MESSAGE_MAP()
  131. };
  132.  
  133. /////////////////////////////////////////////////////////////////////////////
  134.  
  135. //{{AFX_INSERT_LOCATION}}
  136. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  137.  
  138. #endif // !defined(AFX_KEYFRAMEWND_H__59C0D230_2C80_11D1_9462_0020AFF7CDC1__INCLUDED_)
  139.