home *** CD-ROM | disk | FTP | other *** search
/ Large Pack of OldSkool DOS MOD Trackers / beaversweeper_v101.zip / src / trackerView.h < prev    next >
C/C++ Source or Header  |  2003-01-06  |  4KB  |  118 lines

  1. // trackerView.h : interface of the CPatternView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4.  
  5. #if !defined(AFX_TRACKERVIEW_H__1BEC9C48_ADE4_468E_9694_C4FD06104F43__INCLUDED_)
  6. #define AFX_TRACKERVIEW_H__1BEC9C48_ADE4_468E_9694_C4FD06104F43__INCLUDED_
  7.  
  8. #if _MSC_VER > 1000
  9. #pragma once
  10. #endif // _MSC_VER > 1000
  11.  
  12.  
  13. #include "dblbuffView.h"
  14. #include "trackerDoc.h"
  15. #include "gtkformat.h"
  16. #include "MIDIReceptor.h"
  17.  
  18.  
  19. class CPatternView : public CDblBuffView, public MIDIReceptor
  20. {
  21.     protected: // create from serialization only
  22.         CPatternView();
  23.         DECLARE_DYNCREATE(CPatternView)
  24.  
  25.         int seqpatscr;
  26.         CScrollBar seqScroller,patScroller;        
  27.  
  28.     // Attributes
  29.     public:
  30.         CTrackerDoc* GetDocument();
  31.         int isPatternEdit;
  32.     
  33.         EDT_CURSOR seqCursor,patCursor;    
  34.         int seqPos, patternPos;
  35.     
  36.         GTK_SEQCHANNEL *seqChnPtr;
  37.         GTK_PATTERNPOS *patTrackPtr;
  38.  
  39. // Operations
  40. public:
  41.  
  42. // Overrides
  43.     // ClassWizard generated virtual function overrides
  44.     //{{AFX_VIRTUAL(CPatternView)
  45.     public:
  46.     virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  47.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  48.     virtual void OnInitialUpdate();
  49.     protected:
  50.     virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  51.     virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  52.     virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  53.     virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
  54.     virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView);
  55.     //}}AFX_VIRTUAL
  56.  
  57. // Implementation
  58. public:
  59.  
  60.     // <MIDI HANDLERS>
  61.     virtual void OnMIDIKeyDown( UINT key, UINT velocity );
  62.     virtual void OnMIDIKeyUp( UINT key, UINT velocity );
  63.     // </MIDI HANDLERS>
  64.  
  65.     void SetSequencerCursor (int val,int flag);
  66.     void MoveSequencerCursor (int val,int flag);
  67.   void ModifySequencerData (int val);
  68.  
  69.   void PatternInterpolate (int rowcol, int start_pos, int end_pos);///patCursor.rowcol,pDoc->editData.beginmark.pos,pDoc->editData.endmark.pos)
  70.     
  71.  
  72.   void PastePatternBlock();
  73.   void CopyPatternBlock();
  74.   void SetPatternCursor (int val,int flag);
  75.     void MovePatternCursor (int val,int flag);
  76.     int PatternProcessEditKey (int nChar, int ctrlflag);
  77.  
  78.  
  79.     void ProcessSequencerKey(UINT nChar, UINT nRepCnt, UINT nFlags);
  80.     void ProcessPatternKey(UINT nChar, UINT nRepCnt, UINT nFlags);
  81.     void DrawSequencer (CDC *pDC);
  82.     void DrawPattern (CDC *pDC);
  83.     virtual ~CPatternView();
  84. #ifdef _DEBUG
  85.     virtual void AssertValid() const;
  86.     virtual void Dump(CDumpContext& dc) const;
  87. #endif
  88.  
  89. protected:
  90.  
  91. // Generated message map functions
  92. public:
  93.     //{{AFX_MSG(CPatternView)
  94.     afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  95.     afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
  96.     afx_msg void OnSize(UINT nType, int cx, int cy);
  97.     afx_msg void OnActionPlay();
  98.     afx_msg void OnActionStop();
  99.     afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
  100.     afx_msg void OnEditCopy();
  101.     afx_msg void OnEditPaste();
  102.     afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
  103.     //}}AFX_MSG
  104.     DECLARE_MESSAGE_MAP()
  105. };
  106.  
  107. #ifndef _DEBUG  // debug version in trackerView.cpp
  108. inline CTrackerDoc* CPatternView::GetDocument()
  109.    { return (CTrackerDoc*)m_pDocument; }
  110. #endif
  111.  
  112. /////////////////////////////////////////////////////////////////////////////
  113.  
  114. //{{AFX_INSERT_LOCATION}}
  115. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  116.  
  117. #endif // !defined(AFX_TRACKERVIEW_H__1BEC9C48_ADE4_468E_9694_C4FD06104F43__INCLUDED_)
  118.