m3e/menu
Menu is presents a list of choices on a temporary surface.
This file was generated: By: m3e/generator version 0.1.0 At: 2026-05-05T14:38:23+10:00
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
-
Config( position_x: menu_position_x.MenuPositionX, position_y: menu_position_y.MenuPositionY, variant: menu_variant.MenuVariant, submenu: Submenu, )
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
Values
pub fn default_config() -> Config
default_config is the default configuration for this component.
pub const default_position_x: menu_position_x.MenuPositionX
pub const default_position_y: menu_position_y.MenuPositionY
pub const default_submenu: Submenu
pub const default_variant: menu_variant.MenuVariant
pub fn from_config(config: Config) -> Menu
from_config creates a new Menu from the given 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.