You copied the Doc URL to your clipboard.

The MxPluginDialogParameter classes

The MxPluginDialogParameter classes enable creating entries (composed of a name and a value) and inserting them into the custom dialog.

These parameter name and value pairs are presented to you for user input. If you press the OK button on the dialog, the new parameter values can be retrieved and used for further processing.

MxPluginDialogParamType enumerates the dialog parameter types available:

typedef enum{
    MX_PLUGIN_DIALOG_PARAM_STRING,
    MX_PLUGIN_DIALOG_PARAM_INT,
    MX_PLUGIN_DIALOG_PARAM_FLOAT,
    MX_PLUGIN_DIALOG_PARAM_BOOL
} MxPluginDialogParamType;

The MxPluginDialogParameter class is the base class for the different parameter variants:

class  MxPluginDialogParameter{
public:
    MxPluginDialogParameter(const char *name, const char *text, 
        bool _editable, MxPluginDialogParamType type);
    virtual MxPluginDialogParamType getType();
    virtual const char *getName();
    virtual const char *getText();
    virtual void setWidget(void *);
    virtual void *getWidget();
    virtual void setEditable(bool);
    virtual bool getEditable();
private:
    MxPluginDialogParamType type;
    string name;
    string text;
    void *widget;
    bool editable;
};

The MxPluginDialogStringParameter, MxPluginDialogIntParameter, MxPluginDialogFloatParameter, and MxPluginDialogBoolParameter classes represent the dialog parameters of type string, int, float, and bool. To create parameters of these types, instantiate an object of the corresponding parameter class, and provide it as an argument to the MxPluginDialog::addtypeParameter function (type is string, int, float, or bool).

MxPluginDialogStringParameter

class  MxPluginDialogStringParameter : public MxPluginDialogParameter {
public:
    MxPluginDialogStringParameter(const char *_name, const char *text, 
        bool _editable);
    string &getValue();
    void setValue(string &);
private:
    string value;
};

MxPluginDialogIntParameter

class  MxPluginDialogIntParameter : public MxPluginDialogParameter {
public:
    MxPluginDialogIntParameter(const char *_name, const char *text, 
        bool _editable);
    int getValue();
    void setValue(int);
private:
    int value;
};

MxPluginDialogFloatParameter

class  MxPluginDialogFloatParameter : public MxPluginDialogParameter {
public:
    MxPluginDialogFloatParameter(const char *_name, const char *text, 
        bool _editable);
    double getValue();
    void setValue(double );
private:
    double value;
};

MxPluginDialogBoolParameter

class MxPluginDialogBoolParameter : public MxPluginDialogParameter {
public:
    MxPluginDialogBoolParameter(const char *_name, const char *text, 
        bool _editable);
    bool getValue();
    void setValue(bool);
private:
    bool value;
};
Was this page helpful? Yes No