-
Notifications
You must be signed in to change notification settings - Fork 1
/
sculptapp.h
60 lines (45 loc) · 1.17 KB
/
sculptapp.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// sculptapp.h
// copied from Julian Smart's pngdemo.h
#include "wx/wx.h"
// Define a new application
class MyApp: public wxApp
{
public:
MyApp(void){};
virtual bool OnInit(void);
int OnExit();
};
// Define a new frame
class MyCanvas;
class MyFrame: public wxFrame
{
public:
MyCanvas *canvas;
MyFrame(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size);
virtual ~MyFrame();
void OnActivate(bool) {}
void OnClose( wxCloseEvent& event );
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
void OnRunScript(wxCommandEvent& event);
DECLARE_EVENT_TABLE()
};
// Define a new canvas which can receive some events
class MyCanvas: public wxWindow
{
wxPoint m_button_down_point;
wxPoint m_current_point;
wxPoint m_initial_point;
public:
double m_lens_point[3];
double m_target_point[3];
double m_vertical[3];
MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size);
~MyCanvas(void){};
void ViewScale(double fraction);
void LimitCamera();
void OnPaint(wxPaintEvent& event);
void OnSize(wxSizeEvent& event);
void OnMouse( wxMouseEvent& event );
DECLARE_EVENT_TABLE()
};