annotate src/win32/Joypad.h @ 5:8fe0c57e53d2

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