Desktop.Menu behaviour (Desktop v1.3.2) View Source

Menu module used to create and handle menus in Desktop

Link to this section Summary

Link to this section Types

Specs

t() :: %Desktop.Menu{
  __adapter__: any(),
  app: nil,
  assigns: %{},
  dom: any(),
  last_render: nil | DateTime.t(),
  module: module(),
  pid: nil | pid()
}

Link to this section Callbacks

Link to this callback

handle_event(event_name, assigns)

View Source

Specs

handle_event(event_name :: String.t(), assigns :: map()) :: {:noreply, map()}
Link to this callback

handle_info(any, assigns)

View Source

Specs

handle_info(any(), assigns :: map()) :: {:noreply, map()}

Specs

mount(assigns :: map()) :: {:ok, map()}

Specs

render(Keyword.t()) :: String.t()

Link to this section Functions

Link to this function

assign(assigns, properties)

View Source
Link to this function

assign(assigns, property, value)

View Source
Link to this function

assign_new(assigns, property, value)

View Source

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

set_icon(menu_pid, icon)

View Source
Link to this function

start!(init_opts \\ [], opts \\ [])

View Source
Link to this function

start_link(init_opts \\ [], opts \\ [])

View Source

Specs

start_link(keyword(), keyword()) :: GenServer.on_start()
Link to this function

trigger_event(menu_pid, event)

View Source