In order for OCTAL to be able to do all this, we'll have to tell it a little bit about each parameter. In particular, OCTAL needs to know what they're called; how they should be drawn in the tracker view; what kind of widget to use when opening a control box; a short description of the parameter that can be displayed to the user; and information about the acceptable ranges and default value for the parameter.
There's a structure called param_spec made specially for this purpose. OCTAL will expect an array of these structures, arranged in the same order as listed in the ix_* constants we defined earlier.
We can statically initialize the array like this:
param_spec my_params[] = { /* first parameter */ { my_format_type, my_widget_type, "short name", "a longer description", min_value, max_value, default_value }, /* second parameter */ { my_format_type, ... ... ... } }
With the above syntax, you can build an array of param_spec objects that match your machine's parameters. By describing them abstractly instead of in terms of graphics calls and windows, your machine can remain independent of GUI specifics.
For more specifics about the format types and widget types you can
choose from, consult the table in 3.3 (p.
).