EventFilters

indigo.shared.events.EventFilters
See theEventFilters companion object
final case class EventFilters(modelFilter: GlobalEvent => Option[GlobalEvent], viewModelFilter: GlobalEvent => Option[GlobalEvent])

EventFilter's control which events will be processed by your model or view model. You can think of event filters like a firewall for events, that only permit the wanted events into the model and view model update functions to avoid conflicts, duplicate, and needless work.

Events are filtered by mapping from a specific event to an optional event.

Although the name says "filter", the action is really filter and map, since there is no requirement to maintain the original event as the resultant event. For example, you could map FrameTick to CustomEvents.Update if it make more sense in your domain model.

Value parameters

modelFilter

The filter map for the events going into model update

viewModelFilter

The filter map for the events going into view model update

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

Modify the existing model event filter.

Modify the existing model event filter.

Attributes

Modify the existing view model event filter.

Modify the existing view model event filter.

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product