Mercurial > vba-linux
diff src/win32/CmdAccelOb.h @ 1:f9f4f1b99eed
importing src directory
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 03 Mar 2012 10:31:27 -0600 |
parents | |
children |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/win32/CmdAccelOb.h Sat Mar 03 10:31:27 2012 -0600 1.3 @@ -0,0 +1,110 @@ 1.4 +//////////////////////////////////////////////////////////////////////////////// 1.5 +// Copyright (C) 1998 by Thierry Maurel 1.6 +// All rights reserved 1.7 +// 1.8 +// Distribute freely, except: don't remove my name from the source or 1.9 +// documentation (don't take credit for my work), mark your changes (don't 1.10 +// get me blamed for your possible bugs), don't alter or remove this 1.11 +// notice. 1.12 +// No warrantee of any kind, express or implied, is included with this 1.13 +// software; use at your own risk, responsibility for damages (if any) to 1.14 +// anyone resulting from the use of this software rests entirely with the 1.15 +// user. 1.16 +// 1.17 +// Send bug reports, bug fixes, enhancements, requests, flames, etc., and 1.18 +// I'll try to keep a version up to date. I can be reached as follows: 1.19 +// tmaurel@caramail.com (or tmaurel@hol.fr) 1.20 +// 1.21 +//////////////////////////////////////////////////////////////////////////////// 1.22 +// File : CmdAccelOb.h 1.23 +// Project : AccelsEditor 1.24 +//////////////////////////////////////////////////////////////////////////////// 1.25 +// Version : 1.0 * Author : T.Maurel 1.26 +// Date : 17.08.98 1.27 +// 1.28 +// Remarks : 1.29 +// 1.30 +//////////////////////////////////////////////////////////////////////////////// 1.31 +#ifndef __CMDACCEL_OB_INCLUDE 1.32 +#define __CMDACCEL_OB_INCLUDE 1.33 + 1.34 +#if _MSC_VER > 1000 1.35 +#pragma once 1.36 +#endif // _MSC_VER > 1000 1.37 + 1.38 +#include <afxtempl.h> // MFC Templates extension 1.39 + 1.40 +//////////////////////////////////////////////////////////////////////// 1.41 +// 1.42 +// 1.43 +typedef struct tagMAPVIRTKEYS 1.44 +{ 1.45 + WORD wKey; 1.46 + TCHAR szKey[15]; 1.47 +} MAPVIRTKEYS, *PMAPVIRTKEYS; 1.48 + 1.49 +//////////////////////////////////////////////////////////////////////// 1.50 +// 1.51 +// 1.52 +#define sizetable(table) (sizeof(table)/sizeof(table[0])) 1.53 + 1.54 +//////////////////////////////////////////////////////////////////////// 1.55 +// 1.56 +// 1.57 +class CAccelsOb : public CObject 1.58 +{ 1.59 +public: 1.60 + CAccelsOb(); 1.61 + CAccelsOb(CAccelsOb*pFrom); 1.62 + CAccelsOb(BYTE cVirt, WORD wKey, bool bLocked = false); 1.63 + CAccelsOb(LPACCEL pACCEL); 1.64 +public: 1.65 + CAccelsOb & operator=(const CAccelsOb& from); 1.66 + 1.67 + void GetString(CString& szBuffer); 1.68 + bool IsEqual(WORD wKey, bool bCtrl, bool bAlt, bool bShift); 1.69 + DWORD GetData(); 1.70 + bool SetData(DWORD dwDatas); 1.71 +public: 1.72 +#ifdef _DEBUG 1.73 + virtual void AssertValid() const; 1.74 + virtual void Dump(CDumpContext& dc) const; 1.75 +#endif 1.76 +public: 1.77 + BYTE m_cVirt; 1.78 + WORD m_wKey; 1.79 + bool m_bLocked; 1.80 +}; 1.81 + 1.82 +////////////////////////////////////////////////////////////////////// 1.83 +// 1.84 +// 1.85 +class CCmdAccelOb : public CObject 1.86 +{ 1.87 +public: 1.88 + CCmdAccelOb(); 1.89 + CCmdAccelOb(WORD wIDCommand, LPCTSTR szCommand); 1.90 + CCmdAccelOb(BYTE cVirt, WORD wIDCommand, WORD wKey, LPCTSTR szCommand, bool bLocked = false); 1.91 + ~CCmdAccelOb(); 1.92 +public: 1.93 + void Add(CAccelsOb*pAccel); 1.94 + void Add(BYTE cVirt, WORD wKey, bool bLocked = false); 1.95 + void Reset(); 1.96 + void DeleteUserAccels(); 1.97 + 1.98 + CCmdAccelOb & operator=(const CCmdAccelOb& from); 1.99 +public: 1.100 +#ifdef _DEBUG 1.101 + virtual void AssertValid() const; 1.102 + virtual void Dump(CDumpContext& dc) const; 1.103 +#endif 1.104 +public: 1.105 + WORD m_wIDCommand; 1.106 + CString m_szCommand; 1.107 + 1.108 + CList< CAccelsOb *, CAccelsOb * & > m_Accels; 1.109 +}; 1.110 + 1.111 +//////////////////////////////////////////////////////////////////////// 1.112 +#endif // __CMDACCEL_OB_INCLUDE 1.113 +