Raxol.UI.Components.HintDisplay (Raxol v0.4.0)

View Source

Displays contextual hints and keyboard shortcuts.

Summary

Functions

Handles events for the HintDisplay component. Typically does not handle direct events.

Initializes the HintDisplay component state from props.

Renders the HintDisplay component if visible and hints are present.

Updates the HintDisplay component state in response to messages.

Functions

broadcast(msg)

command(cmd)

handle_event(event, props, state)

@spec handle_event(term(), map(), %Raxol.UI.Components.HintDisplay{
  hints: term(),
  id: term(),
  position: term(),
  style: term(),
  visible: term()
}) ::
  {%Raxol.UI.Components.HintDisplay{
     hints: term(),
     id: term(),
     position: term(),
     style: term(),
     visible: term()
   }, list()}

Handles events for the HintDisplay component. Typically does not handle direct events.

init(props)

@spec init(map()) :: %Raxol.UI.Components.HintDisplay{
  hints: term(),
  id: term(),
  position: term(),
  style: term(),
  visible: term()
}

Initializes the HintDisplay component state from props.

mount(state)

Callback implementation for Raxol.UI.Components.Base.Component.mount/1.

render(state, props)

@spec render(
  %Raxol.UI.Components.HintDisplay{
    hints: term(),
    id: term(),
    position: term(),
    style: term(),
    visible: term()
  },
  map()
) :: any()

Renders the HintDisplay component if visible and hints are present.

schedule(msg, delay)

unmount(state)

Callback implementation for Raxol.UI.Components.Base.Component.unmount/1.

update(msg, state)

@spec update(term(), %Raxol.UI.Components.HintDisplay{
  hints: term(),
  id: term(),
  position: term(),
  style: term(),
  visible: term()
}) ::
  {%Raxol.UI.Components.HintDisplay{
     hints: term(),
     id: term(),
     position: term(),
     style: term(),
     visible: term()
   }, list()}

Updates the HintDisplay component state in response to messages.