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


API Reference


Brew Release
Brew MP 1.0.2
See Also
-IContainer Interface -IContainer_Remove() -IConstraintContainer Interface -IPropContainer Interface -IXYContainer Interface -ICardContainer Interface -IWidget Interface

This function inserts a new widget into the container. Insertion behavior is defined by each container implementation specifically and may not be supported for some containers. This function should only be called from the function definitions in derived containers.
Pointer to the IContainer interface object that serves as the parent to the widget to locate.
Pointer to the widget to be inserted
Pointer to the widget to insert the new widget before. Constants can be used to identify a relative position for the widget to be located, are defined as follows. WIDGET_ZTOPMOST - Locate the widget at the top of the container's widget stack. WIDGET_ZBOTTOMMOST - Locate the widget at the bottom of the container's widget stack. WIDGET_ZNORMAL - Locate the widget placed at the container's most normal layout location. The base container treats the WIDGET_ZTOPMOST position as the "normal" location.
Pointer to a descriptor that can convey container specific information regarding the insertion. Derived containers use this parameter to pass in information such as location, proportions or constraints. If NULL is passed in for this parameter, the derived container will insert the widget with a "default" pDesc determined by the derived container. Please consult the derived container's insert function for information about its default behavior when this parameter is NULL.
  •    int IContainer_Insert(IContainer *p, IWidget *pw, IWIdget *pb, void *pDesc)
  •    AEE_SUCCESS - If the widget 'pw' was inserted successfully 
       AEE_EFAILED - If the widget 'pw' was not found in the container.
       ENOMEMORY -  The widget stack could not grow to accommodate a new widget.
       EUNSUPPORTED - The widget does not support insertion

Side Effect
  • Calling IContainer_Insert() may cause derived containers to adjust their widgets layout