Progress Indicator Model
Model for the progress indicator. Other model objects, such as tools, the rendering engine etc. can manage their progress status using this object. The user interace can connect to this progress model using model-view concept and represent the progress status to the user via graphical interface.
To use the progress indicator:
R3OBJ *progm;
int i;
// fetch the progress model
R3GetAttrs(currentlayer, R3T(R3LAYLA_ProgressIndicator, &progm), R3TAG_END);
// progress loop
R3SetAttrs(progress, R3T(R3PROGREA_InfoString, "Processing ..."), R3TAG_END);
R3DoA(progress, R3PROGREM_BEGIN, (void*)100);
for(i = 0; i < 100; i++) {
...
R3DoA(progress, R3PROGREM_PROGRESSTO, (void*)i);
}
R3DoA(progress, R3PROGREM_END, NULL);
R3SetAttrs(progress, R3T(R3PROGREA_InfoString, "Done!"), R3TAG_END);