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

Developer

API Reference

WIDGET EVENTS

Brew Release
Brew MP 1.0.2
See Also
Description
The widget framework defines a small set of BREW events used to notify objects of various state or property changes involving a widget object. These events are sent to objects in addition to the normal set of BREW interface events such as key press events and other UI related events. A widget's event handler should be prepared to handle these events in whatever manner is appropriate for the behavior of that object. For example, the EVT_WDG_GETPROPERTY event will be sent to an widget to retrieve attributes or characteristics that apply to that particular object. To illustrate, a widget that contains a display banner of some sort would likely respond to an EVT_WDG_GETPROPERTY event specifying WID_TITLE as the requested property type, by returning the text of the widget's display banner.
The table below lists the AEE event codes supported by the widget framework, identifying the data structure that will be sent with the notification.
Definition
  • AEE Event Code                Description
    --------------                ------------------------------------------------------
    EVT_WDG_SETFOCUS:             The focus for this widget has changed or has been cleared.
                                  The 'wParam' parameter of the event contains a boolean value
                                  indicating whether or not the new focus item should become
                                  active.  The widget receiving this event should return TRUE
                                  if it accepts the focus, FALSE if it does not, and may choose
                                  to invalidate itself or respond to the focus change in some
                                  other meaningful way. The helper function, IWidget_SetFocus(),
                                  is also available.  
    
    EVT_WDG_CANTAKEFOCUS:         The widget is being asked if it can take focus. The 'dwParam'
                                  should be a pointer to a boolean in memory, which will be
                                  set to either TRUE (if the widget can take focus) or FALSE
                                  (if the widget is unable to take focus).  The helper function,
                                  IWidget_CanTakeFocus(), is also available.
                                  
    EVT_WDG_HASFOCUS:             The widget is being asked if it currently has focus.  The
                                  'dwParam' should be a pointer to a boolean in memory, which will
                                  be set to either TRUE (if the widget currently has focus) or
                                  FALSE (if the widget does not currently has focus).  The
                                  helper function, IWidget_HasFocus(), is also available.
    
    EVT_WDG_GETPROPERTY:          The widget is being asked to return a particular property, as
                                  specified in the 'wParam' parameter, returning the value of the
                                  property in the buffer pointed to by the 'dwParam' parameter.
                                  Widget properties are defined in AEEWidgetProperties.h and include
                                  attributes such as color, border width, shadowing, etc.  The
                                  widget receiving this event should return TRUE if it is able to
                                  retrieve the requested property, FALSE if no such property exists
                                  for the widget.
                                  
    EVT_WDG_SETPROPERTY:          The widget is being asked to set the value for a particular
                                  property, as specified in the 'wParam' parameter.  The 'dwParam'
                                  parameter of the event will contain the property's new value.
                                  Widget properties are defined in AEEWidgetProperties.h and include
                                  attributes such as color, border width, shadowing, etc.  The
                                  widget receiving this event should return TRUE if it is able to
                                  successfully set the specified property, FALSE if no such property
                                  exists for the widget.
    
    
    EVT_WDG_WINDOWSTATUS:         This event is used by WindowManager to provide window status
                                  to the widget that was used to create the window. Widgets, by 
                                  themselves, do not handle this event and widget based applications
                                  can ignore this event. Window-based applications should set a handler
                                  on the widget, which is used to create the window and look for this
                                  property for various window status events like creation, removal of 
                                  the window. 
    
Comments
None