]> git.saurik.com Git - wxWidgets.git/blob - samples/joytest/joytest.h
Added wxWakeUpIdle() to wxGTK,
[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 wxWave m_fire;
23 };
24
25 DECLARE_APP(MyApp)
26
27 class MyCanvas: public wxScrolledWindow
28 {
29 public:
30 MyCanvas(wxWindow *parent, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize);
31 ~MyCanvas(void);
32 void OnJoystickEvent(wxJoystickEvent& event);
33
34 DECLARE_EVENT_TABLE()
35 };
36
37 class MyFrame: public wxFrame
38 {
39 public:
40 MyCanvas *canvas;
41 MyFrame(wxFrame *parent, const wxString& title, const wxPoint& pos, const wxSize& size, const long style);
42 ~MyFrame(void);
43 void OnActivate(wxActivateEvent& event);
44 void OnQuit(wxCommandEvent& event);
45
46 DECLARE_EVENT_TABLE()
47 };
48
49 #define JOYTEST_QUIT 1
50 #define JOYTEST_ABOUT 2