m3e/option_panel
OptionPanel is presents a list of options 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(
state: option_panel_state.OptionPanelState,
scroll_strategy: floating_panel_scroll_strategy.FloatingPanelScrollStrategy,
fit_anchor_width: FitAnchorWidth,
anchor_offset: Float,
)
}
Constructors
-
Config( state: option_panel_state.OptionPanelState, scroll_strategy: floating_panel_scroll_strategy.FloatingPanelScrollStrategy, fit_anchor_width: FitAnchorWidth, anchor_offset: Float, )
FitAnchorWidth is whether the panel’s width should match its anchor’s width.
pub type FitAnchorWidth {
IsFitAnchorWidth
IsNotFitAnchorWidth
}
Constructors
-
IsFitAnchorWidth -
IsNotFitAnchorWidth
OptionPanel is a View Model for this component
Fields:
- state: The state for which to present content.
- scroll_strategy: The strategy that controls how the panel behaves when its trigger scrolls.
- fit_anchor_width: Whether the panel’s width should match its anchor’s width.
- anchor_offset: The logical margin, in pixels, between the panel and its anchor.
pub opaque type OptionPanel
Values
pub fn anchor_offset(
record: OptionPanel,
anchor_offset: Float,
) -> OptionPanel
anchor_offset sets the value of anchor_offset for this OptionPanel.
pub const default_anchor_offset: Float
pub fn default_config() -> Config
default_config is the default configuration for this component.
pub const default_fit_anchor_width: FitAnchorWidth
pub const default_scroll_strategy: floating_panel_scroll_strategy.FloatingPanelScrollStrategy
pub const default_state: option_panel_state.OptionPanelState
pub fn fit_anchor_width(
record: OptionPanel,
fit_anchor_width: FitAnchorWidth,
) -> OptionPanel
fit_anchor_width sets the value of fit_anchor_width for this OptionPanel.
pub fn from_config(config: Config) -> OptionPanel
from_config creates a new OptionPanel from the given configuration.
pub fn render(
model: OptionPanel,
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
render creates a Lustre Element for a OptionPanel
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 OptionPanel Config
pub fn scroll_strategy(
record: OptionPanel,
scroll_strategy: floating_panel_scroll_strategy.FloatingPanelScrollStrategy,
) -> OptionPanel
scroll_strategy sets the value of scroll_strategy for this OptionPanel.
pub fn state(
record: OptionPanel,
state: option_panel_state.OptionPanelState,
) -> OptionPanel
state sets the value of state for this OptionPanel.