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



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019