Developer

API Reference

IMenuModel_DeleteAll()

Brew Release
Brew MP 1.0.2
See Also
- Model Events
- ListModelEvent
- IMenuModel Interface
- IMenuModel_SetPfnFree()
Description
This function deletes all of the items stored in a menu model, releasing the memory referenced by each item and setting the size of the menu model to 0 (zero).
Parameters
  • pif
    []:
    Pointer to the IMenuModel interface object.
Interface
Prototype
   void IMenuModel_DeleteAll(IMenuModel *pif);
Return
None
Side Effect
Deleting the items in a menu model by calling IMenuModel_DeleteAll() will cause BREW to send an EVT_MDL_LIST_CHANGE ListModelEvent to any object that has registered as a listener with the model.
The fields of the ListModelEvent will contain the following information:
       pos:      0
       oldSize:  The number of items in the menu model before calling IMenuModel_DeleteAll().
       newSize:  0 (since there are now no more items in the menu model)
Comment
The menu model may define a custom free memory routine to release the memory consumed by complex items. The custom free memory routine is registered with the menu model by calling IMenuModel_SetPfnFree() and will be called when issuing IMenuModel_DeleteAll().
  • Follow