]>
Commit | Line | Data |
---|---|---|
6a1120ad JS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: cube.h | |
3 | // Purpose: wxGLCanvas demo program | |
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 | #ifndef _WX_CUBE_H_ | |
13 | #define _WX_CUBE_H_ | |
14 | ||
15 | #include "glcanvas.h" | |
16 | ||
17 | // Define a new application type | |
18 | class MyApp: public wxApp | |
19 | { | |
20 | public: | |
21 | bool OnInit(void); | |
6a1120ad JS |
22 | }; |
23 | ||
24 | // Define a new frame type | |
25 | class TestGLCanvas; | |
26 | class MyFrame: public wxFrame | |
c2265822 JS |
27 | { |
28 | public: | |
6a1120ad JS |
29 | MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size, |
30 | long style = wxDEFAULT_FRAME_STYLE); | |
31 | ||
32 | void OnExit(wxCommandEvent& event); | |
6a1120ad | 33 | bool OnClose(void); |
c2265822 | 34 | public: |
6a1120ad JS |
35 | TestGLCanvas* m_canvas; |
36 | ||
37 | DECLARE_EVENT_TABLE() | |
38 | }; | |
39 | ||
40 | class TestGLCanvas: public wxGLCanvas | |
41 | { | |
42 | public: | |
43 | TestGLCanvas(wxWindow *parent, const wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, | |
44 | const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "TestGLCanvas"); | |
45 | ~TestGLCanvas(void); | |
46 | ||
47 | void OnPaint(wxPaintEvent& event); | |
48 | void OnSize(wxSizeEvent& event); | |
49 | void OnEraseBackground(wxEraseEvent& event); | |
f6fcbb63 RR |
50 | void InitGL(void); |
51 | ||
52 | private: | |
53 | ||
54 | bool m_init; | |
6a1120ad JS |
55 | |
56 | DECLARE_EVENT_TABLE() | |
57 | }; | |
58 | ||
59 | #endif | |
60 |