]> git.saurik.com Git - wxWidgets.git/blob - samples/joytest/joytest.h
when the system is not yet start fully (macos not inited) mutexes and critical sectio...
[wxWidgets.git] / samples / joytest / joytest.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: joytest.cpp
3 // Purpose: Joystick sample
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 04/01/98
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart and Markus Holzem
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
11
12 // Define a new application
13 class MyApp: public wxApp
14 {
15 public:
16 bool OnInit(void);
17
18 // Joystick max values
19 int m_maxX;
20 int m_maxY;
21
22 #if wxUSE_WAVE
23 wxWave m_fire;
24 #endif // wxUSE_WAVE
25 };
26
27 DECLARE_APP(MyApp)
28
29 class MyCanvas: public wxScrolledWindow
30 {
31 public:
32 MyCanvas(wxWindow *parent, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize);
33 ~MyCanvas(void);
34 void OnJoystickEvent(wxJoystickEvent& event);
35
36 DECLARE_EVENT_TABLE()
37 };
38
39 class MyFrame: public wxFrame
40 {
41 public:
42 MyCanvas *canvas;
43 MyFrame(wxFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size, const long style);
44 ~MyFrame(void);
45 void OnActivate(wxActivateEvent& event);
46 void OnQuit(wxCommandEvent& event);
47
48 DECLARE_EVENT_TABLE()
49 };
50
51 #define JOYTEST_QUIT 1
52 #define JOYTEST_ABOUT 2