-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.h
80 lines (65 loc) · 1.52 KB
/
main.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//
// wcGLCanvas.h
// wxOpenGL
//
// Created by Thomas Spargo on 1/26/19.
// Copyright © 2019 Thomas Spargo. All rights reserved.
//
#ifndef wcGLCanvas_h
#define wcGLCanvas_h
#include "wx/wx.h"
#include "wx/glcanvas.h"
#include "EM_equations.h"
#include "CPlot.h"
class DrawPane : public wxPanel
{
public:
DrawPane(wxFrame* parent);
void paintEvent(wxPaintEvent& evt);
void paintNow();
void render( wxDC& dc );
wxDECLARE_EVENT_TABLE()
};
class MyFrame;
class MyApp: public wxApp
{
public:
MyApp();
bool OnInit();
void onIdle(wxIdleEvent& evt);
void activateRenderLoop(bool on);
MyFrame *frame;
DrawPane *drawPane;
EM_Eqn_1D *theEMWorld;
CPlot *theGraph;
float *xArray;
float *yArray;
bool render_loop_on;
};
wxIMPLEMENT_APP(MyApp)
class MyFrame : public wxFrame
{
public:
MyFrame();
void onClose(wxCloseEvent& evt);
void resized(wxSizeEvent &event);
wxDECLARE_EVENT_TABLE()
int width;
int height;
};
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_SIZE(MyFrame::resized)
EVT_CLOSE(MyFrame::onClose)
wxEND_EVENT_TABLE()
// events
/*
void mouseMoved(wxMouseEvent& event);
void mouseDown(wxMouseEvent& event);
void mouseWheelMoved(wxMouseEvent& event);
void mouseReleased(wxMouseEvent& event);
void rightClick(wxMouseEvent& event);
void mouseLeftWindow(wxMouseEvent& event);
void keyPressed(wxKeyEvent& event);
void keyReleased(wxKeyEvent& event);
*/
#endif /* wcGLCanvas_h */