SoWxRenderArea.h

Go to the documentation of this file.
00001 /*
00002 _______________________________________________________________________
00003 __________________________ G E O M E T R Y ____________________________
00004 |
00005 | THIS FILE IS PART OF THE SOVIEWER LIBRARY.
00006 | USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     
00007 | GOVERNED BY A BSD-STYLE SOURCE LICENSE.
00008 | PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       
00009 _______________________________________________________________________
00010 _______________________________________________________________________
00011 */
00012 #ifndef _SOWXRENDERAREA_H_
00013 #define _SOWXRENDERAREA_H_
00014 
00015 #include <wx/glcanvas.h>
00016 #include <wx/timer.h>
00017 
00018 #include <SoRenderArea.h>
00019 
00020 class SOVIEWER_API SoWxRenderArea : public wxGLCanvas, public SoRenderArea
00021 {
00022 public:
00023     SoWxRenderArea(wxWindow *parent, wxWindowID id = wxID_ANY,
00024         const wxPoint& pos = wxDefaultPosition,
00025         const wxSize& size = wxDefaultSize, long style = 0,
00026         const wxString& name = wxT("SoWxRenderArea"));
00027     virtual ~SoWxRenderArea();
00028 
00029 protected:
00030     virtual void soRenderCallback();
00031 
00032     void initializeGL();
00033     void OnTimerEvent(wxTimerEvent& event);
00034     void OnKeyDown(wxKeyEvent& event);
00035     void OnKeyUp(wxKeyEvent& event); 
00036     void OnMousePress(wxMouseEvent& event);
00037     void OnMouseMove(wxMouseEvent& event);
00038     void OnMouseRelease(wxMouseEvent& event);
00039     void OnMouseWheel(wxMouseEvent& event);
00040     void OnPaint(wxPaintEvent& event);
00041     void OnSize(wxSizeEvent& event);
00042     void OnEraseBackground(wxEraseEvent& event);
00043 private:
00044     wxTimer                              m_time;
00045 
00046     SoKeyboardEvent::Key translateKey( wxKeyEvent& event );
00047 
00048     DECLARE_EVENT_TABLE()
00049 };
00050 
00051 #endif // _SOWXRENDERAREA_H_

Generated on Thu May 8 14:30:09 2008 for OpenInventorViewer by  doxygen 1.5.1