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

Developer

API Reference

MODEL EVENTS

Brew Release
Brew MP 1.0.2
See Also
- ModelEvent - ListModelEvent - ScrollEvent - ITransition2 - ITransitionMgr - IObserver - IDrawHandler - IWidget_GetSelected - IController_GetWidgetPressedState - IWidget_GetPasswordMaskDelay
Description
Objects that have registered listeners with the model framework may receive a variety of events as characteristics of the model changes. For example, a widget that has registered a listener with the model will receive an EVT_MDL_VALUE event when the widget's associate value model has changed. Model events are sent to listening objects in a ModelEvent data structure, or one of the many data structures that derive from ModelEvent.
The table below lists the AEE event codes supported by the model framework, describing the circumstances that generate each event and identifying the data structure that will be sent with the notification.
Definition
  • AEE Event Code                Description
    --------------                ------------------------------------------------------------
    EVT_MDL_VALUE:                The value of the model has changed.  The widget receiving
                                  the event may choose to redraw itself or respond in some
                                  meaningful way as indicated by the new values.  The
                                  structure of the data accompanying EVT_MDL_VALUE is defined
                                  by ModelEvent.
    
    EVT_MDL_LIST_CHANGE:          The data associated with a list model has changed.  The
                                  widget receiving the event will generally invalidate itself
                                  so that it will be redrawn with the next screen update.  The
                                  structure of the data accompanying EVT_MDL_LIST_CHANGE is
                                  defined by ListModelEvent.
    
    EVT_MDL_TEXT_CHANGE:          The text associated with a text model has changed.  The
                                  widget receiving the event will generally invalidate itself
                                  so that it will be redrawn with the next screen update.  The
                                  structure of the data accompanying EVT_MDL_TEXT_CHANGE is
                                  defined by ModelEvent.
    
    EVT_MDL_TEXT_SELECT:          The selection range of a text model has been changed.  The
                                  widget receiving the event will generally invalidate itself
                                  so that it will be redrawn with the new selection range
                                  highlighted on the next screen update.  The structure of the
                                  data accompanying EVT_MDL_TEXT_SELECT is defined by
                                  ModelEvent.
    
    EVT_MDL_SCROLL_CHANGE:        The data used to track the scroll position of a model has
                                  changed in a single direction.  This event could apply to
                                  models of many different types. For example, a list model
                                  may maintain data about the visible items relative to the
                                  entire list, or a text model may maintain information
                                  relative to the current visible position in lengthy block of
                                  displayed text.  The structure of the data accompanying
                                  EVT_MDL_SCROLL_CHANGE is defined by ScrollEvent.
    
    EVT_MDL_SCROLL_XYCHANGE:      The data used to track the scroll position of a model has
                                  changed in both the horizontal and vertical directions.
                                  This event could apply to models of many different types.
                                  For example, a viewport model may maintain information
                                  relative to the current visible block in lengthy image or
                                  document.  The widget receiving the event will generally
                                  invalidate itself so that it will be redrawn with the next
                                  screen update. The structure of the data accompanying
                                  EVT_MDL_SCROLL_XYCHANGE is defined by ScrollXYEvent.
    
    EVT_MDL_MODE_CHANGE:          The mode of the TextController has changed.
    
    EVT_MDL_GROUP_ITEMACTIVATE:   The status of a set of grouped items has changed with one
                                  item now becoming activated.  The widget receiving this
                                  event would change the value of the associate model
                                  depending on whether or not the widget receiving the event
                                  was also the widget originating the event.  For example, in
                                  a group of radio button widgets, the selected radio button
                                  would set its value model to TRUE, with
                                  EVT_MDL_GROUP_ITEMACTIVATE being set to all the widgets in
                                  the group.  Each widget receiving the event would set its
                                  value model to FALSE, except for the widget that sent the
                                  initial notification.  The structure of the data
                                  accompanying EVT_MDL_GROUP_ITEMACTIVATE is defined by
                                  ModelEvent.
    
    EVT_MDL_FOCUS_CHANGE:         The focus item in the view model has changed.  For example a
                                  form may contain several interface objects, any of which
                                  could receive the UI focus.  The view model keeps track of
                                  these objects.  When the focus changes (for example, the
                                  user has navigated from one text widget to another), the
                                  view model will send an EVT_MDL_FOCUS_CHANGE event to any
                                  object that has registered for focus change events.  The
                                  object receiving this event may choose to update its display
                                  or perform other operations to reflect the focus change.
                                  For example, a form that allows the user to navigate the
                                  focus between thumbnail images may wish to update a preview
                                  pane to display a full size image as the focus changes.  The
                                  structure of the data accompanying EVT_MDL_FOCUS_CHANGE is
                                  defined by FocusEvent.
    
    EVT_MDL_FOCUS_WRAP:           The focus item in the view model has wrapped from either
                                  first item to last item last item to first in response to a
                                  user key.  This event will be sent in addition to
                                  EVT_MDL_FOCUS_CHANGE when appropriate.  The structure of the
                                  data accompanying EVT_MDL_FOCUS_WRAP is defined by
                                  FocusEvent.
    
    EVT_MDL_FOCUS_SELECT:         The focus item in the view model has been selected.  For
                                  example a form may contain several interface objects, any of
                                  which could receive the UI focus.  The view model keeps
                                  track of these objects.  When a selection has been made the
                                  view model will send an EVT_MDL_FOCUS_SELECT event to any
                                  object that has registered for focus selection events.  The
                                  object receiving this event may choose to act on the
                                  selection any way it sees fit.  For example, a form
                                  containing a list of songs may choose to start playing the
                                  selected item through the device's speaker.  The structure
                                  of the data accompanying EVT_MDL_FOCUS_SELECT is defined by
                                  ModelEvent.
    
    EVT_MDL_CARETLINE_CHANGE      The cursor line has changed in a text widget. This may be
                                  due to the user moving the caret through the text with the
                                  navigation keys or when the line-wrapping changes. The
                                  line-wrapping may change because of entering or deleting
                                  text, or by resizing the widget. The 'dwParam' member of the
                                  ModelEvent contains two packed uint16 words. The hi-order
                                  word contains the total number of lines in the text
                                  widget. The lo-order word contains the current (zero-based)
                                  line of the caret.
    
    EVT_MDL_CARETPOS_CHANGE       The cursor position has changed.  This may be due to the
                                  user moving the caret through the text with the navigation
                                  keys or inserting text into the text widget.  The 'dwParam'
                                  member of the ModelEvent contains the index of the character
                                  immediately following the caret.  So, if the user was
                                  manuvering the caret to fix the typo in "Hello Wrld",
                                  immediately before entering the 'o', the caret would be at
                                  index 7.  This index is relative to the very beginning of
                                  the string.  It does not take into consideration what text
                                  is currently visible to the user.
    
    EVT_MDL_TAB_CHANGE            The current tab in the tab widget or card in the card
                                  container has changed. This view model event is used to keep
                                  a tab widget and a card container synchronized. The newly
                                  selected tab or card index is placed in the dwParam member
                                  of the ModelEvent data structure.
    
    EVT_MDL_SETMODEL              IWidget_SetModel has been called on the owner of the view
                                  model.  This view model event is sent to notify when the
                                  data model has changed, thus allowing composite widgets to
                                  be informed of model changes.  The 'dwParam' member of the
                                  ModelEvent contains a pointer to the new data model, as type
                                  (IModel*).
    
    EVT_MDL_SETEXTENT             IWidget_SetExtent has been called on the owner of the view
                                  model.  This view model event is sent to notify when the
                                  widget extent has changed, thus allowing composite widgets
                                  to be informed of extent changes. The 'dwParam' member of
                                  the ModelEvent contains a pointer to a WExtent struct
                                  containing new extent.
    
    
    EVT_MDL_GESTURE               This gesture model event is used to inform objects about
                                  gestures observed by observer. The object receiving this
                                  event may choose to act on the gestures any way it sees
                                  fit. The structure of the data accompanying EVT_MDL_GESTURE
                                  is defined by ObserverGestureEvent.
                                  
    EVT_MDL_VIRTUALINPUT_STATUS_CHANGE
                                  This view model event is used to inform objects about
                                  a change in the virtual input status. This is used to
                                  notify when the virtual input frame was opened or when
                                  the user has completed entering data and the recipient
                                  should retrieve it from the virtual keypad.
                                  See VirtualInputStatusEvent for more details.
                                  
    EVT_MDL_VIRTUALINPUTMGR_CHANGE The root container's virtual input manager has changed
                                   dwparam contains the new IController *
    
    EVT_MDL_WIDGETELEM_TAP        This view model event is sent to notify objects when one of 
                                  the following gesture is detected within widget's extent:tap,
                                  double tap or tap and hold. The object receiving this event 
                                  may choose to act on the gestures any way it sees fit. 
                                  The 'dwParam' member of the ModelEvent contains a pointer to 
                                  a WidgetElemTapEvent struct containing information about gesture.
    
    
    EVT_MDL_LIST_RESET            All the data associated with this model has potentially changed.
                                  The widget receiving this event should reload all the
                                  data from the model and invalidate itself. The structure of the data
                                  accompanying EVT_MDL_LIST_RESET is defined by ModelEvent.
    
    EVT_MDL_ITEM_CHANGE           The data associated with one data item has changed.
                                  The widget receiving the event should reload the data for the 
                                  identified item and redraw the item. The structure of the data
                                  accompanying EVT_MDL_ITEM_CHANGE is defined by
                                  ListModelItemChangedEvent.
    
    EVT_MDL_IDX_WIDGET_CHANGE     There has been a possible change to the widget / index assignment.  
                                  When the user receives this notification they should call 
                                  IWidget_ReleaseItemWidget on any widgets obtained using 
                                  IWidget_GetItemWidget. A ModelEvent struct will be attached to the event.
    
    EVT_MDL_WIDGET_CAPTURE        This viewmodel event is used to inform objects that the capture 
                                  has changed. The 'dwParam' member of the ModelEvent contains a 
                                  pointer to Capture widget. 
    
    EVT_MDL_RELEASE_CAPTURE       This viewmodel event is sent when a widget is losing the pointer 
                                  capture, thus allowing listeners to be informed of release reason.
                                  See ReleaseCaptureEvent for more details.
    
    EVT_MDL_WIDGETELEM_STATE      This view model event is sent to notify objects when one of the 
                                  following states of a widget: unselected and not pressed, selected, 
                                  pressed. The object receiving this event may choose to act on the 
                                  state any way it sees fit. The 'dwParam' member of the ModelEvent 
                                  contains a pointer to a WidgetElemStateEvent struct containing information 
                                  about current state.
                                  
    EVT_MDL_WIDGETELEM_CLICK      This view model event is sent to notify objects when one of the following
                                  gesture is detected within widget's extent:Single click, double click or 
                                  triple click. The object receiving this event may choose to act on the 
                                  gestures any way it sees fit. The 'dwParam' member of the ModelEvent 
                                  contains a pointer to a WidgetElemClickEvent struct containing information
                                  about gesture.
                                  
    EVT_MDL_DRAWCOMPLETE          This model event is sent at the end of every draw by rootcontainer.
                                  The 'dwParam' member of the ModelEvent contains a pointer to AEERect 
                                  representing the area that was redrawn.
    				  
    EVT_MDL_REVEAL_CHAR 	         This ViewModel Event is sent by text widget on expiry of timer for 
                                  mask when a masked password character needs to be revealed.
    
    EVT_MDL_OBSERVER_CHANGE       This ViewModel event is sent when there is a change in observer and 
                                  The 'dwParam' member of the ModelEvent contains a pointer to a 'IObserver'.
    				 
    EVT_MDL_TRANSITIONMGR_CHANGE  This ViewModel event is sent by Rootcontainer when there is a change in 
                                  TransitionManager to a "transitionmanager" => to the new transitionmanager. 
                                  The 'dwParam' member of the ModelEvent contains a pointer to a 'ITransitionMgr'.
    
    EVT_MDL_STEP                  This ViewModel event is sent from Widget's ViewModel during Animation .
                                  when a widget animates & AF_ENABLE_EVT_STEP is enabled ,then this ModelEvent will
                                  be sent to registered model listeners .This is the Modelevent sent along with the StepEvent .
    
Comments
None