An opaque type passed into playView
that may be used by an overriding implementation.
An opaque type passed into playView
that may be used by an overriding implementation.
Otherwise it may simply be set to Unit
.
Report the next interesting frame greater than the given frame for which
gridReached
(internal) and processPrepare
will be called.
Report the next interesting frame greater than the given frame for which
gridReached
(internal) and processPrepare
will be called.
If no such event exists, the method must return Long.MaxValue
.
Should be called from processPlay
.
Should be called from processPlay
. It calls play
on the view
and adds it to the list of playing views.
Note: timeRef
must already have been updated through
appropriate intersection.
Sub-classes may override this if they call super.playView
Called when a next interesting frame has been reached.
Called when a next interesting frame has been reached. The method should look for and invoke the events such as starting or stopping a view.
Called during play
.
Called during play
. Sub-classes should intersect
the current elements and for each of them call playView
.
Called during preparation of armed elements.
Called during preparation of armed elements. This
happens either during initial prepare
or during grid-events.
Given the prepareSpan
, the sub-class should
- find the elements using an intersect
- for each build a view and store it somewhere
- for each view call prepareChild
- accumulate the results of prepareChild
into a Map
that is returned.
The map will become part of IPreparing
. (NOT: The returned Boolean
indicates
if elements were found (true
) or not (false
)).
if true
this is an initial preparation which means the method
must include views that start before prepareSpan
if their span
overlaps with prepareSpan
. If false
this is a follow up from
gridReached
and the search must be restricted to views that
start no earlier than prepareSpan
.
Should be called from processEvent
for views that should be
stopped and disposed.
Should be called from processEvent
for views that should be
stopped and disposed. The caller is responsible for removing
the view also from a view-tree if such structure is maintained.
NOT: This method ends by calling viewRemoved
.
Stops and disposes all currently playing views.
Stops and disposes all currently playing views.
Report the next interesting frame greater than the given frame for which
eventReached
(internal) and processEvent
will be called.
Report the next interesting frame greater than the given frame for which
eventReached
(internal) and processEvent
will be called.
If no such event exists, the method must return Long.MaxValue
.
Sub-classes may override this and call super.dispose()
if they wish to free additional observers, e.
Sub-classes may override this and call super.dispose()
if they wish to free additional observers, e.g. the
timeline or grapheme observer.
Ensures state is consistent, then checks preparation of children.
Ensures state is consistent, then checks preparation of children.
If all is good, sets internal state to IPlaying
and calls processPlay
.
Next instructs scheduler and sets external state to Playing
.
Note: the prepare span will always start from current-frame and have
a duration of at least LOOK_STOP
.
Note: the prepare span will always start from current-frame and have
a duration of at least LOOK_STOP
. I.e. during playback it contains the current play position.