Developer

API Reference

ICardContainer_Insert()

Brew Release
Brew MP 1.0.2
See Also
- ICardContainer_Remove
- ICardContainer_Activate
- ICardContainer
- IWidget
Description
This function allows an application to insert a widget into the card container's widget stack -- at the top of the stack, at the bottom, or someplace in-between. For example, an application might choose to initially create the widget that will be topmost in the card container, allow that widget to be quickly displayed, then delay the creation of underlying widgets, creating each at some position behind the topmost widget. Likewise, an application may choose to create a new widget, on the fly, in response to a particular event, then insert that widget at some specific place within the card container based on some other criteria. ICardContainer_Insert() provides facilities for controlling where in the card container's widget stack a widget will be placed. To activate this inserted widget, call ICardContainer_Activate() method.
Parameters
  • p
    []:
    [in] A pointer to an ICardContainer object.
  • pw
    []:
    [in] Pointer to the widget to be inserted into the card container's widget stack.
  • pb
    []:
    [in] Indicates where in the card container's widget stack that the new widget should be inserted. This value may be expressed as either a pointer to a widget already in the widget stack, in which case the new widget will be inserted immediately before the widget pointed to by 'pb' -- or as a constant that identifies a relative position within the widget stack, as follows - WIDGET_ZNORMAL - Allow BREW to place the inserted widget at the default location. For a card container, this places the new widget at the top of container's widget stack. WIDGET_ZTOPMOST - The new widget should be inserted as the topmost widget in the container's widget stack. WIDGET_ZBOTTOMMOST - The new widget should be inserted at the bottommost widget in the container's widget stack.

Prototype
   int ICardContainer_Insert(ICardContainer *p, IWidget *pw, IWidget *pb);
Return
   
   AEE_SUCCESS   --  The widget was successfully inserted into the card container's widget stack.
   AEE_EBADPARM  --  The widget pointer passed in 'pw' either does not exist, or refers to a widget
                 that is not in the card container's widget stack.
   ENOMEMORY --  The widget stack could not grow to accommodate a new widget.

Side Effect
None
Comment
None
  • Follow