m3e/menu

Menu is presents a list of choices on a temporary surface.

This file was generated by m3e/generator

     DO NOT EDIT

Types

Config is a public record for configuring this component.

pub type Config {
  Config(
    position_x: menu_position_x.MenuPositionX,
    position_y: menu_position_y.MenuPositionY,
    variant: menu_variant.MenuVariant,
    submenu: Submenu,
  )
}

Constructors

Menu is a View Model for this component

Fields:

  • position_x: The position of the menu, on the x-axis.
  • position_y: The position of the menu, on the y-axis.
  • variant: The appearance variant of the menu.
  • submenu: A value indicating whether the menu is a submenu.
pub opaque type Menu

Submenu is a value indicating whether the menu is a submenu.

pub type Submenu {
  IsSubmenu
  IsNotSubmenu
}

Constructors

  • IsSubmenu
  • IsNotSubmenu

Values

pub fn default_config() -> Config

default_config is the default configuration for this component.

pub const default_submenu: Submenu
pub fn from_config(config: Config) -> Menu

from_config creates a new Menu from the given configuration.

pub fn new() -> Menu

new creates a new Menu with the default configuration.

pub fn position_x(
  record: Menu,
  position_x: menu_position_x.MenuPositionX,
) -> Menu

position_x sets the value of position_x for this Menu.

pub fn position_y(
  record: Menu,
  position_y: menu_position_y.MenuPositionY,
) -> Menu

position_y sets the value of position_y for this Menu.

pub fn render(
  model: Menu,
  attributes: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)

render creates a Lustre Element for a Menu

pub fn render_config(
  c: Config,
  attributes: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)

render_config creates a Lustre Element from a Menu Config

pub fn submenu(record: Menu, submenu: Submenu) -> Menu

submenu sets the value of submenu for this Menu.

pub fn variant(
  record: Menu,
  variant: menu_variant.MenuVariant,
) -> Menu

variant sets the value of variant for this Menu.

Search Document