Mercurial > vba-linux
comparison src/win32/Joypad.h @ 1:f9f4f1b99eed
importing src directory
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 03 Mar 2012 10:31:27 -0600 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
0:8ced16adf2e1 | 1:f9f4f1b99eed |
---|---|
1 #if !defined(AFX_JOYPAD_H__FFFB2470_9EEC_4D2D_A5F0_3BF31579999A__INCLUDED_) | |
2 #define AFX_JOYPAD_H__FFFB2470_9EEC_4D2D_A5F0_3BF31579999A__INCLUDED_ | |
3 | |
4 #if _MSC_VER > 1000 | |
5 #pragma once | |
6 #endif // _MSC_VER > 1000 | |
7 // -*- C++ -*- | |
8 // Joypad.h : header file | |
9 // | |
10 | |
11 ///////////////////////////////////////////////////////////////////////////// | |
12 // JoypadEditControl window | |
13 | |
14 class JoypadEditControl : public CEdit | |
15 { | |
16 // Construction | |
17 public: | |
18 JoypadEditControl(); | |
19 | |
20 // Attributes | |
21 public: | |
22 // Operations | |
23 public: | |
24 // Overrides | |
25 // ClassWizard generated virtual function overrides | |
26 //{{AFX_VIRTUAL(JoypadEditControl) | |
27 //}}AFX_VIRTUAL | |
28 | |
29 // Implementation | |
30 public: | |
31 virtual BOOL PreTranslateMessage(MSG *pMsg); | |
32 afx_msg LRESULT OnJoyConfig(WPARAM wParam, LPARAM lParam); | |
33 virtual ~JoypadEditControl(); | |
34 | |
35 // Generated message map functions | |
36 protected: | |
37 //{{AFX_MSG(JoypadEditControl) | |
38 afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags); | |
39 //}}AFX_MSG | |
40 | |
41 DECLARE_MESSAGE_MAP() | |
42 }; | |
43 | |
44 ///////////////////////////////////////////////////////////////////////////// | |
45 | |
46 ///////////////////////////////////////////////////////////////////////////// | |
47 // JoypadConfig dialog | |
48 | |
49 class JoypadConfig : public CDialog | |
50 { | |
51 // Construction | |
52 public: | |
53 void assignKeys(); | |
54 void assignKey(int id, int key); | |
55 JoypadConfig(int w, CWnd*pParent = NULL); // standard constructor | |
56 | |
57 // Dialog Data | |
58 //{{AFX_DATA(JoypadConfig) | |
59 enum { IDD = IDD_CONFIG }; | |
60 JoypadEditControl up; | |
61 JoypadEditControl speed; | |
62 JoypadEditControl right; | |
63 JoypadEditControl left; | |
64 JoypadEditControl down; | |
65 JoypadEditControl capture; | |
66 JoypadEditControl buttonStart; | |
67 JoypadEditControl buttonSelect; | |
68 JoypadEditControl buttonR; | |
69 JoypadEditControl buttonL; | |
70 JoypadEditControl buttonGS; | |
71 JoypadEditControl buttonB; | |
72 JoypadEditControl buttonA; | |
73 //}}AFX_DATA | |
74 | |
75 // Overrides | |
76 // ClassWizard generated virtual function overrides | |
77 //{{AFX_VIRTUAL(JoypadConfig) | |
78 protected: | |
79 virtual void DoDataExchange(CDataExchange*pDX); // DDX/DDV support | |
80 //}}AFX_VIRTUAL | |
81 | |
82 // Implementation | |
83 protected: | |
84 UINT timerId; | |
85 int which; | |
86 | |
87 // Generated message map functions | |
88 //{{AFX_MSG(JoypadConfig) | |
89 afx_msg void OnCancel(); | |
90 afx_msg void OnOk(); | |
91 afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags); | |
92 afx_msg void OnDestroy(); | |
93 afx_msg void OnTimer(UINT nIDEvent); | |
94 afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); | |
95 virtual BOOL OnInitDialog(); | |
96 //}}AFX_MSG | |
97 DECLARE_MESSAGE_MAP() | |
98 }; | |
99 ///////////////////////////////////////////////////////////////////////////// | |
100 // MotionConfig dialog | |
101 | |
102 class MotionConfig : public CDialog | |
103 { | |
104 // Construction | |
105 public: | |
106 void assignKeys(); | |
107 void assignKey(int id, int key); | |
108 MotionConfig(CWnd*pParent = NULL); // standard constructor | |
109 | |
110 // Dialog Data | |
111 //{{AFX_DATA(MotionConfig) | |
112 enum { IDD = IDD_MOTION_CONFIG }; | |
113 JoypadEditControl up; | |
114 JoypadEditControl right; | |
115 JoypadEditControl left; | |
116 JoypadEditControl down; | |
117 //}}AFX_DATA | |
118 | |
119 // Overrides | |
120 // ClassWizard generated virtual function overrides | |
121 //{{AFX_VIRTUAL(MotionConfig) | |
122 protected: | |
123 virtual void DoDataExchange(CDataExchange*pDX); // DDX/DDV support | |
124 //}}AFX_VIRTUAL | |
125 | |
126 // Implementation | |
127 protected: | |
128 // Generated message map functions | |
129 //{{AFX_MSG(MotionConfig) | |
130 afx_msg void OnCancel(); | |
131 afx_msg void OnOk(); | |
132 afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags); | |
133 afx_msg void OnDestroy(); | |
134 virtual BOOL OnInitDialog(); | |
135 afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); | |
136 afx_msg void OnTimer(UINT nIDEvent); | |
137 //}}AFX_MSG | |
138 DECLARE_MESSAGE_MAP() | |
139 private: | |
140 UINT timerId; | |
141 }; | |
142 //{{AFX_INSERT_LOCATION}} | |
143 // Microsoft Visual C++ will insert additional declarations immediately before the previous line. | |
144 | |
145 #endif // !defined(AFX_JOYPAD_H__FFFB2470_9EEC_4D2D_A5F0_3BF31579999A__INCLUDED_) |