#include <JoystickMotionTesterDlgBar.h>
Inheritance diagram for CJoystickMotionTesterDlgBar:
Public Types | |
typedef CJoystickMotionTesterDlgBar::JoyInfo | JoyInfo |
IDD = IDD_DIALOG_BAR_JOYSTICKMOTIONTESTER | |
enum | { IDD = IDD_DIALOG_BAR_JOYSTICKMOTIONTESTER } |
Public Member Functions | |
CJoystickMotionTesterDlgBar () | |
~CJoystickMotionTesterDlgBar () | |
Public Attributes | |
CComboBox | m_scheme |
CButton | m_useJoystick |
Protected Member Functions | |
virtual void | DoDataExchange (CDataExchange *pDX) |
virtual BOOL | OnInitDialog () |
void | drawRobot (CDC *dc, double x, double y, double r, double scale) |
afx_msg void | OnUseJoystick () |
afx_msg void | OnTimer (UINT nIDEvent) |
afx_msg void | OnPaint () |
afx_msg void | OnSize (UINT nType, int cx, int cy) |
DECLARE_MESSAGE_MAP () | |
Protected Attributes | |
CBitmap * | m_pBitmap |
CRect | m_rect |
JoyInfo | joy |
int | sizex |
int | sizey |
Classes | |
struct | JoyInfo |
Definition at line 29 of file JoystickMotionTesterDlgBar.h.
a type storing all information from polling the joystick as well as all states and commands implicated by that (sequence of) data
anonymous enum |
the ID of joystick motion tester dialog :
Definition at line 51 of file JoystickMotionTesterDlgBar.h.
CJoystickMotionTesterDlgBar::CJoystickMotionTesterDlgBar | ( | ) |
the constructor.
Definition at line 18 of file JoystickMotionTesterDlgBar.cpp.
References CJoystickMotionTesterDlgBar::JoyInfo::a, CJoystickMotionTesterDlgBar::JoyInfo::astart, CJoystickMotionTesterDlgBar::JoyInfo::b, CJoystickMotionTesterDlgBar::JoyInfo::c, joy, CJoystickMotionTesterDlgBar::JoyInfo::x, CJoystickMotionTesterDlgBar::JoyInfo::y, and CJoystickMotionTesterDlgBar::JoyInfo::z.
CJoystickMotionTesterDlgBar::~CJoystickMotionTesterDlgBar | ( | ) |
CJoystickMotionTesterDlgBar::DECLARE_MESSAGE_MAP | ( | ) | [protected] |
Reimplemented from CDynamicBarDlg.
void CJoystickMotionTesterDlgBar::DoDataExchange | ( | CDataExchange * | pDX | ) | [protected, virtual] |
exchange data between member variables and dialog elements
Definition at line 43 of file JoystickMotionTesterDlgBar.cpp.
References IDC_JOYSTICKMOTIONTESTER_SCHEME, IDC_JOYSTICKMOTIONTESTER_USEJOYSTICK, m_scheme, and m_useJoystick.
void CJoystickMotionTesterDlgBar::drawRobot | ( | CDC * | dc, | |
double | x, | |||
double | y, | |||
double | r, | |||
double | scale | |||
) | [protected] |
draw a simple robot and its assumed trajectory according to the current joystick position into the joystick motion tester dialog
Definition at line 157 of file JoystickMotionTesterDlgBar.cpp.
BOOL CJoystickMotionTesterDlgBar::OnInitDialog | ( | ) | [protected, virtual] |
the initialisation.
Reimplemented from CDynamicDialog.
Definition at line 61 of file JoystickMotionTesterDlgBar.cpp.
References FALSE, CDynamicDialog::OnInitDialog(), and TRUE.
void CJoystickMotionTesterDlgBar::OnPaint | ( | ) | [protected] |
paint the dialog, including resizing walk/look visualisation
Definition at line 171 of file JoystickMotionTesterDlgBar.cpp.
void CJoystickMotionTesterDlgBar::OnSize | ( | UINT | nType, | |
int | cx, | |||
int | cy | |||
) | [protected] |
for correct visualisation we need to know all dialog size changes
Reimplemented from CDynamicDialog.
Definition at line 200 of file JoystickMotionTesterDlgBar.cpp.
References FALSE, CDynamicDialog::OnSize(), sizex, and sizey.
void CJoystickMotionTesterDlgBar::OnTimer | ( | UINT | nIDEvent | ) | [protected] |
needed to poll the joystick, because not all relevant data can be delivered by interrupt
Reimplemented from CDynamicDialog.
Definition at line 89 of file JoystickMotionTesterDlgBar.cpp.
References CJoystickMotionTesterDlgBar::JoyInfo::a, CJoystickMotionTesterDlgBar::JoyInfo::astart, CJoystickMotionTesterDlgBar::JoyInfo::b, CJoystickMotionTesterDlgBar::JoyInfo::c, FALSE, int(), joy, m_useJoystick, OnUseJoystick(), CJoystickMotionTesterDlgBar::JoyInfo::x, CJoystickMotionTesterDlgBar::JoyInfo::y, and CJoystickMotionTesterDlgBar::JoyInfo::z.
void CJoystickMotionTesterDlgBar::OnUseJoystick | ( | ) | [protected] |
en/disable dialog (setting timer, painting...)
Definition at line 71 of file JoystickMotionTesterDlgBar.cpp.
References CJoystickMotionTesterDlgBar::JoyInfo::astart, FALSE, joy, and m_useJoystick.
Referenced by OnTimer().
JoyInfo CJoystickMotionTesterDlgBar::joy [protected] |
information indicated by joystick
Definition at line 81 of file JoystickMotionTesterDlgBar.h.
Referenced by CJoystickMotionTesterDlgBar(), OnTimer(), and OnUseJoystick().
CBitmap* CJoystickMotionTesterDlgBar::m_pBitmap [protected] |
image for double buffering to avoid flicker
Definition at line 75 of file JoystickMotionTesterDlgBar.h.
Referenced by OnPaint(), and ~CJoystickMotionTesterDlgBar().
CRect CJoystickMotionTesterDlgBar::m_rect [protected] |
stores the size of the background image
Definition at line 78 of file JoystickMotionTesterDlgBar.h.
Referenced by OnPaint().
CComboBox CJoystickMotionTesterDlgBar::m_scheme |
the scheme change combo box in joystick motion tester dialog :
Definition at line 54 of file JoystickMotionTesterDlgBar.h.
Referenced by DoDataExchange().
the 'use joystick' check box in joystick motion tester dialog
Definition at line 57 of file JoystickMotionTesterDlgBar.h.
Referenced by DoDataExchange(), OnTimer(), and OnUseJoystick().
int CJoystickMotionTesterDlgBar::sizex [protected] |
size provided by onSize
Definition at line 84 of file JoystickMotionTesterDlgBar.h.
Referenced by OnSize().
int CJoystickMotionTesterDlgBar::sizey [protected] |