m3e/tree_item

TreeItem is an expandable item in a tree.

This file was generated by m3e/generator

     DO NOT EDIT

Types

Config is a public record for configuring this component.

pub type Config {
  Config(
    disabled: Disabled,
    indeterminate: Indeterminate,
    open: Open,
    selected: Selected,
  )
}

Constructors

Disabled is whether the element is disabled.

pub type Disabled {
  IsDisabled
  IsNotDisabled
}

Constructors

  • IsDisabled
  • IsNotDisabled

Indeterminate is a value indicating whether the element’s selected / checked state is indeterminate.

pub type Indeterminate {
  IsIndeterminate
  IsNotIndeterminate
}

Constructors

  • IsIndeterminate
  • IsNotIndeterminate

Open is whether the item is expanded.

pub type Open {
  IsOpen
  IsNotOpen
}

Constructors

  • IsOpen
  • IsNotOpen

Selected is whether the item is selected.

pub type Selected {
  IsSelected
  IsNotSelected
}

Constructors

  • IsSelected
  • IsNotSelected

Slots are used in child elements to insert content into this component

pub type Slot {
  Label
  Icon
  SelectedIcon
  ToggleIcon
  OpenToggleIcon
}

Constructors

  • Label
  • Icon
  • SelectedIcon
  • ToggleIcon
  • OpenToggleIcon

TreeItem is a View Model for this component

Fields:

  • disabled: Whether the element is disabled.
  • indeterminate: A value indicating whether the element’s selected / checked state is indeterminate.
  • open: Whether the item is expanded.
  • selected: Whether the item is selected.
pub opaque type TreeItem

Values

pub fn default_config() -> Config

default_config is the default configuration for this component.

pub const default_disabled: Disabled
pub const default_indeterminate: Indeterminate
pub const default_open: Open
pub const default_selected: Selected
pub fn disabled(record: TreeItem, disabled: Disabled) -> TreeItem

disabled sets the value of disabled for this TreeItem.

pub fn from_config(config: Config) -> TreeItem

from_config creates a new TreeItem from the given configuration.

pub fn indeterminate(
  record: TreeItem,
  indeterminate: Indeterminate,
) -> TreeItem

indeterminate sets the value of indeterminate for this TreeItem.

pub fn new() -> TreeItem

new creates a new TreeItem with the default configuration.

pub fn open(record: TreeItem, open: Open) -> TreeItem

open sets the value of open for this TreeItem.

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

render creates a Lustre Element for a TreeItem

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 TreeItem Config

pub fn selected(record: TreeItem, selected: Selected) -> TreeItem

selected sets the value of selected for this TreeItem.

pub fn slot(s: Slot) -> attribute.Attribute(msg)

slot returns a Lustre Attribute(msg) for the given slot name

Search Document