X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/378a3872eb0bfaaff6f32144ddef0dd144b056b2..0c63cc6e4c7f1d489e91ea6dd7fffc19b0abaec9:/samples/opengl/cube/cube.h?ds=sidebyside diff --git a/samples/opengl/cube/cube.h b/samples/opengl/cube/cube.h index af9e59d61f..3aa6539ebe 100644 --- a/samples/opengl/cube/cube.h +++ b/samples/opengl/cube/cube.h @@ -29,12 +29,13 @@ private: }; // Define a new application type -class MyApp: public wxApp +class MyApp : public wxApp { public: MyApp() { m_glContext = NULL; } - // get the context we use creating it on demand (and set it as current) + // Returns the shared context used by all frames and sets it as current for + // the given canvas. TestGLContext& GetContext(wxGLCanvas *canvas); // virtual wxApp methods @@ -47,7 +48,7 @@ private: }; // Define a new frame type -class MyFrame: public wxFrame +class MyFrame : public wxFrame { public: MyFrame(); @@ -55,8 +56,6 @@ public: private: void OnClose(wxCommandEvent& event); void OnNewWindow(wxCommandEvent& event); - void OnDefRotateLeftKey(wxCommandEvent& event); - void OnDefRotateRightKey(wxCommandEvent& event); DECLARE_EVENT_TABLE() }; @@ -68,15 +67,17 @@ public: private: void OnPaint(wxPaintEvent& event); - void OnSize(wxSizeEvent& event); + void Spin(float xSpin, float ySpin); void OnKeyDown(wxKeyEvent& event); + void OnSpinTimer(wxTimerEvent& WXUNUSED(event)); // angles of rotation around x- and y- axis float m_xangle, m_yangle; + wxTimer m_spinTimer; + DECLARE_EVENT_TABLE() }; #endif // _WX_CUBE_H_ -