]> git.saurik.com Git - wxWidgets.git/blame - samples/joytest/joytest.h
Use RIAA wrapper for wxSpinCtrl event disabling in wxGTK.
[wxWidgets.git] / samples / joytest / joytest.h
CommitLineData
bbf1f0e5
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: joytest.cpp
3// Purpose: Joystick sample
4// Author: Julian Smart
5// Modified by:
6// Created: 04/01/98
6aa89a22 7// Copyright: (c) Julian Smart
526954c5 8// Licence: wxWindows licence
bbf1f0e5
KB
9/////////////////////////////////////////////////////////////////////////////
10
11// Define a new application
12class MyApp: public wxApp
13{
aec18ff7
MB
14public:
15 bool OnInit();
bbf1f0e5
KB
16
17 // Joystick max values
a800dc50
RD
18 int m_minX;
19 int m_minY;
bbf1f0e5
KB
20 int m_maxX;
21 int m_maxY;
22
d93966b9
VS
23#if wxUSE_SOUND
24 wxSound m_fire;
25#endif // wxUSE_SOUND
bbf1f0e5
KB
26};
27
28DECLARE_APP(MyApp)
29
30class MyCanvas: public wxScrolledWindow
31{
aec18ff7 32public:
bbf1f0e5 33 MyCanvas(wxWindow *parent, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize);
aec18ff7 34 ~MyCanvas();
bbf1f0e5
KB
35 void OnJoystickEvent(wxJoystickEvent& event);
36
a800dc50 37 wxJoystick* m_stick;
bbf1f0e5
KB
38 DECLARE_EVENT_TABLE()
39};
40
41class MyFrame: public wxFrame
42{
aec18ff7 43public:
bbf1f0e5 44 MyCanvas *canvas;
aec18ff7
MB
45 MyFrame(wxFrame *parent, const wxString& title,
46 const wxPoint& pos, const wxSize& size, const long style);
925e9792 47 ~MyFrame(){};
bbf1f0e5
KB
48 void OnActivate(wxActivateEvent& event);
49 void OnQuit(wxCommandEvent& event);
50
51DECLARE_EVENT_TABLE()
52};
53
54#define JOYTEST_QUIT 1