MRPT  1.9.9
WxSubsystem.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2018, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #pragma once
10 
12 #include <mrpt/config.h>
14 #include <mrpt/math/types_math.h>
15 #include <mrpt/gui/gui_frwds.h>
16 #include <mutex>
17 #include <queue>
18 #include <map>
19 #include <thread>
20 #include <future>
21 
22 #if MRPT_HAS_WXWIDGETS
23 
24 #include <wx/sizer.h>
25 #include <wx/statbmp.h>
26 #include <wx/menu.h>
27 #include <wx/toolbar.h>
28 #include <wx/frame.h>
29 #include <wx/timer.h>
30 #include <wx/statusbr.h>
31 #include <wx/msgdlg.h>
32 #include <wx/artprov.h>
33 #include <wx/bitmap.h>
34 #include <wx/intl.h>
35 #include <wx/image.h>
36 #include <wx/string.h>
37 #include <wx/msgdlg.h>
38 #include <wx/filedlg.h>
39 #include <wx/progdlg.h>
40 #include <wx/imaglist.h>
41 #include <wx/busyinfo.h>
42 #include <wx/log.h>
43 #include <wx/textdlg.h>
44 #include <wx/dirdlg.h>
45 #include <wx/colordlg.h>
46 #include <wx/dcmemory.h>
47 #include <wx/app.h>
48 #include <wx/pen.h>
49 
50 // The wxMathPlot library
51 #include <mrpt/otherlibs/mathplot/mathplot.h>
52 
53 #if 0
54 // The wxFreeChart library
55 #include <wx/chartpanel.h>
56 #include <wx/bars/barplot.h>
57 
58 #include <wx/axis/numberaxis.h>
59 #include <wx/axis/categoryaxis.h>
60 #include <wx/axis/dateaxis.h>
61 
62 #include <wx/xy/xyhistorenderer.h>
63 #include <wx/xy/xydataset.h>
64 #include <wx/xy/xylinerenderer.h>
65 #include <wx/xy/xyplot.h>
66 #include <wx/xy/xysimpledataset.h>
67 
68 #include <wx/xyz/xyzdataset.h>
69 #include <wx/xyz/bubbleplot.h>
70 
71 #include <wx/category/categorydataset.h>
72 #include <wx/category/categorysimpledataset.h>
73 #endif
74 
75 #endif
76 #include <mrpt/gui/gui_frwds.h>
77 
78 namespace mrpt::gui
79 {
80 /** This class implements the GUI thread required for the wxWidgets-based GUI.
81  * This system is employed internally by gui::CDisplayWindow and
82  * gui::CDisplayWindow3D, and must be not used in any way directly by the MRPT
83  * user.
84  *
85  * The system works by creating a invisible wxFrame that process timer events
86  * where it checks a queue of requests sent from the main MRPT thread. The
87  * requests include the creation, deletion,... of windows (2D/3D). In that
88  * way, just one thread is required for all the GUI windows, and the wxWidgets
89  * is initialized and clean-up correctly.
90  *
91  * This header should be included just from the implementation files of
92  * CDisplayWindow and CDisplayWindow3D, since it uses wxWidgets classes.
93  *
94  * \sa gui::CDisplayWindow, gui::CDisplayWindow3D
95  * \ingroup mrpt_gui_grp
96  */
98 {
99 #if MRPT_HAS_WXWIDGETS
100 
101  public:
102  /** This method must be called in the destructor of the user class FROM THE
103  * MAIN THREAD, in order to wait for the shutdown of the wx thread if this
104  * was the last open window.
105  */
106  static void waitWxShutdownsIfNoWindows();
107 
108  /** Will be set to true at runtime if it's not detected a running wxApp
109  * instance.
110  * For console apps, we'll create a new thread and run wxEntry from there.
111  * For GUI apps (MRPT-based Windows are a part of a user wxWidget apps),
112  * we must leave the control of
113  * message dispatching to the current main loop, so we cannot create a
114  * different threads, making things a little different (hence this
115  * variable).
116  */
117  static bool isConsoleApp();
118 
119  /** An auxiliary global object used just to launch a final request to the
120  * wxSubsystem for shutdown:
121  */
123  {
124  public:
127  };
128 
130 
131  /** The main frame of the wxWidgets application
132  */
133  class CWXMainFrame : public wxFrame
134  {
136 
137  public:
138  CWXMainFrame(wxWindow* parent, wxWindowID id = -1);
139  virtual ~CWXMainFrame();
140 
141  /** Atomically increments the number of windows created with the main
142  * frame as parent.
143  * \return The updated number of windows.
144  */
145  static int notifyWindowCreation();
146 
147  /** Atomically decrements the number of windows created with the main
148  * frame as parent.
149  * \return The updated number of windows (0 if the calling was the last
150  * one).
151  */
152  static int notifyWindowDestruction();
153 
154  static volatile CWXMainFrame* oneInstance;
155 
156  private:
157  static std::mutex cs_windowCount;
158  static int m_windowCount;
159 
160  wxTimer* m_theTimer;
161 
162  void OnTimerProcessRequests(wxTimerEvent& event);
163 
164  DECLARE_EVENT_TABLE()
165 
166  }; // end class CWXMainFrame
167 
169  {
170  /** The thread ID of wxMainThread, or 0 if it is not running. */
171  std::thread m_wxMainThreadId;
172  /** This is signaled when wxMainThread is ready. */
173  std::promise<void> m_semWxMainThreadReady;
174  std::promise<void> m_done;
175  /** The critical section for accessing "m_wxMainThreadId" */
176  std::mutex m_csWxMainThreadId;
177  };
178 
180 
181  /** This will be the "MAIN" of wxWidgets: It starts an application object
182  * and does not end until all the windows are closed.
183  * Only one instance of this thread can be running at a given instant, no
184  * matter how many windows are open.
185  */
186  static void wxMainThread();
187 
188  /** The data structure for each inter-thread request:
189  */
191  {
193  : source2D(nullptr),
194  source3D(nullptr),
195  sourcePlots(nullptr),
197  voidPtr(nullptr),
198  voidPtr2(nullptr),
199  x(400),
200  y(400),
201  boolVal(false)
202  {
203  }
204 
205  /** Only one of source* can be non-nullptr, indicating the class that
206  * generated the request. */
208 
209  /** Only one of source* can be non-nullptr, indicating the class that
210  * generated the request. */
212 
213  /** Only one of source* can be non-nullptr, indicating the class that
214  * generated the request. */
216 
217  /** Only one of source* can be non-nullptr, indicating the class that
218  * generated the request. */
220 
221  /** Parameters, depending on OPCODE.
222  */
224 
225  /** Parameters, depending on OPCODE.
226  */
227  void *voidPtr, *voidPtr2;
228  int x, y;
229  bool boolVal;
232 
233  /** Valid codes are:
234  * For CDisplayWindow:
235  * - 200: Create a new 2D window, with caption "str" and initial
236  *size "x" & "y", and save the "wxFrame*" in the "void**" passed in
237  *voidPtr.
238  * - 201: Updates the image shown in the window, from a "wxImage*"
239  *passed in voidPtr2. The wxImage object will be freed with delete
240  *after that. voidPtr must be a "wxFrame*", a "CWindowDialog*"
241  *actually.
242  * - 202: Set position to x,y
243  * - 203: Change size to x,y
244  * - 204: Change title to "str"
245  * - 299: Delete the window associated with this source object.
246  *
247  * For CDisplayWindow3D:
248  * - 300: Create a new 3D window, with caption "str" and initial
249  *size "x" & "y", and save the "wxFrame*" in the "void**" passed in
250  *voidPtr.
251  * - 302: Set position to x,y
252  * - 303: Change size to x,y
253  * - 304: Change title to "str"
254  * - 350: Force refresh
255  * - 360: Add a 2D text message: vector_x: [0]:x, [1]:y, [2,3,4]:R
256  *G
257  *B, "x": enum of desired font. "y": unique index, "str": String.
258  * - 361: Clear all 2D text messages.
259  * - 362: Add a 2D text message (vectorized fonts)
260  * - 370: Change min/max range: min=vector_x[0], max=vector_x[1]
261  * - 399: Delete the window associated with this source object.
262  *
263  * For CDisplayWindowPlots:
264  * - 400: Create a new Plots window, with caption "str" and initial
265  *size "x" & "y",and save the "wxFrame*" in the "void**" passed in
266  *voidPtr.
267  * - 402: Set position to x,y
268  * - 403: Change size to x,y
269  * - 404: Change title to "str"
270  * - 499: Delete the window associated with this source object.
271  * - 410: Depending on "boolVal", enable/disable the mouse-zoom &
272  *pan
273  * - 411: Depending on "boolVal", enable/disable the aspect ratio
274  *fix
275  * - 412: Zoom over a rectangle vectorx[0-1] & vectory[0-1]
276  * - 413: Axis fit, with aspect ratio fix to boolVal.
277  * - 414: Clear all plot objects.
278  * - 420: Add/update a 2D line/points plot: x/y data=
279  *vector_x/vector_y, format string=str, plot name =plotName.
280  * - 421: Add/update a 2D ellipse: format string=str, plot name
281  *=plotName, vector_x[0,1]:X/Y center, vector_x[2]:quantiles,
282  *vector_y[0,1,2]: Covariance matrix entries 00,11,01,
283  *boolVal=showName?
284  * - 422: Add/update a bitmap: plot name =plotName,
285  *vector_x[0,1]:X/Y
286  *corner, vector_x[2,3]: X/Y widths, voidPtr2: pointer to a newly
287  *created wxImage with the bitmap.
288  * - 440: Insert submenu in the popup menu. plotName=menu label,
289  *x=user-defined ID.
290  * - 700: Shows a camera-pick-dialog and wait for user selection.
291  *"voidPtr" must point to a CSemaphore, which will be signaled twice
292  *(1st upon construction, 2nd upon dialog close); voidPtr2 must point
293  *to a "mrpt::gui::CPanelCameraSelection*" which will be filled with
294  *the selection (the panel must be deleted by the caller)
295  *
296  */
297  int OPCODE;
298  };
299 
300  /** Thread-safe method to return the next pending request, or nullptr if
301  * there is none (After usage, FREE the memory!)
302  */
304 
305  /** Thread-safe method to insert a new pending request (The memory must be
306  * dinamically allocated with "new T[1]", will be freed by receiver.)
307  */
309 
310  /** Thread-safe method to create one single instance of the main wxWidgets
311  * thread: it will create the thread only if it is not running yet.
312  */
313  static bool createOneInstanceMainThread();
314 
315  static wxBitmap getMRPTDefaultIcon();
316 
317  private:
318  /** Do not access directly to this, use the thread-safe functions
319  */
320  static std::queue<TRequestToWxMainThread*>* listPendingWxRequests;
321  static std::mutex* cs_listPendingWxRequests;
322 #endif
323 }; // End of class def.
324 
325 #if MRPT_HAS_WXWIDGETS
326 
327 /** The wx dialog for gui::CDisplayWindow
328  */
329 class CWindowDialog : public wxFrame
330 {
331  public:
332  /** A custom control to display the bitmap and avoid flicker
333  */
334  class wxMRPTImageControl : public wxPanel
335  {
336  protected:
337  wxBitmap* m_img;
338  std::mutex m_img_cs;
340 
341  public:
343  wxWindow* parent, wxWindowID winID, int x, int y, int width,
344  int height);
345  virtual ~wxMRPTImageControl();
346 
348  // std::mutex m_mouse_cs;
349 
350  /** Assigns this image. This object has the ownship of the image and
351  * will delete it when appropriate. */
352  void AssignImage(wxBitmap* img);
353  void GetBitmap(wxBitmap& bmp);
354 
355  void OnPaint(wxPaintEvent& ev);
356  void OnMouseMove(wxMouseEvent& ev);
357  void OnMouseClick(wxMouseEvent& ev);
358  void OnChar(wxKeyEvent& ev);
359 
360  void OnEraseBackground(wxEraseEvent& ev) { /* Do nothing */}
361  };
362 
363  public:
366  wxWindowID id = -1,
367  const std::string& caption = std::string("[MRPT-CDisplayWindow]"),
368  wxSize initialSize = wxDefaultSize);
369  virtual ~CWindowDialog();
370 
373 
374  // wxStaticBitmap *m_image;
376 
377  static const long ID_IMAGE_BITMAP;
378 
379  private:
380  void OnClose(wxCloseEvent& event);
381  void OnMenuClose(wxCommandEvent& event);
382  void OnMenuAbout(wxCommandEvent& event);
383  void OnMenuSave(wxCommandEvent& event);
384  void OnChar(wxKeyEvent& event);
385  void OnKeyDown(wxKeyEvent& event);
386  void OnResize(wxSizeEvent& event);
387  void OnMouseDown(wxMouseEvent& event);
388  void OnMouseMove(wxMouseEvent& event);
389 
390  DECLARE_EVENT_TABLE()
391 }; // end class CWindowDialog
392 
393 class C3DWindowDialog : public wxFrame
394 {
396 
397  public:
400  wxWindowID id = -1,
401  const std::string& caption = std::string("[MRPT-CDisplayWindow3D]"),
402  wxSize initialSize = wxDefaultSize);
403  virtual ~C3DWindowDialog();
404 
407 
408  CMyGLCanvas_DisplayWindow3D* m_canvas;
409 
410  void clearTextMessages();
411  void addTextMessage(
412  const double x_frac, const double y_frac, const std::string& text,
413  const mrpt::img::TColorf& color, const size_t unique_index,
414  const mrpt::opengl::TOpenGLFont font);
415  void addTextMessage(
416  const double x_frac, const double y_frac, const std::string& text,
417  const mrpt::img::TColorf& color, const std::string& font_name,
418  const double font_size, const mrpt::opengl::TOpenGLFontStyle font_style,
419  const size_t unique_index, const double font_spacing,
420  const double font_kerning, const bool has_shadow,
421  const mrpt::img::TColorf& shadow_color);
422 
423  private:
424  void OnClose(wxCloseEvent& event);
425  void OnMenuClose(wxCommandEvent& event);
426  void OnMenuAbout(wxCommandEvent& event);
427  void OnChar(wxKeyEvent& event);
428  void OnResize(wxSizeEvent& event);
429 
430  static const long ID_MENUITEM1;
431  static const long ID_MENUITEM2;
432 
433  DECLARE_EVENT_TABLE()
434 };
435 
436 /** The wx dialog for gui::CDisplayWindowPlots
437  */
438 class CWindowDialogPlots : public wxFrame
439 {
440  public:
443  wxWindowID id = -1,
444  const std::string& caption = std::string("[MRPT-CDisplayWindowPlots]"),
445  wxSize initialSize = wxDefaultSize);
446  virtual ~CWindowDialogPlots();
447 
450 
451  mpWindow* m_plot;
452  // wxChartPanel *m_chartPanel;
453  static const long ID_PLOT;
454  static const long ID_MENU_PRINT;
455  /** to know whether to insert a separator the first time. */
457  /** wxIDs to user IDs for submenus. */
458  std::map<long, long> m_ID2ID;
459  /** In graph coords */
461  /** In pixels */
463 
464  void OnMenuSelected(wxCommandEvent& ev);
465  void OnMouseMove(wxMouseEvent& event);
466 
467  /** Redirected from CDisplayWindowPlots::plot
468  */
469  void plot(
471  const std::string& lineFormat, const std::string& plotName);
472 
473  /** Redirected from CDisplayWindowPlots::plotEllipse
474  */
475  void plotEllipse(
477  const std::string& lineFormat, const std::string& plotName,
478  bool showName = false);
479 
480  /** Redirected from CDisplayWindowPlots::image
481  */
482  void image(
483  void* theWxImage, const float& x0, const float& y0, const float& w,
484  const float& h, const std::string& plotName);
485 
486  private:
487  void OnClose(wxCloseEvent& event);
488  void OnMenuPrint(wxCommandEvent& event);
489  void OnMenuClose(wxCommandEvent& event);
490  void OnMenuAbout(wxCommandEvent& event);
491  void OnChar(wxKeyEvent& event);
492  void OnResize(wxSizeEvent& event);
493  void OnMouseDown(wxMouseEvent& event);
494 
495  DECLARE_EVENT_TABLE()
496 }; // end class CWindowDialog
497 
498 #ifndef _U
499 #ifdef wxUSE_UNICODE
500 #define _U(x) wxString((x), wxConvUTF8)
501 #define _UU(x, y) wxString((x), y)
502 #else
503 #define _U(x) (x)
504 #define _UU(x, y) (x)
505 #endif
506 #endif
507 
508 #endif
509 
510 }
511 
An auxiliary global object used just to launch a final request to the wxSubsystem for shutdown: ...
Definition: WxSubsystem.h:122
std::map< long, long > m_ID2ID
wxIDs to user IDs for submenus.
Definition: WxSubsystem.h:458
static void pushPendingWxRequest(TRequestToWxMainThread *data)
Thread-safe method to insert a new pending request (The memory must be dinamically allocated with "ne...
void * voidPtr
Parameters, depending on OPCODE.
Definition: WxSubsystem.h:227
void OnMenuAbout(wxCommandEvent &event)
static TRequestToWxMainThread * popPendingWxRequest()
Thread-safe method to return the next pending request, or nullptr if there is none (After usage...
void OnClose(wxCloseEvent &event)
mrpt::gui::CDisplayWindow3D * source3D
Only one of source* can be non-nullptr, indicating the class that generated the request.
Definition: WxSubsystem.h:211
void OnMenuSave(wxCommandEvent &event)
friend class gui::CMyGLCanvas_DisplayWindow3D
Definition: WxSubsystem.h:395
void OnResize(wxSizeEvent &event)
The data structure for each inter-thread request:
Definition: WxSubsystem.h:190
void addTextMessage(const double x_frac, const double y_frac, const std::string &text, const mrpt::img::TColorf &color, const size_t unique_index, const mrpt::opengl::TOpenGLFont font)
Create a GUI window and display plots with MATLAB-like interfaces and commands.
static int notifyWindowCreation()
Atomically increments the number of windows created with the main frame as parent.
void AssignImage(wxBitmap *img)
Assigns this image.
void OnTimerProcessRequests(wxTimerEvent &event)
This method processes the pending requests from the main MRPT application thread. ...
static std::mutex * cs_listPendingWxRequests
Definition: WxSubsystem.h:321
std::thread m_wxMainThreadId
The thread ID of wxMainThread, or 0 if it is not running.
Definition: WxSubsystem.h:171
void OnMenuClose(wxCommandEvent &event)
Column vector, like Eigen::MatrixX*, but automatically initialized to zeros since construction...
Definition: eigen_frwds.h:44
The wx dialog for gui::CDisplayWindowPlots.
Definition: WxSubsystem.h:438
void OnMenuClose(wxCommandEvent &event)
wxPoint m_last_mouse_point
In pixels.
Definition: WxSubsystem.h:462
static wxBitmap getMRPTDefaultIcon()
CDisplayWindow3D * m_win3D
Definition: WxSubsystem.h:405
static volatile CWXMainFrame * oneInstance
Definition: WxSubsystem.h:154
C3DWindowDialog(CDisplayWindow3D *win3D, WxSubsystem::CWXMainFrame *parent, wxWindowID id=-1, const std::string &caption=std::string("[MRPT-CDisplayWindow3D]"), wxSize initialSize=wxDefaultSize)
std::mutex m_csWxMainThreadId
The critical section for accessing "m_wxMainThreadId".
Definition: WxSubsystem.h:176
static TWxMainThreadData & GetWxMainThreadInstance()
wxMRPTImageControl(wxWindow *parent, wxWindowID winID, int x, int y, int width, int height)
void OnResize(wxSizeEvent &event)
WxSubsystem::CWXMainFrame * m_mainFrame
Definition: WxSubsystem.h:449
int OPCODE
Valid codes are: For CDisplayWindow:
Definition: WxSubsystem.h:297
GLenum GLsizei width
Definition: glext.h:3531
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:4178
void OnChar(wxKeyEvent &event)
static std::queue< TRequestToWxMainThread * > * listPendingWxRequests
Do not access directly to this, use the thread-safe functions.
Definition: WxSubsystem.h:320
static const long ID_MENUITEM1
Definition: WxSubsystem.h:430
CWindowDialogPlots(CDisplayWindowPlots *winPlots, WxSubsystem::CWXMainFrame *parent, wxWindowID id=-1, const std::string &caption=std::string("[MRPT-CDisplayWindowPlots]"), wxSize initialSize=wxDefaultSize)
wxMRPTImageControl * m_image
Definition: WxSubsystem.h:375
CDisplayWindowPlots * m_winPlots
Definition: WxSubsystem.h:448
static const long ID_PLOT
Definition: WxSubsystem.h:453
void OnKeyDown(wxKeyEvent &event)
GLuint color
Definition: glext.h:8300
void OnMouseDown(wxMouseEvent &event)
void OnMenuClose(wxCommandEvent &event)
void OnMenuSelected(wxCommandEvent &ev)
CWXMainFrame(wxWindow *parent, wxWindowID id=-1)
A custom control to display the bitmap and avoid flicker.
Definition: WxSubsystem.h:334
mrpt::math::TPoint2D m_curCursorPos
In graph coords.
Definition: WxSubsystem.h:460
TOpenGLFont
Existing fonts for 2D texts in mrpt::opengl methods.
Definition: opengl_fonts.h:23
std::promise< void > m_semWxMainThreadReady
This is signaled when wxMainThread is ready.
Definition: WxSubsystem.h:173
GLint GLvoid * img
Definition: glext.h:3763
TOpenGLFontStyle
Different style for vectorized font rendering.
Definition: opengl_fonts.h:34
This class creates a window as a graphical user interface (GUI) for displaying images to the user...
void plot(const mrpt::math::CVectorFloat &x, const mrpt::math::CVectorFloat &y, const std::string &lineFormat, const std::string &plotName)
Redirected from CDisplayWindowPlots::plot.
The main frame of the wxWidgets application.
Definition: WxSubsystem.h:133
CDisplayWindow * m_win2D
Definition: WxSubsystem.h:371
The wx dialog for gui::CDisplayWindow.
Definition: WxSubsystem.h:329
bool sourceCameraSelectDialog
Only one of source* can be non-nullptr, indicating the class that generated the request.
Definition: WxSubsystem.h:219
void OnMouseMove(wxMouseEvent &event)
static void wxMainThread()
This will be the "MAIN" of wxWidgets: It starts an application object and does not end until all the ...
GLsizei const GLchar ** string
Definition: glext.h:4101
void image(void *theWxImage, const float &x0, const float &y0, const float &w, const float &h, const std::string &plotName)
Redirected from CDisplayWindowPlots::image.
void OnChar(wxKeyEvent &event)
void OnMouseMove(wxMouseEvent &event)
static void waitWxShutdownsIfNoWindows()
This method must be called in the destructor of the user class FROM THE MAIN THREAD, in order to wait for the shutdown of the wx thread if this was the last open window.
static const long ID_MENU_PRINT
Definition: WxSubsystem.h:454
WxSubsystem::CWXMainFrame * m_mainFrame
Definition: WxSubsystem.h:372
void OnResize(wxSizeEvent &event)
This class implements the GUI thread required for the wxWidgets-based GUI.
Definition: WxSubsystem.h:97
void OnClose(wxCloseEvent &event)
void OnMenuAbout(wxCommandEvent &event)
void plotEllipse(const mrpt::math::CVectorFloat &x, const mrpt::math::CVectorFloat &y, const std::string &lineFormat, const std::string &plotName, bool showName=false)
Redirected from CDisplayWindowPlots::plotEllipse.
A RGB color - floats in the range [0,1].
Definition: TColor.h:77
static const long ID_IMAGE_BITMAP
Definition: WxSubsystem.h:377
void OnMouseDown(wxMouseEvent &event)
CWindowDialog(CDisplayWindow *win2D, WxSubsystem::CWXMainFrame *parent, wxWindowID id=-1, const std::string &caption=std::string("[MRPT-CDisplayWindow]"), wxSize initialSize=wxDefaultSize)
static CAuxWxSubsystemShutdowner global_wxsubsystem_shutdown
Definition: WxSubsystem.h:129
mrpt::gui::CDisplayWindowPlots * sourcePlots
Only one of source* can be non-nullptr, indicating the class that generated the request.
Definition: WxSubsystem.h:215
GLenum GLint GLint y
Definition: glext.h:3538
static bool isConsoleApp()
Will be set to true at runtime if it&#39;s not detected a running wxApp instance.
Definition: WxSubsystem.cpp:53
void OnClose(wxCloseEvent &event)
Classes for creating GUI windows for 2D and 3D visualization.
Definition: about_box.h:14
void OnMenuPrint(wxCommandEvent &event)
GLenum GLint x
Definition: glext.h:3538
mrpt::gui::CDisplayWindow * source2D
Only one of source* can be non-nullptr, indicating the class that generated the request.
Definition: WxSubsystem.h:207
void OnMenuAbout(wxCommandEvent &event)
GLenum GLsizei GLsizei height
Definition: glext.h:3554
std::string str
Parameters, depending on OPCODE.
Definition: WxSubsystem.h:223
WxSubsystem::CWXMainFrame * m_mainFrame
Definition: WxSubsystem.h:406
Lightweight 2D point.
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: glext.h:3546
static const long ID_MENUITEM2
Definition: WxSubsystem.h:431
static bool createOneInstanceMainThread()
Thread-safe method to create one single instance of the main wxWidgets thread: it will create the thr...
static int notifyWindowDestruction()
Atomically decrements the number of windows created with the main frame as parent.
CMyGLCanvas_DisplayWindow3D * m_canvas
Definition: WxSubsystem.h:408
A graphical user interface (GUI) for efficiently rendering 3D scenes in real-time.
bool m_firstSubmenu
to know whether to insert a separator the first time.
Definition: WxSubsystem.h:456



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020