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



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at lun oct 28 00:14:14 CET 2019