A parameter map can be considered as a table of parameter handlers. The parameter map provides the processing required to map the UI controls to the variables that these controls affect. The parameter map operates on an array of parameters. Each control is one element of the virtual array. Each roll-up page in the command panel is treated as its own virtual array.
For processing parameter blocks, the parameter map manages everything. When a user operates the UI controls of the plug-in, the parameter map processes the messages sent by the controls and stores any values in the parameter block which need to be set.
For processing other variables, the developer needs to provide a way for the parameter map to get and set an element of the virtual array. To do this, the developer assigns an integer index to each parameter. The developer also implements a set of GetValue()
and SetValue()
methods.
The primary classes involving parameter maps the developer must be aware of:
ParamUIDesc
- These are descriptors that define the properties of the UI control such as its type (spinner, radio button, check box, and so others), which resource ID it refers to (which control in the dialog template), and which index in the virtual array to use.ParamBlockDescID
- This class describes each parameter of a parameter block by its type (int, float, point, color), whether it can be animated or is constant, and an ID used to help manage backward compatibility of parameter blocks.IParamArray
- This is the base class from which parameter maps and parameter blocks are derived. This class represents a virtual array of parameters.IParamMap
- This class provides a set of methods to work with the parameter map, for example, retrieving a pointer to the parameter block used.