3.56 DM_ResetMultiValue
Using this function you are able to reset various attributes of different DM objects to their model value in one function call. Therefore these functions should be especially used with the distributed DM, since they obviously reduce the network load.
For the permitted attributes of the respective object type please refer to the “Object Reference”.
DM_Boolean DML_default DM_EXPORT DM_ResetMultiValue
(
DM_MultiValue *values,
DM_UInt count,
DM_ID dialogID,
DM_String pathname,
DM_Options options
)
Parameters
<-> DM_MultiValue *values
List of attributes and objects to be reset. If the element in the structure for the object is set to 0, the object described in the parameter pathname is chosen. The list has to have at least the length specified in the parameter count.
-> DM_UInt count
Specifies the length of the object-attribute vector indicated in the parameter values.
-> DM_ID dialogID
This parameter describes the dialog to which the given objects belong. It has to be specified only if the object identifier the attributes of which are to be reset is not known and thus the name of the object is given in the parameter pathname.
-> DM_String pathname
Describes the object the attributes of which are to be reset. It is allocated only if the object's internal identifier is not known yet.
-> DM_Options options
Currently not used. Please specify with 0.
Return Value
TRUE |
The attributes were reset successfully |
FALSE |
At least one attribute could not be reset |
Example
Resetting coordinates for several objects:
void DML_default DM_ENTRY Reset __3((DM_ID, o1),
(DM_ID, o2),
(DM_ID, o3))
{
DM_MultiValue val[3];
/* Setting the relevant object ID */
val[0].object = o1;
val[1].object = o2;
val[2].object = o3;
/* Setting the relevant index type */
val[0].index.type = DT_void;
val[1].index.type = DT_void;
val[2].index.type = DT_void;
/* Setting the relevant attributes */
val[0].attribute = AT_xleft;
val[1].attribute = AT_width;
val[2].attribute = AT_xright;
DM_ResetMultiValue(val, 3, dialogID, (char *)0, 0);
}