API Reference


Brew Release
Brew MP 1.0.2
See Also
Error Codes IModel IWidget IWidget_SetModel
This function retrieves the model that provides data to a given widget. The model that is returned will implement the interface for the given class id. To illustrate, a widget that displays television signals might get its data from an HDTV model, and as such could retrieve a pointer to the appropriate model interface by calling IWidget_GetModel(), passing in a pointer to the "television widget", and the class ID of the HDTV model interface. The function would then return a reference to the appropriate model interface used to source the television widget.
  • pif
    [in] Pointer to the IWidget object.
  • id
    [in] The class id of the model interface the widget will use as a source for data.
  • ppm
    [out] Pointer to an IModel pointer into which the function will return a pointer to the IModel interface that supports the passed class id.
   int IWidget_GetModel(IWidget *pif, AEECLSID id, IModel **ppm);
AEE_SUCCESS : The function was able to successfully locate a model interface for the indicated 'id'. AEE_EFAILED : The requested model interface is not currently declared.
A pointer to the model interface associated with the widget is returned in 'ppm', or NULL if the widget does not utilize a model interface.
Side Effect
  • Follow