Developer

API Reference

IContainer_Insert()

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

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.
Parameters
  • p
    []:
    Pointer to the IContainer interface object that serves as the parent to the widget to locate.
  • pw
    []:
    Pointer to the widget to be inserted
  • pb
    []:
    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.
  • pDesc
    []:
    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.
Interface
Prototype
   int IContainer_Insert(IContainer *p, IWidget *pw, IWIdget *pb, void *pDesc)
Return
   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
Comment
None
  • Follow