API Reference | developer.brewmp.com API Reference | developer.brewmp.com


API Reference


Brew Release
Brew MP 1.0.2
See Also
IDrawDecorator Interface IModel Interface IDrawDecorator_GetModel() IDecorator_SetModel() IModel_AddListener()
This function allows a draw decorator implementation to associate itself with a specific model interface. To make this association, an application would first retrieve an IModel pointer for the desired interface class ID, then attach this model to the draw decorator implementation by passing the model pointer and draw decorator pointer to IDrawDecorator_SetModel().
Once the draw decorator implementation has associated itself with a given model interface, it should register as a listener for that model. As a listener, the draw decorator implementation will receive notifications each time the model's data changes, thereby providing the opportunity for the draw decorator implementation to update its display or act in some other meaningful way to reflect the current data.
IDrawDecorator_SetModel() inherits wholly from IDecorator_SetModel().
Pointer to the IDrawDecorator object.
Pointer to the model interface that the draw decorator implementation should use as the basis for accessing its data.
  •    int IDrawDecorator_SetModel(IDrawDecorator *pif, IModel *pm)
  •    AEE_SUCCESS          - The function was able to successfully associate the draw decorator 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 draw decorator.

Side Effect
  • None