API Reference


Items marked as deprecated have been replaced by a more powerful, alternative feature. Deprecated interfaces include a reference to the replacement interface, which should be used for all new application development. Deprecated features are still supported for backward compatibility, but should be avoided when developing new applications.
Brew Release
Brew MP 1.0.2
See Also
Sets the text to be displayed by the static widget. The widget can contain either a text model or a value model. A value model stores a pointer to the text memory, which may be owned by the caller, or if 'bFree' is TRUE, by the value model, in which case it will be freed when the value model is destroyed. A text model copies the display text into the model. No pointers are stored within a text model and the caller is responsible for freeing all memory associated with its pointers. The bFree parameter has no effect.
This method is currently deprecated due to the use of memory management functions not compatible with mod1 modules. In the future, a mod1 compatible (IEnv based) function will be provided as IWidget_SetText.
  • piWidget
    Pointer to the IWidget object.
  • pwszTxt
    Pointer to the text that is to be displayed in the widget. This pointer will be stored in the value model.
  • bFree
    Indicates whether or not the widget's value model is responsible for freeing the text. When 'bFree' is TRUE, the value model will free the text memory when the model is destroyed, or when it is replaced with new text. When FALSE, the caller is responsible for managing the text memory. For widgets that contain a model other than a value model, when 'bFree' is TRUE, this routine frees the memory passed in pwszTxt.
   int IWIDGET_SetText(IWidget* piWidget, const AECHAR* pwszTxt, boolean bFree);
   AEE_SUCCESS - If the static widget is able to successfully set the text.
   AEE_EFAILED - If the text could not be set.

Side Effect
Calling IWIDGET_SetText() will change the value model and trigger an update of any attached objects, including the widget associated with the text.
  • Follow