Class ParamUIDesc

3DS Max Plug-In SDK

Class ParamUIDesc

See Also: Class IParamMap, Parameter Maps.

Description:

The ParamUIDesc class is used in conjunction with the parameter maps mechanism. It is used for creating descriptors that define the properties of a user interface control such as its type (spinner, radio button, check box, etc.), which resource ID it refers to, and which index into the virtual array of parameters it uses. See the Advanced Topics section on Parameter Maps for an overview of how these descriptors are used.

Methods

Prototype:

ParamUIDesc(int index,

EditSpinnerType spinType,int idEdit,int idSpin,

float lowLim,float highLim,float scale,

ParamDimension *dim=defaultDim);

Remarks:

Constructor. This constructor is used for a float or int controlled by a single spinner control:

Parameters:

int index

This is the index into the IParamArray virtual array of this UI control.

EditSpinnerType spinType

This parameter specifies the type of value which may be entered. The valid types (listed in CUSTCONT.H) are:

image\bullet.gif EDITTYPE_INT - Any integer value.

image\bullet.gif EDITTYPE_FLOAT - Any floating point value.

image\bullet.gif EDITTYPE_UNIVERSE - This is a value in world space units. It respects the systems unit settings (for example feet and inches).

image\bullet.gif EDITTYPE_POS_INT - Any integer >= 0

image\bullet.gif EDITTYPE_POS_FLOAT - Any floating point value >= 0.0

image\bullet.gif EDITTYPE_POS_UNIVERSE - This is a positive value in world space units. It respects the systems unit settings (for example feet and inches) .

image\bullet.gif EDITTYPE_TIME - This is a time value. It respects the system time settings (SMPTE for example).

int idEdit, int idSpin

These are the resource IDs the edit control and the spinner control.

float lowLim

This is the minimum value the spinner can take on.

float highLim

This is the maximum value the spinner can take on.

float scale

This is the increment or decrement value used when the user uses the up or down arrow buttons of the spinner control. You may also pass the value SPIN_AUTOSCALE. This causes 3ds max to automatically adjust the value used to increment or decrement based on the current value being edited. This allows the spinner to cover a wider range of values with less mouse movement or button clicking from the user.

Prototype:

ParamUIDesc(int index,ControlType type,int *ctrlIDs,

int count,int *vals=NULL);

Remarks:

Constructor. This constructor is used for an int controlled by n radio buttons where

vals[i] represents the value if ctrlIDs[i] is checked. If vals=NULL then ctrlIDs[i] represents a value of i.

Or it may be used for:

An int controlled by multiple check boxes where each check boxes controls a single bit.

vals[i] specifies which bit ctrlIds[i] controls. If vals=NULL then ctrlIDs[i] controls the i-th bit.

Parameters:

int index

This is the index into the IParamArray virtual array of this UI control.

ControlType type

This specifies the type of control to use. The available control are:

image\bullet.gif TYPE_RADIO - Radio Buttons.

image\bullet.gif TYPE_MULTICHEKBOX - Multiple Check Boxes. Note: This option is not currently supported.

int *ctrlIDs

An array of control IDs. See the Remarks above.

int count

This is the number of control IDs in the array above.

int *vals=NULL

An array of values. See the Remarks above.

Prototype:

ParamUIDesc(int index,ControlType type,int id);

Remarks:

Constructor. This version is used for an int controlled by a single check box (BOOL) or a Point3 controlled by a color swatch.

Parameters:

int index

This is the index into the IParamArray virtual array of this UI control.

ControlType type

This specifies the type of control to use. The available control types (defined in IPARAM.H) are:

image\bullet.gif TYPE_SPINNER - Spinner Control.

image\bullet.gif TYPE_RADIO - Radio Button.

image\bullet.gif TYPE_SINGLECHEKBOX - Single Check Box.

image\bullet.gif TYPE_MULTICHEKBOX - Multiple Check Boxes. Note: This option is not currently supported.

image\bullet.gif TYPE_COLORSWATCH - Color Swatch.

int id

This is the resource ID of the control.

Prototype:

ParamUIDesc(int index,EditSpinnerType spinType,int idEdit1,

int idSpin1,int idEdit2,int idSpin2,int idEdit3,

int idSpin3,float lowLim,float highLim,float scale,

ParamDimension *dim=defaultDim);

Remarks:

Implemented by the System.

This version if for a Point3 controlled by 3 spinners

Parameters:

int index

This is the index into the IParamArray virtual array of this UI control.

EditSpinnerType spinType

This parameter specifies the type of value which may be entered. The valid types (listed in CUSTCONT.H) are:

image\bullet.gif EDITTYPE_INT - Any integer value.

image\bullet.gif EDITTYPE_FLOAT - Any floating point value.

image\bullet.gif EDITTYPE_UNIVERSE - This is a value in world space units. It respects the systems unit settings (for example feet and inches).

image\bullet.gif EDITTYPE_POS_INT - Any integer >= 0

image\bullet.gif EDITTYPE_POS_FLOAT - Any floating point value >= 0.0

image\bullet.gif EDITTYPE_POS_UNIVERSE - This is a positive value in world space units. It respects the systems unit settings (for example feet and inches) .

image\bullet.gif EDITTYPE_TIME - This is a time value. It respects the system time settings (SMPTE for example).

int idEdit1,int idSpin1

These are the resource IDs of the first edit and spinner controls.

int idEdit2,int idSpin2

These are the resource IDs of the second edit and spinner controls.

int idEdit3,int idSpin3

These are the resource IDs of the third edit and spinner controls.

float lowLim

This is the minimum value the spinner can take on.

float highLim

This is the maximum value the spinner can take on.

float scale

This is the increment or decrement value used when the user uses the up or down arrow buttons of the spinner control. You may also pass the value SPIN_AUTOSCALE. This causes 3ds max to automatically adjust the value used to increment or decrement based on the current value being edited. This allows the spinner to cover a wider range of values with less mouse movement or button clicking from the user.

ParamDimension *dim=defaultDim

This parameter represents the type and magnitude of the parameter. See ParamDimension.