12 #include <mrpt/config.h> 25 #if MRPT_HAS_WXWIDGETS 27 #include <wx/artprov.h> 28 #include <wx/bitmap.h> 32 #include <wx/string.h> 34 #include <wx/busyinfo.h> 35 #include <wx/colordlg.h> 36 #include <wx/dcmemory.h> 37 #include <wx/dirdlg.h> 38 #include <wx/filedlg.h> 39 #include <wx/imaglist.h> 41 #include <wx/msgdlg.h> 42 #include <wx/progdlg.h> 43 #include <wx/textdlg.h> 45 #if wxUSE_GLCANVAS && MRPT_HAS_OPENGL_GLUT 47 #include <wx/dcclient.h> 48 #include <wx/glcanvas.h> 66 class CWxGLCanvasBase :
public CGlCanvasBase,
public wxGLCanvas
70 wxWindow* parent, wxWindowID
id = wxID_ANY,
71 const wxPoint& pos = wxDefaultPosition,
72 const wxSize&
size = wxDefaultSize,
long style = 0,
73 const wxString& name = _T(
"CWxGLCanvasBase"));
75 ~CWxGLCanvasBase()
override =
default;
77 void OnPaint(wxPaintEvent& event);
78 void OnSize(wxSizeEvent& event);
79 void OnEraseBackground(wxEraseEvent& event);
80 void OnEnterWindow(wxMouseEvent& event);
82 void OnChar(wxKeyEvent& event);
84 void OnMouseDown(wxMouseEvent& event);
85 void OnMouseMove(wxMouseEvent& event);
86 void OnMouseUp(wxMouseEvent&);
87 void OnMouseWheel(wxMouseEvent& event);
98 virtual void OnCharCustom([[maybe_unused]] wxKeyEvent& event) {}
99 virtual void OnPreRender() {}
100 virtual void OnPostRender() {}
101 virtual void OnPostRenderSwapBuffers(
102 [[maybe_unused]]
double At, [[maybe_unused]] wxPaintDC& dc)
106 virtual void OnRenderError([[maybe_unused]]
const wxString& str) {}
109 std::unique_ptr<wxGLContext> m_gl_context;
113 unsigned long m_StartTime = 0;
114 unsigned long m_LastTime = 0;
115 unsigned long m_LastRedraw = 0;
118 void OnWindowCreation(wxWindowCreateEvent& ev);
119 void swapBuffers()
override;
120 void preRender()
override;
121 void postRender()
override;
122 void renderError(
const std::string& err_msg)
override;
129 #endif // wxUSE_GLCANVAS 130 #endif // MRPT_HAS_WXWIDGETS
size_t size(const MATRIXLIKE &m, const int dim)
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).