struct mrpt::gui::WxSubsystem::TRequestToWxMainThread

Overview

The data structure for each inter-thread request.

The OPCODE field selects the operation; use the WxSubsystem::OpCode enum for all assignments and comparisons — never use raw integer literals.

#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;
    OpCode OPCODE {OpCode::SHUTDOWN};
    std::function<void(void)> userFunction;

    // construction

    TRequestToWxMainThread();
};

Fields

mrpt::gui::CDisplayWindow* source2D {nullptr}

Only one of source* can be non-nullptr, indicating the class that generated the request.

bool sourceCameraSelectDialog {false}

Set to true when the request originates from a camera-select dialog.

std::string str

String parameter; meaning depends on OPCODE.

void* voidPtr {nullptr}

Generic pointer parameters; meaning depends on OPCODE.

OpCode OPCODE {OpCode::SHUTDOWN}

Operation to perform.

Use WxSubsystem::OpCode values.

std::function<void(void)> userFunction

Callable invoked in the GUI thread when OPCODE == RUN_USER_FUNCTION.