3dpcp/include/show/wxshow.h

41 lines
985 B
C
Raw Normal View History

2012-09-16 12:33:11 +00:00
#ifndef _glpane_
#define _glpane_
#include "GL/glut.h"
#include "wx/wx.h"
#include "wx/glcanvas.h"
class BasicGLPane : public wxGLCanvas
{
wxGLContext* m_context;
public:
BasicGLPane(wxFrame* parent, int* args);
virtual ~BasicGLPane();
void resized(wxSizeEvent& evt);
int getWidth();
int getHeight();
void render(wxPaintEvent& evt);
void paint(bool interruptable=false);
void prepare3DViewport(int topleft_x, int topleft_y, int bottomrigth_x, int bottomrigth_y);
// events
void idle();
void idle_event(wxIdleEvent& event);
void mouseMoved(wxMouseEvent& event);
void mouseEvent(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);
DECLARE_EVENT_TABLE()
};
#endif