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


API Reference


Brew Release
Brew MP 1.0.2
See Also
IForm IForm_ApplyTheme() FormEvent

This function sets the theme basename for the form, identifying the base name within the current theme file from which a form will apply theme data.
A single theme file may contain many sets of theme data, each set rooted at a basename. The standard forms will look for theme entries under sub-names of the basename to locate properties and other resources required to apply the theme.
By changing the theme basename, a form is indicating where in the theme file the form framework should root its searches for theme data to be applied to this specific form.
Changing the theme basename will trigger a FORMITEM_THEME_BASENAME form event to be sent to listening objects to notify them that the theme basename has changed.
The RootForm is amongst those objects listening and will update at least the title, background and softkey properties based on the new theme basename.

[in] Pointer to the IForm interface object.
[in] Specifies the section within the current theme file where the theme data for this form can be retrieved.
  •    int IForm_SetThemeBaseName(IForm *pif, char *name);
  • AEE_SUCCESS : If the form is able to successfully set the theme basename to be applied by the form. AEE_EFAILED : If the theme basename could not be set.
Side Effect
  • Calling IForm_SetThemeBaseName() will send an EVT_WDG_SETPROPERTY event to the form, requesting that the FID_THEME_BASENAME property be set.
    Successfully applying the form theme basename will cause a FORMITEM_THEME_BASENAME form event to be sent to any listening objects.
Several forms have default theme base names that will be used if the application does not override them. Default Forms (AEEIForm.h, AEEIRootForm.h): "System" (All forms) "Root" (Root forms only) Dialogs (AEEDialog.h): "System.ProgressDialog" (Progress dialogs only) Popups (AEEIPopupMenu.h): "System.PopupMenu" (Popup menus only)