Developer

API Reference

ICardContainer_Activate()

Brew Release
Brew MP 1.0.2
See Also
- ICardContainer Interface
- IWidget Interface
- ICardContainer_GetActive()
Description
This function allows an application to activate a specific widget within the card container's widget stack, thereby granting focus to that widget if it can take focus. There are two cases to keep in mind: (1) activating a widget which can take focus and (2) activating a widget which CANNOT take focus. In the latter case, the widget will still become active (redrawn and visible), however, the container will not have a focused widget.
Parameters
  • p
    []:
    A pointer to an ICardContainer object.
  • w
    []:
    Identifies the widget within the card container's widget stack that should be activated. This widget may be expressed explicitly as a widget pointer, or implicitly as a constant that identifies a relative position within the widget stack, as
Prototype
   int ICardContainer_Activate(ICardContainer *p, IWidget *pw);
Return
   
   AEE_SUCCESS   --  The widget was successfully activated.
   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.

Side Effect
Calling ICardContainer_Activate() will cause BREW to send an EVT_WDG_MOVEFOCUS to the card container, specifying 'pw' as the new focus item.

Comment
Though it is possible to remove the focus from an otherwise active card container, this function should not be called with 'pw' set to NULL as a means of removing the focus. To remove the focus an application should instead generate an EVT_WDG_MOVEFOCUS event, specifying WIDGET_FOCUS_NONE as the new focus item.
  • Follow