Once the widget has associated itself with a given model interface, it should register as a listener for that model. As a listener, the widget will receive notifications each time the model's data changes, thereby providing the opportunity for the widget to update its display or act in some other meaning- ful way to reflect the current data.
All provided widgets will send out an EVT_MDL_SETMODEL event through their ViewModel when this function is called.
int IWidget_SetModel(IWidget *pif, IModel *pm);
- AEE_SUCCESS : The function was able to successfully associate the widget
with the specified model interface.
AEE_ECLASSNOTSUPPORT : The model interface passed to the function does not support
a model interface class ID that is known to the widget.
For example, the button widget expects to be used with the
value model, and will verify that the model pointer in 'pm'
supports the value model class ID.
- A EVT_MDL_SETMODEL event is sent through the ViewModel of the widget to indicate the change of model