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


API Reference


Brew Release
Brew MP 1.0.2
See Also
Error Codes IWidget IWidget_SetFlags IWidget_GetFlags IWidget_RemoveFlags Widget Events
This helper function allows the application to enable specific flags in a widget without disabling any of the flags already set. Unlike IWidget_SetFlags(), this routine switches the specified flags on while leaving all others untouched.
The application should pass the set of flags to be enabled as a logically ORed set in the dwFlagsToAdd parameter. These will be switched on internally in addition to whatever else was enabled before the call.
This helper function calls IWidget_GetFlags() to retrieve the current set of enabled flags, ORs in the set of flags to be turned on, then uses IWidget_SetFlags() to enable the new set along with the old. If the widget doesn't support the PROP_FLAGS parameter, an error code will be returned. To determine if a specific type of widget supports PROP_FLAGS and what flags can be set, refer to that widget's documentation.
For example, the Text Widget defines and understands the TWF_MULTILINE, TWF_VERTICALNAV and TWF_PASSWORD flags. Each of these causes a text widget to behave differently. To tell a multiline text widget to allow vertical navigation, an application may call
IWidget_AddFlags(pTextWidget, TWF_VERTICALNAV);
This is equivalent to the following, which enables vertical navigation and retains the multiline behavior:
   IWidget_GetFlags(pTextWidget, &dwCurFlags);
   dwCurFlags |= TWF_VERTICALNAV;
   IWidget_SetFlags(pTextWidget, dwCurFlags);
[in] Pointer to the IWidget interface object.
[in] Set of logically ORed flags to turn on in the widget
  •    int IWidget_AddFlags(IWidget *pif, uint32 dwFlagsToAdd);
  • AEE_SUCCESS : The widget was able to handle the event, and the specified flags were enabled. AEE_EFAILED : The widget was unable to handle the event, and the widget's flags remain unchanged.
Side Effect
  • Depending on the widget implementation and what flags were set, the widget's behavior will change. Refer to the widget's documentation to see what specific flags it supports and what effect they have.
Use this routine to turn on certain flags without disabling others. IWidget_AddFlags(pif, dwFlags) is equivalent to: IWidget_GetFlags(pif, &dwCurFlags); dwCurFlags |= dwFlags; IWidget_SetFlags(pif, dwCurFlags); Use IWidget_RemoveFlags() to switch off specific flags.