Mercurial > vba-clojure
view 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 source
1 ////////////////////////////////////////////////////////////////////////////////2 // Copyright (C) 1998 by Thierry Maurel3 // All rights reserved4 //5 // Distribute freely, except: don't remove my name from the source or6 // documentation (don't take credit for my work), mark your changes (don't7 // get me blamed for your possible bugs), don't alter or remove this8 // notice.9 // No warrantee of any kind, express or implied, is included with this10 // software; use at your own risk, responsibility for damages (if any) to11 // anyone resulting from the use of this software rests entirely with the12 // user.13 //14 // Send bug reports, bug fixes, enhancements, requests, flames, etc., and15 // I'll try to keep a version up to date. I can be reached as follows:16 // tmaurel@caramail.com (or tmaurel@hol.fr)17 //18 ////////////////////////////////////////////////////////////////////////////////19 // File : CmdAccelOb.h20 // Project : AccelsEditor21 ////////////////////////////////////////////////////////////////////////////////22 // Version : 1.0 * Author : T.Maurel23 // Date : 17.08.9824 //25 // Remarks :26 //27 ////////////////////////////////////////////////////////////////////////////////28 #ifndef __CMDACCEL_OB_INCLUDE29 #define __CMDACCEL_OB_INCLUDE31 #if _MSC_VER > 100032 #pragma once33 #endif // _MSC_VER > 100035 #include <afxtempl.h> // MFC Templates extension37 ////////////////////////////////////////////////////////////////////////38 //39 //40 typedef struct tagMAPVIRTKEYS41 {42 WORD wKey;43 TCHAR szKey[15];44 } MAPVIRTKEYS, *PMAPVIRTKEYS;46 ////////////////////////////////////////////////////////////////////////47 //48 //49 #define sizetable(table) (sizeof(table)/sizeof(table[0]))51 ////////////////////////////////////////////////////////////////////////52 //53 //54 class CAccelsOb : public CObject55 {56 public:57 CAccelsOb();58 CAccelsOb(CAccelsOb*pFrom);59 CAccelsOb(BYTE cVirt, WORD wKey, bool bLocked = false);60 CAccelsOb(LPACCEL pACCEL);61 public:62 CAccelsOb & operator=(const CAccelsOb& from);64 void GetString(CString& szBuffer);65 bool IsEqual(WORD wKey, bool bCtrl, bool bAlt, bool bShift);66 DWORD GetData();67 bool SetData(DWORD dwDatas);68 public:69 #ifdef _DEBUG70 virtual void AssertValid() const;71 virtual void Dump(CDumpContext& dc) const;72 #endif73 public:74 BYTE m_cVirt;75 WORD m_wKey;76 bool m_bLocked;77 };79 //////////////////////////////////////////////////////////////////////80 //81 //82 class CCmdAccelOb : public CObject83 {84 public:85 CCmdAccelOb();86 CCmdAccelOb(WORD wIDCommand, LPCTSTR szCommand);87 CCmdAccelOb(BYTE cVirt, WORD wIDCommand, WORD wKey, LPCTSTR szCommand, bool bLocked = false);88 ~CCmdAccelOb();89 public:90 void Add(CAccelsOb*pAccel);91 void Add(BYTE cVirt, WORD wKey, bool bLocked = false);92 void Reset();93 void DeleteUserAccels();95 CCmdAccelOb & operator=(const CCmdAccelOb& from);96 public:97 #ifdef _DEBUG98 virtual void AssertValid() const;99 virtual void Dump(CDumpContext& dc) const;100 #endif101 public:102 WORD m_wIDCommand;103 CString m_szCommand;105 CList< CAccelsOb *, CAccelsOb * & > m_Accels;106 };108 ////////////////////////////////////////////////////////////////////////109 #endif // __CMDACCEL_OB_INCLUDE