Mercurial > vba-clojure
diff 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 |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/win32/Joypad.h Sat Mar 03 10:31:27 2012 -0600 1.3 @@ -0,0 +1,145 @@ 1.4 +#if !defined(AFX_JOYPAD_H__FFFB2470_9EEC_4D2D_A5F0_3BF31579999A__INCLUDED_) 1.5 +#define AFX_JOYPAD_H__FFFB2470_9EEC_4D2D_A5F0_3BF31579999A__INCLUDED_ 1.6 + 1.7 +#if _MSC_VER > 1000 1.8 +#pragma once 1.9 +#endif // _MSC_VER > 1000 1.10 +// -*- C++ -*- 1.11 +// Joypad.h : header file 1.12 +// 1.13 + 1.14 +///////////////////////////////////////////////////////////////////////////// 1.15 +// JoypadEditControl window 1.16 + 1.17 +class JoypadEditControl : public CEdit 1.18 +{ 1.19 + // Construction 1.20 +public: 1.21 + JoypadEditControl(); 1.22 + 1.23 + // Attributes 1.24 +public: 1.25 + // Operations 1.26 +public: 1.27 + // Overrides 1.28 + // ClassWizard generated virtual function overrides 1.29 + //{{AFX_VIRTUAL(JoypadEditControl) 1.30 + //}}AFX_VIRTUAL 1.31 + 1.32 + // Implementation 1.33 +public: 1.34 + virtual BOOL PreTranslateMessage(MSG *pMsg); 1.35 + afx_msg LRESULT OnJoyConfig(WPARAM wParam, LPARAM lParam); 1.36 + virtual ~JoypadEditControl(); 1.37 + 1.38 + // Generated message map functions 1.39 +protected: 1.40 + //{{AFX_MSG(JoypadEditControl) 1.41 + afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags); 1.42 + //}}AFX_MSG 1.43 + 1.44 + DECLARE_MESSAGE_MAP() 1.45 +}; 1.46 + 1.47 +///////////////////////////////////////////////////////////////////////////// 1.48 + 1.49 +///////////////////////////////////////////////////////////////////////////// 1.50 +// JoypadConfig dialog 1.51 + 1.52 +class JoypadConfig : public CDialog 1.53 +{ 1.54 + // Construction 1.55 +public: 1.56 + void assignKeys(); 1.57 + void assignKey(int id, int key); 1.58 + JoypadConfig(int w, CWnd*pParent = NULL); // standard constructor 1.59 + 1.60 + // Dialog Data 1.61 + //{{AFX_DATA(JoypadConfig) 1.62 + enum { IDD = IDD_CONFIG }; 1.63 + JoypadEditControl up; 1.64 + JoypadEditControl speed; 1.65 + JoypadEditControl right; 1.66 + JoypadEditControl left; 1.67 + JoypadEditControl down; 1.68 + JoypadEditControl capture; 1.69 + JoypadEditControl buttonStart; 1.70 + JoypadEditControl buttonSelect; 1.71 + JoypadEditControl buttonR; 1.72 + JoypadEditControl buttonL; 1.73 + JoypadEditControl buttonGS; 1.74 + JoypadEditControl buttonB; 1.75 + JoypadEditControl buttonA; 1.76 + //}}AFX_DATA 1.77 + 1.78 + // Overrides 1.79 + // ClassWizard generated virtual function overrides 1.80 + //{{AFX_VIRTUAL(JoypadConfig) 1.81 +protected: 1.82 + virtual void DoDataExchange(CDataExchange*pDX); // DDX/DDV support 1.83 + //}}AFX_VIRTUAL 1.84 + 1.85 + // Implementation 1.86 +protected: 1.87 + UINT timerId; 1.88 + int which; 1.89 + 1.90 + // Generated message map functions 1.91 + //{{AFX_MSG(JoypadConfig) 1.92 + afx_msg void OnCancel(); 1.93 + afx_msg void OnOk(); 1.94 + afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags); 1.95 + afx_msg void OnDestroy(); 1.96 + afx_msg void OnTimer(UINT nIDEvent); 1.97 + afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); 1.98 + virtual BOOL OnInitDialog(); 1.99 + //}}AFX_MSG 1.100 + DECLARE_MESSAGE_MAP() 1.101 +}; 1.102 +///////////////////////////////////////////////////////////////////////////// 1.103 +// MotionConfig dialog 1.104 + 1.105 +class MotionConfig : public CDialog 1.106 +{ 1.107 + // Construction 1.108 +public: 1.109 + void assignKeys(); 1.110 + void assignKey(int id, int key); 1.111 + MotionConfig(CWnd*pParent = NULL); // standard constructor 1.112 + 1.113 + // Dialog Data 1.114 + //{{AFX_DATA(MotionConfig) 1.115 + enum { IDD = IDD_MOTION_CONFIG }; 1.116 + JoypadEditControl up; 1.117 + JoypadEditControl right; 1.118 + JoypadEditControl left; 1.119 + JoypadEditControl down; 1.120 + //}}AFX_DATA 1.121 + 1.122 + // Overrides 1.123 + // ClassWizard generated virtual function overrides 1.124 + //{{AFX_VIRTUAL(MotionConfig) 1.125 +protected: 1.126 + virtual void DoDataExchange(CDataExchange*pDX); // DDX/DDV support 1.127 + //}}AFX_VIRTUAL 1.128 + 1.129 + // Implementation 1.130 +protected: 1.131 + // Generated message map functions 1.132 + //{{AFX_MSG(MotionConfig) 1.133 + afx_msg void OnCancel(); 1.134 + afx_msg void OnOk(); 1.135 + afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags); 1.136 + afx_msg void OnDestroy(); 1.137 + virtual BOOL OnInitDialog(); 1.138 + afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); 1.139 + afx_msg void OnTimer(UINT nIDEvent); 1.140 + //}}AFX_MSG 1.141 + DECLARE_MESSAGE_MAP() 1.142 +private: 1.143 + UINT timerId; 1.144 +}; 1.145 +//{{AFX_INSERT_LOCATION}} 1.146 +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. 1.147 + 1.148 +#endif // !defined(AFX_JOYPAD_H__FFFB2470_9EEC_4D2D_A5F0_3BF31579999A__INCLUDED_)