view src/win32/CmdAccelOb.h @ 4:5f6f2134e8ce

apu appears to not be used
author Robert McIntyre <rlm@mit.edu>
date Sat, 03 Mar 2012 10:35:58 -0600
parents f9f4f1b99eed
children
line wrap: on
line source
1 ////////////////////////////////////////////////////////////////////////////////
2 // Copyright (C) 1998 by Thierry Maurel
3 // All rights reserved
4 //
5 // Distribute freely, except: don't remove my name from the source or
6 // documentation (don't take credit for my work), mark your changes (don't
7 // get me blamed for your possible bugs), don't alter or remove this
8 // notice.
9 // No warrantee of any kind, express or implied, is included with this
10 // software; use at your own risk, responsibility for damages (if any) to
11 // anyone resulting from the use of this software rests entirely with the
12 // user.
13 //
14 // Send bug reports, bug fixes, enhancements, requests, flames, etc., and
15 // 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.h
20 // Project : AccelsEditor
21 ////////////////////////////////////////////////////////////////////////////////
22 // Version : 1.0 * Author : T.Maurel
23 // Date : 17.08.98
24 //
25 // Remarks :
26 //
27 ////////////////////////////////////////////////////////////////////////////////
28 #ifndef __CMDACCEL_OB_INCLUDE
29 #define __CMDACCEL_OB_INCLUDE
31 #if _MSC_VER > 1000
32 #pragma once
33 #endif // _MSC_VER > 1000
35 #include <afxtempl.h> // MFC Templates extension
37 ////////////////////////////////////////////////////////////////////////
38 //
39 //
40 typedef struct tagMAPVIRTKEYS
41 {
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 CObject
55 {
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 _DEBUG
70 virtual void AssertValid() const;
71 virtual void Dump(CDumpContext& dc) const;
72 #endif
73 public:
74 BYTE m_cVirt;
75 WORD m_wKey;
76 bool m_bLocked;
77 };
79 //////////////////////////////////////////////////////////////////////
80 //
81 //
82 class CCmdAccelOb : public CObject
83 {
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 _DEBUG
98 virtual void AssertValid() const;
99 virtual void Dump(CDumpContext& dc) const;
100 #endif
101 public:
102 WORD m_wIDCommand;
103 CString m_szCommand;
105 CList< CAccelsOb *, CAccelsOb * & > m_Accels;
106 };
108 ////////////////////////////////////////////////////////////////////////
109 #endif // __CMDACCEL_OB_INCLUDE