]>
git.saurik.com Git - wxWidgets.git/blob - utils/glcanvas/samples/cube/cube.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxGLCanvas demo program
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
17 // Define a new application type
18 class MyApp
: public wxApp
24 // Define a new frame type
26 class MyFrame
: public wxFrame
29 MyFrame(wxFrame
*frame
, const wxString
& title
, const wxPoint
& pos
, const wxSize
& size
,
30 long style
= wxDEFAULT_FRAME_STYLE
);
32 void OnExit(wxCommandEvent
& event
);
34 void OnDefRotateLeftKey();
35 void OnDefRotateRightKey();
38 TestGLCanvas
* m_canvas
;
43 class TestGLCanvas
: public wxGLCanvas
48 TestGLCanvas(wxWindow
*parent
, const wxWindowID id
= -1, const wxPoint
& pos
= wxDefaultPosition
,
49 const wxSize
& size
= wxDefaultSize
, long style
= 0, const wxString
& name
= "TestGLCanvas");
50 TestGLCanvas(wxWindow
*parent
, const TestGLCanvas
&other
,
51 const wxWindowID id
= -1, const wxPoint
& pos
= wxDefaultPosition
,
52 const wxSize
& size
= wxDefaultSize
, long style
= 0,
53 const wxString
& name
= "TestGLCanvas" );
57 void OnPaint(wxPaintEvent
& event
);
58 void OnSize(wxSizeEvent
& event
);
59 void OnEraseBackground(wxEraseEvent
& event
);
60 void OnKeyDown(wxKeyEvent
& event
);
61 void OnKeyUp(wxKeyEvent
& event
);
63 void Rotate( double deg
);