-//////////////////////////////////////////////////////////////////////\r
-// CXkeymacsData Class\r
-//////////////////////////////////////////////////////////////////////\r
-\r
-//////////////////////////////////////////////////////////////////////\r
-// Construction/Destruction\r
-//////////////////////////////////////////////////////////////////////\r
-\r
-CXkeymacsData::CXkeymacsData()\r
-{\r
- ClearAll();\r
-}\r
-\r
-CXkeymacsData::~CXkeymacsData()\r
-{\r
-\r
-}\r
-\r
-// set application name\r
-void CXkeymacsData::SetApplicationName(LPCTSTR lpszApplicationName)\r
-{\r
- m_strApplicationName.Format(lpszApplicationName);\r
-}\r
-\r
-// return application name\r
-CString CXkeymacsData::GetApplicationName()\r
-{\r
- return m_strApplicationName;\r
-}\r
-\r
-// set hook or not\r
-void CXkeymacsData::SetCommandID(int nCommandType, int nKey, int nCommandID)\r
-{\r
- ASSERT(0 <= nCommandType || nCommandType < MAX_COMMAND_TYPE);\r
- ASSERT(0 <= nKey || nKey < MAX_KEY);\r
-\r
- m_nCommandID[nCommandType][nKey] = nCommandID;\r
-}\r
-\r
-// return hook or not\r
-int CXkeymacsData::GetCommandID(int nCommandType, int nKey)\r
-{\r
- ASSERT(0 <= nCommandType || nCommandType < MAX_COMMAND_TYPE);\r
- ASSERT(0 <= nKey || nKey < MAX_KEY);\r
-\r
- return m_nCommandID[nCommandType][nKey];\r
-}\r
-\r
-// set hook at ibeam cursor only or not\r
-void CXkeymacsData::SetAtIbeamCursorOnly(int nCommandType, int nKey, BOOL bAtIbeamCursorOnly)\r
-{\r
- ASSERT(0 <= nCommandType || nCommandType < MAX_COMMAND_TYPE);\r
- ASSERT(0 <= nKey || nKey < MAX_KEY);\r
-\r
- m_bAtIbeamCursorOnly[nCommandType][nKey] = bAtIbeamCursorOnly;\r
-}\r
-\r
-// get hook at ibeam cursor only or not\r
-BOOL CXkeymacsData::GetAtIbeamCursorOnly(int nCommandType, int nKey)\r
-{\r
- ASSERT(0 <= nCommandType || nCommandType < MAX_COMMAND_TYPE);\r
- ASSERT(0 <= nKey || nKey < MAX_KEY);\r
-\r
- return m_bAtIbeamCursorOnly[nCommandType][nKey];\r
-}\r
-\r
-// clear all data\r
-void CXkeymacsData::ClearAll()\r
-{\r
- ZeroMemory(m_nCommandID, sizeof(m_nCommandID));\r
- ZeroMemory(m_bAtIbeamCursorOnly, sizeof(m_bAtIbeamCursorOnly));\r
- m_strApplicationName.Empty();\r
-}\r
-\r