- pif:Pointer to the IMenuModel interface object.
- pv:Pointer to the data that defines the content for this item. How this data is exposed on the display is up to the object that has attached itself to the menu model. The data could be as simple as a text string or as complex a lengthy data structure.
- c:The command ID assigned to this item.
- e:A set of flags that indicate various state, display or behavioral attributes for the menu item. The defined menu item flags
int IMenuModel_Add(IMenuModel *pif, void *pv, uint16 c, uint16 e);
AEE_SUCCESS - The item was successfully added to the menu model. ENOMEMORY - The menu model was unable to allocate enough memory to accommodate the new item.
The fields of the ListModelEvent will contain the following information:
pos: The index of the menu item that has been inserted into the model. oldSize: The number of items that were in the menu model before adding the new item. newSize: The number of items that are now stored in the menu model after adding the new item.