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


API Reference


Brew Release
Brew MP 1.0.2
See Also
- IMenuModel Interface
This function changes the menu item attribute flags for a single menu item, which is identified by its command ID -- or all of the items stored in a menu model. The flags to be changed are identified in the 'e' parameter as a bit mask specifying which individual flags are to be changed, or by passing MMF_ALL to indicate that all the flags should change. The 'b' parameter indicates whether the specified flags should be set ('b' is TRUE) or cleared ('b' is FALSE). Flags not specified in the 'e' parameter will not be affected by a call to IMenuModel_SetItemFlags().
Pointer to the IMenuModel interface object.
The command ID assigned to the item to be changed, or MENUITEM_ALL to indicate that all the items stored by the menu model should be changed.
A set of flags that indicate various state, display or behavioral attributes for the menu item. The defined menu item flags
This boolean value specifies how the attributes identified in the 'e' will effect the current flag settings for the menu item(s). When 'b' is TRUE, the flags in 'e' will all be set. When 'b' if FALSE, the flags in 'e' will be cleared.
  •    int IMenuModel_SetItemFlags(IMenuModel *pif, uint16 c, uint16 e, boolean b); 
  •    AEE_SUCCESS   - The model was able to successfully set the specified flags
       AEE_EBADPARM  - The requested index is not within the range of items stored in the model.
Side Effect
  • None
To illustrate the effects of the MENUITEM_ALL constant, all of the items stored by a menu model could be disabled by calling IMenuModel_SetItemFlags() and passing MENUITEM_ALL for the 'c' parameter, MMF_ENABLED for the 'e' parameter, and FALSE for the 'b' parameter. IMenuModel_SetItemFlags (pMenuModel, MENUITEM_ALL, MMF_ENABLED, FALSE); Likewise, to enable all of the items in a menu model, IMenuModel_SetItemFlags() could be called as follows: IMenuModel_SetItemFlags (pMenuModel, MENUITEM_ALL, MMF_ENABLED, TRUE);