Scenic.Scene.handle_event

You're seeing just the callback handle_event, go back to Scenic.Scene module for more information.
Link to this callback

handle_event(event, from, scene)

View Source (optional)

Specs

handle_event(event :: term(), from :: pid(), scene :: t()) ::
  {:noreply, scene}
  | {:noreply, scene}
  | {:noreply, scene, timeout()}
  | {:noreply, scene, :hibernate}
  | {:noreply, scene, opts :: response_opts()}
  | {:halt, scene}
  | {:halt, scene, timeout()}
  | {:halt, scene, :hibernate}
  | {:halt, scene, opts :: response_opts()}
  | {:cont, event, scene}
  | {:cont, event, scene, timeout()}
  | {:cont, event, scene, :hibernate}
  | {:cont, event, scene, opts :: response_opts()}
  | {:stop, reason, scene}
when scene: t(), reason: term(), event: term()

Invoked when the Scene receives an event from another scene.

Events are messages generated by a scene, that are passed backwards up the ViewPort's scene supervision tree. This is opposed to "input", which comes directly from the drivers.

When an event arrives at a scene, you can consume it, or pass it along to the scene above you in the ViewPort's supervision structure.

To consume the input and have processing stop afterward, return either a {:halt, ...} or {:noreply, ...} value. They are effectively the same thing.

To allow the scene's parent to process the input, return {:cont, event, state, ...}. Note that you can pass along the event unchanged or transform it in the process if you wish.

The callback supports all the return values of the init callback in Genserver.

In addition to the normal return values defined by GenServer, a Scene can add an optional {push: graph} term, which pushes the graph to the viewport.

This has replaced push_graph() as the preferred way to push a graph.