⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mixerkeydef.h

📁 miXo is a buzz machine (www.buzzmachines.com) - a plugin for the freely available jeskola buzz track
💻 H
字号:
// MixerKeyDef.h: interface for the CMixerKeyDef class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_MIXERKEYDEF_H__A326F3C5_4191_11D5_8DCF_BCDA7B7DD53C__INCLUDED_)
#define AFX_MIXERKEYDEF_H__A326F3C5_4191_11D5_8DCF_BCDA7B7DD53C__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include <mdk.h>
#include <string>
#include <deque>
#include "key.h"

typedef int TKey;
using namespace std;
class CMixerKeyTable;
class CMixerKeyDef  
{
	typedef deque<CKey> TLstKeys;
	TLstKeys m_lstKeys;
	int m_iId;
	string m_strName;
	unsigned m_uRefs;
	friend CMixerKeyTable;
	void SetId(int i) { m_iId=i; }
public:
	CMixerKeyDef(const char *szName,int iKeyPlus,int iKeyMinus,int iKeyMax,int iKeyMin);
	CMixerKeyDef() 
		: m_strName(),m_lstKeys(),m_uRefs(0),m_iId(-1) {};
	CMixerKeyDef(const string &s) : m_strName(s),m_lstKeys(),m_uRefs(0),m_iId(-1) {};
	CMixerKeyDef(const CMixerKeyDef &c) 
		: m_strName(c.m_strName),m_lstKeys(c.m_lstKeys),m_uRefs(c.m_uRefs),
		m_iId(c.m_iId) {};
	virtual ~CMixerKeyDef();
	void InvalidateIterators() {};
	int GetId() const { return m_iId; }
	void Save(CMachineDataOutput * const po);
	void Init(CMachineDataInput * const pi,unsigned);
	const string &GetName() const {return m_strName; }
	void RegisterUser() {m_uRefs++;}
	void UnregisterUser() {m_uRefs--;}
	bool IsInUse() const { if(m_uRefs) return true; else return false;}
	const char *GetDisplayKey(cmd::TCmd) const;
	string GetDisplayKeyAndErase(cmd::TCmd);
	bool IsNameEqual(const string &s) const ;
	bool IsKeyInDef(TKey k) { if(GetKeyClassByKey(k)) return true; else return false; }
	CKey *GetKeyClassByKey(TKey k);
	unsigned GetSize() const { return m_lstKeys.size(); }
	CKey *GetKey(int i) { return &m_lstKeys[i]; }
	void SetName(const string &s) { m_strName=s; }
	void AddKey(const CKey &c) {m_lstKeys.push_back(c); }
	void DeleteKey(CKey *);
protected:
};

#endif // !defined(AFX_MIXERKEYDEF_H__A326F3C5_4191_11D5_8DCF_BCDA7B7DD53C__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -