struct mrpt::gui::WxSubsystem::TRequestToWxMainThread¶
The data structure for each inter-thread request:
#include <mrpt/gui/WxSubsystem.h> struct TRequestToWxMainThread { // fields mrpt::gui::CDisplayWindow* source2D {nullptr}; mrpt::gui::CDisplayWindow3D* source3D {nullptr}; mrpt::gui::CDisplayWindowPlots* sourcePlots {nullptr}; bool sourceCameraSelectDialog {false}; std::string str; void* voidPtr {nullptr}; void* voidPtr2 {nullptr}; int x {400}; int y {400}; bool boolVal {false}; mrpt::math::CVectorFloat vector_x; mrpt::math::CVectorFloat vector_y; std::string plotName; int OPCODE; };
Fields¶
mrpt::gui::CDisplayWindow* source2D {nullptr}
Only one of source* can be non-nullptr, indicating the class that generated the request.
mrpt::gui::CDisplayWindow3D* source3D {nullptr}
Only one of source* can be non-nullptr, indicating the class that generated the request.
mrpt::gui::CDisplayWindowPlots* sourcePlots {nullptr}
Only one of source* can be non-nullptr, indicating the class that generated the request.
bool sourceCameraSelectDialog {false}
Only one of source* can be non-nullptr, indicating the class that generated the request.
std::string str
Parameters, depending on OPCODE.
void* voidPtr {nullptr}
Parameters, depending on OPCODE.
int OPCODE
Valid codes are: For CDisplayWindow :
200: Create a new 2D window, with caption “str” and initial size “x” & “y”, and save the “wxFrame*” in the “void**” passed in voidPtr.
201: Updates the image shown in the window, from a “wxImage*” passed in voidPtr2. The wxImage object will be freed with delete after that. voidPtr must be a “wxFrame*”, a “CWindowDialog*” actually.
202: Set position to x,y
203: Change size to x,y
204: Change title to “str”
299: Delete the window associated with this source object.
For CDisplayWindow3D :
300: Create a new 3D window, with caption “str” and initial size “x” & “y”, and save the “wxFrame*” in the “void**” passed in voidPtr.
302: Set position to x,y
303: Change size to x,y
304: Change title to “str”
350: Force refresh
[Removed in MRPT2] 360: Add a 2D text message:
[Removed in MRPT2] 361: Clear all 2D text messages.
[Removed in MRPT2] 362: Add a 2D text message (vector font)
370: Change min/max range: min=vector_x[0], max=vector_x[1]
399: Delete the window associated with this source object.
For CDisplayWindowPlots :
400: Create a new Plots window, with caption “str” and initial size “x” & “y”,and save the “wxFrame*” in the “void**” passed in voidPtr.
402: Set position to x,y
403: Change size to x,y
404: Change title to “str”
499: Delete the window associated with this source object.
410: Depending on “boolVal”, enable/disable the mouse-zoom & pan
411: Depending on “boolVal”, enable/disable the aspect ratio fix
412: Zoom over a rectangle vectorx[0-1] & vectory[0-1]
413: Axis fit, with aspect ratio fix to boolVal.
414: Clear all plot objects.
420: Add/update a 2D line/points plot: x/y data= vector_x/vector_y, format string=str, plot name =plotName.
421: Add/update a 2D ellipse: format string=str, plot name =plotName, vector_x[0,1]:X/Y center, vector_x[2]:quantiles, vector_y[0,1,2]: Covariance matrix entries 00,11,01, boolVal=showName?
422: Add/update a bitmap: plot name =plotName, vector_x[0,1]:X/Y corner, vector_x[2,3]: X/Y widths, voidPtr2: pointer to a newly created wxImage with the bitmap.
440: Insert submenu in the popup menu. plotName=menu label, x=user-defined ID.
700: Shows a camera-pick-dialog and wait for user selection. “voidPtr” must point to a CSemaphore, which will be signaled twice (1st upon construction, 2nd upon dialog close); voidPtr2 must point to a “mrpt::gui::CPanelCameraSelection*” which will be filled with the selection (the panel must be deleted by the caller)