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_GetProperty IWidget_SetFlags Widget Events
This helper function allows the application to query the widget for the flags that are set internally. This routine places the logically ORed set of flags in the pdwFlags parameter. The application may bitwise AND this result with the flags the widget supports to determine which options are enabled or not.
IWidget_GetFlags() calls IWidget_GetProperty() to retrieve the PROP_FLAGS property. Calling IWidget_GetFlags() on a widget that doesn't support PROP_FLAGS will result in an error. To determine if a specific type of widget supports PROP_FLAGS and what set of flags the widget understands, consult the 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 determine if a specific flag is set, an application would call:
IWidget_GetFlags(pTextWidget, &dwFlags);
The application can bitwise AND the result to determine which flags are set and which behavior the text widget currently exhibits:
bTextIsMultiline = (dwFlags&TWF_MULTILINE); bVerticalNavAllowed = (dwFlags&TWF_VERTICALNAV); bInPasswordMode = (dwFlags&TWF_PASSWORD);
[in] Pointer to the IWidget interface object.
[out] Pointer to a uint32 that will be set to the logically ORed set of flags that are turned on in the widget.
  •    int IWidget_GetFlags(IWidget *pif, uint32 *pdwFlags);
  • AEE_SUCCESS : The widget was able to handle the event, and the set of enabled flags was returned. AEE_EFAILED : The widget was unable to handle the event, and nothing valid was returned.
Side Effect
  • None.
Use this routine to see all flags that are set internally in the widget by default or by the last call to IWidget_SetFlags().