wxwidgets/samples/joytest/joytest.h
Vadim Zeitlin e43f913313 Remove all blank "Modified by:" lines from top comment blocks
Having this line is not useful at all as it doesn't contain any
information and shouldn't be filled in the future as git-shortlog can
provide the information about people who changed the given file more
more reliably than consulting the comments in any case.

Keep the non-blank lines for historical purposes.
2023-10-22 01:22:48 +02:00

61 lines
1.2 KiB
C++

/////////////////////////////////////////////////////////////////////////////
// Name: joytest.cpp
// Purpose: Joystick sample
// Author: Julian Smart
// Created: 04/01/98
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Define a new application
class MyApp: public wxApp
{
public:
bool OnInit() override;
// Joystick max values
int m_minX;
int m_minY;
int m_maxX;
int m_maxY;
#if wxUSE_SOUND
wxSound m_fire;
#endif // wxUSE_SOUND
};
wxDECLARE_APP(MyApp);
class MyCanvas
: public wxPanel
{
private:
wxPoint m_pos;
wxPoint m_point;
bool m_validPoint;
wxJoystick* m_stick;
int m_nButtons;
public:
MyCanvas(wxWindow* parent);
~MyCanvas();
void OnJoystickEvent(wxJoystickEvent& event);
void OnPaint(wxPaintEvent& evt);
void OnSize(wxSizeEvent& evt);
wxDECLARE_EVENT_TABLE();
};
class MyFrame: public wxFrame
{
MyCanvas* canvas;
public:
MyFrame(wxFrame* parent, const wxString& title);
void OnActivate(wxActivateEvent& event);
void OnQuit(wxCommandEvent& event);
wxDECLARE_EVENT_TABLE();
};