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

  1. // trackerDoc.h : interface of the CTrackerDoc class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4.  
  5. #if !defined(AFX_TRACKERDOC_H__6647B059_FDFF_4D77_96A7_BA437A318857__INCLUDED_)
  6. #define AFX_TRACKERDOC_H__6647B059_FDFF_4D77_96A7_BA437A318857__INCLUDED_
  7.  
  8. #if _MSC_VER > 1000
  9. #pragma once
  10. #endif // _MSC_VER > 1000
  11.  
  12.  
  13. #include "optionsdlg.h"
  14. #include "gtkformat.h"
  15. #include <windows.h>
  16.  
  17.  
  18. // steffo
  19. #include <mmsystem.h>
  20.  
  21.  
  22.  
  23. #include <mmreg.h>
  24. #include <dsound.h>
  25.  
  26. #include "isPlayer.h"
  27. #include "isSynth.h"
  28.  
  29. #define GTK_EDITSTATE_DEFAULT 0x0
  30. #define GTK_EDITSTATE_PATTERNSELECT 0x01
  31. #define GTK_EDITSTATE_TRACKSELECT 0x02
  32.  
  33. typedef struct EDITDATA EDITDATA;
  34. typedef struct EDT_CURSOR EDT_CURSOR;
  35. typedef struct EDTCOPYBUFFER EDTCOPYBUFFER;
  36. #ifndef VK_OEM_102
  37. #define VK_OEM_102        0xE2  //  "<>" or "\|" on RT 102-key kbd.
  38. #endif
  39.  
  40. struct EDTCOPYBUFFER
  41. {
  42.   int hasdata;
  43.   int colnum,posnum;
  44.   GTK_PATTERNPOS **poslist;
  45.     
  46. };
  47. struct EDT_CURSOR
  48. {
  49.   int num,pos,col,rowcol;
  50. };
  51. struct EDITDATA
  52. {
  53.     int trkpos,trkcol,trknum,trkposadd;
  54.     int patpos,patcol,patnum,patposadd;
  55.     int octave;
  56.   int state;
  57.   int patternmark;
  58.   EDT_CURSOR beginmark,endmark;
  59.   EDTCOPYBUFFER copybuffer;
  60. };
  61.  
  62.  
  63. class CTrackerDoc : public CDocument
  64. {
  65. protected: // create from serialization only
  66.     CTrackerDoc();
  67.     DECLARE_DYNCREATE(CTrackerDoc)
  68.  
  69. // Attributes
  70. public:
  71.     int playing;
  72.     int play_seqpos,play_pattern, play_patternrow;
  73.     isPlayer *pl;
  74.   isSynth *synth;
  75.  
  76.     CString curFname;
  77.     EDITDATA editData;
  78.     //GTK_SONG song;
  79.     GTK *gtk;
  80.  
  81.  
  82.     COLORREF ctrl_bg,ctrl_light,ctrl_dark,ctrl_text,ctrl_curtext,ctrl_cursor,ctrl_marktext;
  83.     _TCHAR fontface[128];
  84.     int ctrl_latency;
  85.  
  86.  
  87. // Operations
  88. public:
  89.     void ValidateEditData ();
  90.  
  91. // Overrides
  92.     // ClassWizard generated virtual function overrides
  93.     //{{AFX_VIRTUAL(CTrackerDoc)
  94.     public:
  95.     virtual BOOL OnNewDocument();
  96.     virtual void Serialize(CArchive& ar);
  97.     //}}AFX_VIRTUAL
  98.  
  99. // Implementation
  100. public:
  101.     void LoadConfig (void);
  102.     void SaveConfig (void);
  103.     virtual ~CTrackerDoc();
  104. #ifdef _DEBUG
  105.     virtual void AssertValid() const;
  106.     virtual void Dump(CDumpContext& dc) const;
  107. #endif
  108.  
  109. protected:
  110.  
  111. // Generated message map functions
  112. public:
  113.     //{{AFX_MSG(CTrackerDoc)
  114.     afx_msg void OnMenuOptions();
  115.     afx_msg void OnFileSave();
  116.     afx_msg void OnFileSaveAs();
  117.     afx_msg void OnFileOpen();
  118.     afx_msg void OnMenuSongoptions();
  119.     afx_msg void OnDeltaposSpinTcntrlPjump(NMHDR* pNMHDR, LRESULT* pResult);
  120.     afx_msg void OnMenuSampleview();
  121.     afx_msg void OnMenuMixerview();
  122.     afx_msg void OnMenuSendfxeditor();
  123.     afx_msg void OnMenuSamplepool();
  124.     //}}AFX_MSG
  125.     DECLARE_MESSAGE_MAP()
  126. };
  127.  
  128. /////////////////////////////////////////////////////////////////////////////
  129.  
  130. //{{AFX_INSERT_LOCATION}}
  131. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  132.  
  133. #endif // !defined(AFX_TRACKERDOC_H__6647B059_FDFF_4D77_96A7_BA437A318857__INCLUDED_)
  134.