]> git.saurik.com Git - wxWidgets.git/blame_incremental - samples/joytest/joytest.h
forwarding mouse moved events to the view under the mouse, not the firstResponder
[wxWidgets.git] / samples / joytest / joytest.h
... / ...
CommitLineData
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
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12// Define a new application
13class MyApp: public wxApp
14{
15public:
16 bool OnInit();
17
18 // Joystick max values
19 int m_minX;
20 int m_minY;
21 int m_maxX;
22 int m_maxY;
23
24#if wxUSE_SOUND
25 wxSound m_fire;
26#endif // wxUSE_SOUND
27};
28
29DECLARE_APP(MyApp)
30
31class MyCanvas: public wxScrolledWindow
32{
33public:
34 MyCanvas(wxWindow *parent, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize);
35 ~MyCanvas();
36 void OnJoystickEvent(wxJoystickEvent& event);
37
38 wxJoystick* m_stick;
39 DECLARE_EVENT_TABLE()
40};
41
42class MyFrame: public wxFrame
43{
44public:
45 MyCanvas *canvas;
46 MyFrame(wxFrame *parent, const wxString& title,
47 const wxPoint& pos, const wxSize& size, const long style);
48 ~MyFrame(){};
49 void OnActivate(wxActivateEvent& event);
50 void OnQuit(wxCommandEvent& event);
51
52DECLARE_EVENT_TABLE()
53};
54
55#define JOYTEST_QUIT 1