Developer

API Reference

IDrawDecorator_SetModel()

Brew Release
Brew MP 1.0.2
See Also
IDrawDecorator Interface IModel Interface IDrawDecorator_GetModel() IDecorator_SetModel() IModel_AddListener()
Description
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().
Parameters
  • pif
    []:
    Pointer to the IDrawDecorator object.
  • pm
    []:
    Pointer to the model interface that the draw decorator implementation should use as the basis for accessing its data.
Prototype
   int IDrawDecorator_SetModel(IDrawDecorator *pif, IModel *pm)
   
Return
   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
Comment
None
  • Follow