PrevNextUpHome BREW C++ Class Library & GUI Framework & XML Middleware : SophiaFramework 4.1

27.1. Standard Tracer

Tracer of each Responder holds the rules by which the events will be dispatched to other Responders.

More precisely speaking, Tracer controls how the events will be dispatched to the Child Responder from their Parent Responder.

For instance, the SFEVT_KEY event is set to dispatch to the focused Responders in a given order, while the SFEVT_RESUME event is set to dispatch to all the Responders.

As Tracer is inherited from the Parent Responder, most of the Tracer rules are registered in the SFRApplication class by default. Likewise, most of the Tracer rules for the events related with menu or control are registered in the SFRMenu and SFRControl classes by default, respectively.

Tracer inheriting from the Parent Responder can be overridden at its Child Responder. To override some of the Tracer rules, you have only to register new Tracer rules.

The following are the default rules of dispatching events set as the Standard Tracer of SophiaFramework.

Tracer Rules

  1. Event type and the first parameter: same as those of BREW event
  2. Tracing order: rule of dispatching events to the Child Responders
  3. Forced dispatching: flag whether or not the Parent Responder continues to dispatch the event to the Child Responders, even after some other class has already processed the event
  4. Status filter: filter that the event will only be received under certain status, such as visible or enabled

Table 27.1. Settings for the Standard Tracer of SophiaFramework

  Tracer elements
1:
Event range: from SFEVT_APPLICATION_CLASS_BEGIN to SFEVT_APPLICATION_CLASS_END
Trace order: no
Forced dispatching: no
Status filter: all statuses
2:
Event range: SFEVT_APP_SUSPEND
Trace order: from foreground to background
Forced dispatching: yes
Status filter: all statuses
3:
Event range: SFEVT_APP_RESUME
Trace order: from foreground to background
Forced dispatching: yes
Status filter: all statuses
4:
Event range: from SFEVT_KEY_CLASS_BEGIN to SFEVT_KEY_CLASS_END
Trace order: focused
Forced dispatching: no
Status filter: the statuses visible, enabled, focused, and targeting are set
5:
Event range: from SFEVT_CONTROL_CLASS_BEGIN to SFEVT_CONTROL_CLASS_END
Trace order: focused
Forced dispatching: no
Status filter: the statuses visible, enabled, focused, and targeting are set
6:
Event range: from SFEVT_DIALOG_CLASS_BEGIN to SFEVT_DIALOG_CLASS_END
Trace order: focused
Forced dispatching: no
Status filter: the statuses visible, enabled, focused, and targeting are set
7:
Event range: from SFEVT_SHELL_CLASS_BEGIN to SFEVT_SHELL_CLASS_END
Trace order: no
Forced dispatching: yes
Status filter: all statuses
8:
Event range: from SFEVT_DEVICE_CLASS_BEGIN to SFEVT_DEVICE_CLASS_END
Trace order: no
Forced dispatching: yes
Status filter: all statuses
9:
Event range: from SFEVT_CLIPBOARD_CLASS_BEGIN to SFEVT_CLIPBOARD_CLASS_END
Trace order: no
Forced dispatching: yes
Status filter: all statuses
10:
Event range: SREVT_RESPONDER_RENDER
Trace order: no
Forced dispatching: yes
Status filter: visible status
11.1:
Event range: SREVT_RESPONDER_TERMINATE
Trace order: no
Forced dispatching: yes
Status filter: all statuses
11.2:
Event range: SREVT_RESPONDER_TERMINATE, SRP16_TERMINATE_TRY
Trace order: from foreground to background
Forced dispatching: yes
Status filter: all statuses
12:
Event range: SREVT_MENU
Trace order: no
Forced dispatching: no
Status filter: all statuses
13:
Event range: SREVT_DIALOG
Trace order: no
Forced dispatching: no
Status filter: all statuses
14 :
Event range: SREVT_CONTROL
Trace order: no
Forced dispatching: no
Status filter: all statuses
[Note] Note

For the SFEVT_KEY event, the forced dispatching flag is not set since there is no need to notify the other Responder instances after one Responder instance handles the SFEVT_KEY event.

The events like SFEVT_RESUME should be dispatched to all the Responder instances, so the forced dispatching flag is set.

[Note] Note

In general, the application can be developed without problem by using this Standard Tracer settings. Standard Tracer settings usually need not to be changed.