scenic_keypad v0.2.0 Scenic.Keypad

A Keypad Scenic Component

Link to this section Summary

Functions

Invoked when the Scene is started

Callback implementation for Scenic.Component.verify/1

Link to this section Functions

Link to this function add_to_graph(graph, data \\ nil, opts \\ [])
add_to_graph(graph :: Scenic.Graph.t(), data :: any(), opts :: list()) ::
  Scenic.Graph.t()

Callback implementation for Scenic.Component.add_to_graph/3.

Invoked when the Scene is started.

args is the argument term you passed in via config or ViewPort.set_root.

options is a list of information giving you context about the environment the scene is running in. If an option is not in the list, then it should be treated as nil.

  • :viewport - This is the pid of the ViewPort that is managing this dynamic scene. It will be not set, or nil, if you are managing the Scene in a static supervisor yourself.
  • :styles - This is the map of styles that your scene can choose to inherit (or not) from its parent scene. This is typically used by a child control that wants to visually fit into its parent’s look.
  • :id - This is the :id term that the parent set a component when it was invoked.

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 return two new ones that push a graph to the viewport

Returning {:ok, state, push: graph} will push the indicated graph to the ViewPort. This is preferable to the old push_graph() function.

Callback implementation for Scenic.Scene.init/2.

Callback implementation for Scenic.Component.verify/1.