Mercurial > vba-linux
view src/win32/Joypad.h @ 2:3549bbe597ed
adding makefile.am
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 03 Mar 2012 10:31:47 -0600 |
parents | f9f4f1b99eed |
children |
line wrap: on
line source
1 #if !defined(AFX_JOYPAD_H__FFFB2470_9EEC_4D2D_A5F0_3BF31579999A__INCLUDED_)2 #define AFX_JOYPAD_H__FFFB2470_9EEC_4D2D_A5F0_3BF31579999A__INCLUDED_4 #if _MSC_VER > 10005 #pragma once6 #endif // _MSC_VER > 10007 // -*- C++ -*-8 // Joypad.h : header file9 //11 /////////////////////////////////////////////////////////////////////////////12 // JoypadEditControl window14 class JoypadEditControl : public CEdit15 {16 // Construction17 public:18 JoypadEditControl();20 // Attributes21 public:22 // Operations23 public:24 // Overrides25 // ClassWizard generated virtual function overrides26 //{{AFX_VIRTUAL(JoypadEditControl)27 //}}AFX_VIRTUAL29 // Implementation30 public:31 virtual BOOL PreTranslateMessage(MSG *pMsg);32 afx_msg LRESULT OnJoyConfig(WPARAM wParam, LPARAM lParam);33 virtual ~JoypadEditControl();35 // Generated message map functions36 protected:37 //{{AFX_MSG(JoypadEditControl)38 afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);39 //}}AFX_MSG41 DECLARE_MESSAGE_MAP()42 };44 /////////////////////////////////////////////////////////////////////////////46 /////////////////////////////////////////////////////////////////////////////47 // JoypadConfig dialog49 class JoypadConfig : public CDialog50 {51 // Construction52 public:53 void assignKeys();54 void assignKey(int id, int key);55 JoypadConfig(int w, CWnd*pParent = NULL); // standard constructor57 // Dialog Data58 //{{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_DATA75 // Overrides76 // ClassWizard generated virtual function overrides77 //{{AFX_VIRTUAL(JoypadConfig)78 protected:79 virtual void DoDataExchange(CDataExchange*pDX); // DDX/DDV support80 //}}AFX_VIRTUAL82 // Implementation83 protected:84 UINT timerId;85 int which;87 // Generated message map functions88 //{{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_MSG97 DECLARE_MESSAGE_MAP()98 };99 /////////////////////////////////////////////////////////////////////////////100 // MotionConfig dialog102 class MotionConfig : public CDialog103 {104 // Construction105 public:106 void assignKeys();107 void assignKey(int id, int key);108 MotionConfig(CWnd*pParent = NULL); // standard constructor110 // Dialog Data111 //{{AFX_DATA(MotionConfig)112 enum { IDD = IDD_MOTION_CONFIG };113 JoypadEditControl up;114 JoypadEditControl right;115 JoypadEditControl left;116 JoypadEditControl down;117 //}}AFX_DATA119 // Overrides120 // ClassWizard generated virtual function overrides121 //{{AFX_VIRTUAL(MotionConfig)122 protected:123 virtual void DoDataExchange(CDataExchange*pDX); // DDX/DDV support124 //}}AFX_VIRTUAL126 // Implementation127 protected:128 // Generated message map functions129 //{{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_MSG138 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.145 #endif // !defined(AFX_JOYPAD_H__FFFB2470_9EEC_4D2D_A5F0_3BF31579999A__INCLUDED_)