LING71671/moon-egui/src/widgets does not have a README file

    Memory

    Generic, decoupled immediate-mode widget memory subsystem.

    Stores cross-frame persistent widget state (scroll positions, cursor offsets, toggle states, animation curves) indexed by Id, completely decoupling concrete widgets from the central UIContext struct. Supports tagged sub-keys for multiple properties per widget ID and generational frame-counter pruning to prevent memory leaks in long-running dynamic interfaces.

    Painter

    Scoped drawing abstraction that isolates UI widgets from raw global DrawList command queues and enforces local coordinate translation and active scissor clip boundaries.

    Theme

    Runtime semantic theme profile holding color slots for all UI elements.

    WidgetStyle

    Systemic design tokens holding foundational scales, typography, and elevation metrics.

    Badge

    pub struct Badge {
    text : String
    kind : BadgeKind
    dot : Bool
    pill : Bool
    } derive(Eq,
    Debug
    )

    Standalone semantic badge widget supporting fluent configuration.
    impl Widget for Badge

    Badge::dot

    fn Badge::dot(self : Badge, dot : Bool) -> Badge

    Enable or disable breathing status dot.

    Badge::kind

    fn Badge::kind(self : Badge, kind : BadgeKind) -> Badge

    Set the semantic category of the badge.

    Badge::new

    fn Badge::new(text : String) -> Badge

    Create a new badge widget with default category.

    Badge::pill

    fn Badge::pill(self : Badge, pill : Bool) -> Badge

    Enable or disable pill capsule rounded corners.

    BadgeKind

    pub(all) enum BadgeKind {
    Default
    Success
    Warning
    Danger
    Info
    } derive(Eq,
    Debug
    )

    Semantic palette category for badges and tags.

    BadgeKind::danger

    fn BadgeKind::danger() -> BadgeKind

    BadgeKind::default

    fn BadgeKind::default() -> BadgeKind

    BadgeKind::info

    fn BadgeKind::info() -> BadgeKind

    BadgeKind::success

    fn BadgeKind::success() -> BadgeKind

    BadgeKind::warning

    fn BadgeKind::warning() -> BadgeKind

    pub struct Breadcrumb {
    id_salt : String
    items : Array[String]
    separator : String
    max_visible : Int
    } derive(Eq,
    Debug
    )

    Standalone breadcrumb navigation widget supporting fluent configuration.
    fn Breadcrumb::max_visible(self : Breadcrumb, max_visible : Int) -> Breadcrumb

    Configure maximum visible hierarchy items before middle folding with ellipsis.
    fn Breadcrumb::new(id_salt : String, items : Array[String]) -> Breadcrumb

    Create a new breadcrumb widget with item list.
    fn Breadcrumb::separator(self : Breadcrumb, separator : String) -> Breadcrumb

    Configure custom separator delimiter string.

    Show the breadcrumb strip and return (clicked_index?, response).

    Button

    pub struct Button {
    text : String
    shortcut : String
    primary : Bool
    size :
    Vec2

    } derive(Eq,
    Debug
    )

    Standalone button widget struct supporting fluent configuration.
    impl Widget for Button

    Button::new

    fn Button::new(text : String) -> Button

    Create a new button widget with default styling.

    Button::primary

    fn Button::primary(self : Button, primary : Bool) -> Button

    Configure button as high-contrast cold cobalt primary action.

    Button::shortcut

    fn Button::shortcut(self : Button, shortcut : String) -> Button

    Configure an Apple-grade chiclet keyboard shortcut badge (e.g. "⌘S", "Esc").

    Button::size

    Explicitly override the button's layout dimensions.

    Checkbox

    pub struct Checkbox {
    text : String
    checked : Bool
    } derive(Eq,
    Debug
    )

    Standalone checkbox toggle widget supporting fluent configuration.

    Checkbox::from_ref

    fn Checkbox::from_ref(text : String, target :
    Ref
    [Bool]) -> CheckboxRef

    Create a checkbox bound directly to a Ref[Bool].

    Checkbox::new

    fn Checkbox::new(text : String, checked : Bool) -> Checkbox

    Create a new checkbox widget.

    Checkbox::show

    Render the checkbox and return the updated checked state and interaction response.

    CheckboxRef

    pub struct CheckboxRef {
    text : String
    target :
    Ref
    [Bool]
    }

    Reference-bound checkbox widget for uniform ui.add(...) dispatch.

    CollapsingHeader

    pub struct CollapsingHeader {
    id_salt : String
    title : String
    default_open : Bool
    } derive(Eq,
    Debug
    )

    Standalone collapsible header container supporting fluent configuration.

    CollapsingHeader::default_open

    fn CollapsingHeader::default_open(self : CollapsingHeader, default_open : Bool) -> CollapsingHeader

    Configure default open state on initial display.

    CollapsingHeader::new

    fn CollapsingHeader::new(id_salt : String, title : String) -> CollapsingHeader

    Create a new collapsing header container.

    CollapsingHeader::show

    Show the collapsible header and execute content closure if expanded.

    ComboBox

    pub struct ComboBox {
    id_salt : String
    label : String
    selected_index : Int
    options : Array[String]
    } derive(Eq,
    Debug
    )

    Standalone dropdown selection menu supporting fluent configuration.

    ComboBox::label

    fn ComboBox::label(self : ComboBox, label : String) -> ComboBox

    Configure label for combo box.

    ComboBox::new

    fn ComboBox::new(id_salt : String, selected_index : Int, options : Array[String]) -> ComboBox

    Create a new combo box widget.

    ComboBox::show

    Show the combo box and return (new_selected_index, response).

    Dialog

    pub struct Dialog {
    id_salt : String
    title : String
    message : String
    kind : DialogKind
    confirm_label : String
    cancel_label : String
    width : Double
    } derive(Eq,
    Debug
    )

    Standalone modal dialog widget supporting fluent configuration.

    Dialog::cancel_label

    fn Dialog::cancel_label(self : Dialog, cancel_label : String) -> Dialog

    Configure cancel action button label.

    Dialog::confirm_label

    fn Dialog::confirm_label(self : Dialog, confirm_label : String) -> Dialog

    Configure confirm action button label.

    Dialog::kind

    fn Dialog::kind(self : Dialog, kind : DialogKind) -> Dialog

    Configure semantic kind (Info, Warning, Danger, Confirm).

    Dialog::new

    fn Dialog::new(id_salt : String, title : String, message : String) -> Dialog

    Create a new dialog configuration.

    Dialog::show

    Show the dialog modal and return the user interaction result.

    Dialog::width

    fn Dialog::width(self : Dialog, width : Double) -> Dialog

    Configure dialog card width.

    DialogKind

    pub(all) enum DialogKind {
    Info
    Warning
    Danger
    Confirm
    } derive(Eq,
    Debug
    )

    Semantic intent category of dialog modal.

    DialogKind::confirm

    fn DialogKind::confirm() -> DialogKind

    DialogKind::danger

    fn DialogKind::danger() -> DialogKind

    DialogKind::info

    fn DialogKind::info() -> DialogKind

    DialogKind::warning

    fn DialogKind::warning() -> DialogKind

    DialogResult

    pub(all) enum DialogResult {
    Confirmed
    Cancelled
    Open
    } derive(Eq,
    Debug
    )

    Result returned from dialog interaction on the current frame.

    Label

    pub struct Label {
    text : String
    color :
    Color
    ?
    } derive(Eq,
    Debug
    )

    Standalone read-only text label widget supporting custom colors and fluent configuration.
    impl Widget for Label

    Label::color

    Set custom text color.

    Label::new

    fn Label::new(text : String) -> Label

    Create a new text label widget.
    pub struct Pagination {
    id_salt : String
    current_page : Int
    total_pages : Int
    item_size : Double?
    spacing : Double?
    show_prev_next : Bool
    } derive(Eq,
    Debug
    )

    Standalone data pagination bar widget supporting fluent configuration.

    Pagination::from_ref

    fn Pagination::from_ref(id_salt : String, target :
    Ref
    [Int], total_pages : Int) -> PaginationRef

    Creates a Pagination widget bound directly to a Ref[Int].

    Pagination::item_size

    fn Pagination::item_size(self : Pagination, item_size : Double) -> Pagination

    Configures individual button square size.

    Pagination::new

    fn Pagination::new(id_salt : String, current_page : Int, total_pages : Int) -> Pagination

    Creates a new Pagination widget with initial page (1-indexed) and total pages count.

    Pagination::show

    Renders the pagination bar, handles clicks, keyboard navigation, and returns the updated current page and interaction response.

    Pagination::show_prev_next

    fn Pagination::show_prev_next(self : Pagination, show_prev_next : Bool) -> Pagination

    Configures whether Previous and Next navigation buttons are rendered.

    Pagination::spacing

    fn Pagination::spacing(self : Pagination, spacing : Double) -> Pagination

    Sets spacing between pagination buttons.

    PaginationItem

    pub(all) enum PaginationItem {
    Page(Int)
    Ellipsis
    } derive(Eq,
    Debug
    )

    Representation of an item within a collapsed pagination bar.

    PaginationRef

    pub struct PaginationRef {
    pagination : Pagination
    target :
    Ref
    [Int]
    }

    Reference-bound Pagination widget for uniform ui.add(...) dispatch.

    PaginationRef::item_size

    fn PaginationRef::item_size(self : PaginationRef, item_size : Double) -> PaginationRef

    PaginationRef::show_prev_next

    fn PaginationRef::show_prev_next(self : PaginationRef, show_prev_next : Bool) -> PaginationRef

    PaginationRef::spacing

    fn PaginationRef::spacing(self : PaginationRef, spacing : Double) -> PaginationRef

    ProgressBar

    pub struct ProgressBar {
    fraction : Double
    text : String
    } derive(Eq,
    Debug
    )

    Standalone progress bar widget supporting fluent configuration.

    ProgressBar::new

    fn ProgressBar::new(fraction : Double) -> ProgressBar

    Create a new progress bar widget with a normalized 0.0-1.0 fraction.

    ProgressBar::text

    fn ProgressBar::text(self : ProgressBar, text : String) -> ProgressBar

    Set custom display label text (defaults to percentage if empty).

    Radio

    pub struct Radio {
    label : String
    selected : Bool
    } derive(Eq,
    Debug
    )

    Standalone radio button option widget supporting fluent configuration.

    Radio::new

    fn Radio::new(label : String, selected : Bool) -> Radio

    Create a new radio button widget.

    Radio::show

    Render the radio button option.

    Rating

    pub struct Rating {
    id_salt : String
    value : Double
    max_stars : Int
    allow_half : Bool
    read_only : Bool
    star_size : Double?
    spacing : Double?
    } derive(Eq,
    Debug
    )

    Standalone Star Rating widget supporting fractional ratings, live hover preview, and keyboard navigation.

    Rating::allow_half

    fn Rating::allow_half(self : Rating, allow_half : Bool) -> Rating

    Configures whether half-star (0.5) fractional ratings are allowed.

    Rating::from_ref

    fn Rating::from_ref(id_salt : String, target :
    Ref
    [Double]) -> RatingRef

    Creates a Rating widget bound directly to a Ref[Double].

    Rating::max_stars

    fn Rating::max_stars(self : Rating, max_stars : Int) -> Rating

    Sets maximum number of stars (e.g. 5 or 10).

    Rating::new

    fn Rating::new(id_salt : String, value : Double) -> Rating

    Creates a new Rating widget with the given identifier and initial score.

    Rating::read_only

    fn Rating::read_only(self : Rating, read_only : Bool) -> Rating

    Configures whether the rating is read-only (display only).

    Rating::show

    Renders the rating widget, handles hover preview, mouse clicks, keyboard adjustments, and returns the current score and interaction response.

    Rating::spacing

    fn Rating::spacing(self : Rating, spacing : Double) -> Rating

    Sets horizontal spacing between star glyphs.

    Rating::star_size

    fn Rating::star_size(self : Rating, star_size : Double) -> Rating

    Sets custom star glyph size.

    RatingRef

    pub struct RatingRef {
    rating : Rating
    target :
    Ref
    [Double]
    }

    Reference-bound Rating widget for uniform ui.add(...) dispatch.

    RatingRef::allow_half

    fn RatingRef::allow_half(self : RatingRef, allow_half : Bool) -> RatingRef

    RatingRef::max_stars

    fn RatingRef::max_stars(self : RatingRef, max_stars : Int) -> RatingRef

    RatingRef::read_only

    fn RatingRef::read_only(self : RatingRef, read_only : Bool) -> RatingRef

    RatingRef::spacing

    fn RatingRef::spacing(self : RatingRef, spacing : Double) -> RatingRef

    RatingRef::star_size

    fn RatingRef::star_size(self : RatingRef, star_size : Double) -> RatingRef

    ScrollArea

    pub struct ScrollArea {
    id_salt : String
    size :
    Vec2

    } derive(Eq,
    Debug
    )

    Standalone vertical scrolling container supporting fluent configuration.

    ScrollArea::new

    fn ScrollArea::new(id_salt : String, size :
    Vec2
    ) -> ScrollArea

    Create a new scroll area with an identifier and viewport dimension.

    ScrollArea::show

    Show the scroll area and execute the nested content closure.

    SegmentedControl

    pub struct SegmentedControl {
    id_salt : String
    options : Array[String]
    selected_index : Int
    height : Double
    width : Double
    } derive(Eq,
    Debug
    )

    Standalone segmented control widget supporting fluent configuration.

    SegmentedControl::height

    fn SegmentedControl::height(self : SegmentedControl, height : Double) -> SegmentedControl

    Explicitly configure height dimension.

    SegmentedControl::new

    fn SegmentedControl::new(id_salt : String, options : Array[String], selected_index : Int) -> SegmentedControl

    Create a new segmented control widget.

    SegmentedControl::show

    Show the segmented control and return (new_selected_index, response).

    SegmentedControl::width

    fn SegmentedControl::width(self : SegmentedControl, width : Double) -> SegmentedControl

    Explicitly configure width dimension.

    Separator

    pub struct Separator {
    } derive(Eq,
    Debug
    )

    Standalone horizontal divider line widget implementing the Widget trait.
    impl Widget for Separator

    Separator::new

    fn Separator::new() -> Separator

    Create a new horizontal separator widget.

    Slider

    pub struct Slider {
    label : String
    value : Double
    min : Double
    max : Double
    step : Double?
    } derive(Eq,
    Debug
    )

    Standalone continuous floating-point slider widget supporting fluent configuration.

    Slider::from_ref

    fn Slider::from_ref(label : String, target :
    Ref
    [Double], min : Double, max : Double) -> SliderRef

    Create a slider bound directly to a Ref[Double] variable.

    Slider::new

    fn Slider::new(label : String, value : Double, min : Double, max : Double) -> Slider

    Create a new slider widget.

    Slider::show

    Render the slider and return the updated value alongside the interaction response.

    Slider::step

    fn Slider::step(self : Slider, step : Double) -> Slider

    Configure an optional stepping increment for keyboard and drag adjustment.

    SliderRef

    pub struct SliderRef {
    label : String
    target :
    Ref
    [Double]
    min : Double
    max : Double
    step : Double?
    }

    Reference-bound slider widget for uniform ui.add(...) dispatch.
    impl Widget for SliderRef

    SliderRef::step

    fn SliderRef::step(self : SliderRef, step : Double) -> SliderRef

    Configure stepping increment on reference-bound slider.

    Splitter

    pub struct Splitter {
    id_salt : String
    split_ratio : Double
    size :
    Vec2

    min_ratio : Double
    max_ratio : Double
    min_px : Double
    vertical : Bool
    } derive(Eq,
    Debug
    )

    Standalone resizable split container widget supporting fluent configuration.

    Splitter::horizontal

    fn Splitter::horizontal(id_salt : String, split_ratio : Double, size :
    Vec2
    ) -> Splitter

    Create a horizontal splitter container.

    Splitter::max_ratio

    fn Splitter::max_ratio(self : Splitter, max_ratio : Double) -> Splitter

    Configure maximum split ratio boundary.

    Splitter::min_px

    fn Splitter::min_px(self : Splitter, min_px : Double) -> Splitter

    Configure minimum pixel width/height per pane.

    Splitter::min_ratio

    fn Splitter::min_ratio(self : Splitter, min_ratio : Double) -> Splitter

    Configure minimum split ratio boundary.

    Splitter::show

    Show the splitter and execute closures for first and second panes.

    Splitter::vertical

    fn Splitter::vertical(id_salt : String, split_ratio : Double, size :
    Vec2
    ) -> Splitter

    Create a vertical splitter container.

    StepItem

    pub struct StepItem {
    title : String
    description : String
    status : StepStatus?
    } derive(Eq,
    Debug
    )

    Descriptor for an individual step item in a Steps navigation bar.

    StepItem::new

    fn StepItem::new(title : String, description? : String) -> StepItem

    Creates a new step descriptor with title and optional description.

    StepItem::with_status

    fn StepItem::with_status(title : String, status : StepStatus, description? : String) -> StepItem

    Creates a step descriptor with an explicit semantic status.

    StepStatus

    pub(all) enum StepStatus {
    Wait
    Process
    Finish
    Error
    } derive(Eq,
    Debug
    )

    Semantic execution status for individual workflow steps.

    Stepper

    pub struct Stepper {
    id_salt : String
    value : Double
    step : Double
    min : Double?
    max : Double?
    precision : Int
    prefix : String
    suffix : String
    width : Double?
    } derive(Eq,
    Debug
    )

    Standalone numeric stepper widget supporting fluent configuration.

    Stepper::from_ref

    fn Stepper::from_ref(id_salt : String, target :
    Ref
    [Double]) -> StepperRef

    Creates a Stepper bound directly to a Ref[Double].

    Stepper::max

    fn Stepper::max(self : Stepper, max : Double) -> Stepper

    Sets the upper bound maximum value.

    Stepper::min

    fn Stepper::min(self : Stepper, min : Double) -> Stepper

    Sets the lower bound minimum value.

    Stepper::new

    fn Stepper::new(id_salt : String, value : Double) -> Stepper

    Creates a new Stepper widget with the given identifier and initial value.

    Stepper::precision

    fn Stepper::precision(self : Stepper, precision : Int) -> Stepper

    Sets decimal precision for number formatting.

    Stepper::prefix

    fn Stepper::prefix(self : Stepper, prefix : String) -> Stepper

    Sets a display prefix string (e.g. "Width: ").

    Stepper::range

    fn Stepper::range(self : Stepper, min : Double, max : Double) -> Stepper

    Sets both minimum and maximum boundaries.

    Stepper::show

    Renders the stepper widget, handles mouse clicks, wheel, keyboard inputs, and returns the updated numeric value and interaction response.

    Stepper::step

    fn Stepper::step(self : Stepper, step : Double) -> Stepper

    Sets the step increment/decrement amount per step action.

    Stepper::suffix

    fn Stepper::suffix(self : Stepper, suffix : String) -> Stepper

    Sets a display suffix string (e.g. " px", " dB").

    Stepper::width

    fn Stepper::width(self : Stepper, width : Double) -> Stepper

    Overrides the default width of the stepper component.

    StepperRef

    pub struct StepperRef {
    stepper : Stepper
    target :
    Ref
    [Double]
    }

    Reference-bound stepper widget for uniform ui.add(...) dispatch.

    StepperRef::max

    fn StepperRef::max(self : StepperRef, max : Double) -> StepperRef

    StepperRef::min

    fn StepperRef::min(self : StepperRef, min : Double) -> StepperRef

    StepperRef::precision

    fn StepperRef::precision(self : StepperRef, precision : Int) -> StepperRef

    StepperRef::prefix

    fn StepperRef::prefix(self : StepperRef, prefix : String) -> StepperRef

    StepperRef::range

    fn StepperRef::range(self : StepperRef, min : Double, max : Double) -> StepperRef

    StepperRef::step

    fn StepperRef::step(self : StepperRef, step : Double) -> StepperRef

    StepperRef::suffix

    fn StepperRef::suffix(self : StepperRef, suffix : String) -> StepperRef

    StepperRef::width

    fn StepperRef::width(self : StepperRef, width : Double) -> StepperRef

    Steps

    pub struct Steps {
    id_salt : String
    current : Int
    items : Array[StepItem]
    clickable : Bool
    width : Double?
    } derive(Eq,
    Debug
    )

    Standalone workflow steps navigation bar widget supporting fluent configuration.

    Steps::clickable

    fn Steps::clickable(self : Steps, clickable : Bool) -> Steps

    Configures whether clicking step nodes switches active index.

    Steps::from_ref

    fn Steps::from_ref(id_salt : String, target :
    Ref
    [Int], items : Array[StepItem]) -> StepsRef

    Creates a Steps widget bound directly to a Ref[Int].

    Steps::new

    fn Steps::new(id_salt : String, current : Int, items : Array[StepItem]) -> Steps

    Creates a new Steps widget with current index and item list.

    Steps::show

    Renders the Steps navigation bar, draws connector rails, step nodes, titles, and returns the selected step index and interaction response.

    Steps::width

    fn Steps::width(self : Steps, width : Double) -> Steps

    Sets explicit width for the steps layout.

    StepsRef

    pub struct StepsRef {
    steps : Steps
    target :
    Ref
    [Int]
    }

    Reference-bound Steps widget for uniform ui.add(...) dispatch.

    StepsRef::clickable

    fn StepsRef::clickable(self : StepsRef, clickable : Bool) -> StepsRef

    StepsRef::width

    fn StepsRef::width(self : StepsRef, width : Double) -> StepsRef

    TabBar

    pub struct TabBar {
    id_str : String
    tabs : Array[String]
    selected_idx : Int
    } derive(Eq,
    Debug
    )

    Standalone horizontal tab bar container supporting fluent configuration.

    TabBar::new

    fn TabBar::new(id_str : String, tabs : Array[String], selected_idx : Int) -> TabBar

    Create a new tab bar widget.

    TabBar::show

    Show the tab bar and return (new_selected_idx, response).

    TextEdit

    pub struct TextEdit {
    id_salt : String
    text : String
    placeholder : String
    size :
    Vec2

    } derive(Eq,
    Debug
    )

    Standalone single-line text input widget supporting fluent configuration.

    TextEdit::from_ref

    fn TextEdit::from_ref(id_salt : String, target :
    Ref
    [String]) -> TextEditRef

    Create a text edit bound directly to a Ref[String] variable.

    TextEdit::new

    fn TextEdit::new(id_salt : String, text : String) -> TextEdit

    Create a new text edit widget with initial text.

    TextEdit::placeholder

    fn TextEdit::placeholder(self : TextEdit, placeholder : String) -> TextEdit

    Configure placeholder text shown when the input field is empty.

    TextEdit::size

    Explicitly override the text edit dimensions.

    TextEditRef

    pub struct TextEditRef {
    id_salt : String
    target :
    Ref
    [String]
    placeholder : String
    size :
    Vec2

    }

    Reference-bound text edit widget for uniform ui.add(...) dispatch.

    TextEditRef::placeholder

    fn TextEditRef::placeholder(self : TextEditRef, placeholder : String) -> TextEditRef

    Configure placeholder text for reference-bound text edit.

    TextEditRef::size

    Explicitly override the dimensions for reference-bound text edit.

    Toast

    pub struct Toast {
    id : String
    title : String
    message : String
    kind : ToastKind
    elapsed : Double
    duration : Double
    } derive(Eq,
    Debug
    )

    Toast::danger

    fn Toast::danger(title : String, message? : String, duration? : Double) -> Toast

    Toast::info

    fn Toast::info(title : String, message? : String, duration? : Double) -> Toast

    Toast::new

    fn Toast::new(id : String, title : String, message? : String, kind? : ToastKind, duration? : Double) -> Toast

    Toast::success

    fn Toast::success(title : String, message? : String, duration? : Double) -> Toast

    Toast::warning

    fn Toast::warning(title : String, message? : String, duration? : Double) -> Toast

    ToastAnchor

    pub(all) enum ToastAnchor {
    TopRight
    BottomRight
    BottomCenter
    } derive(Eq,
    Debug
    )

    ToastKind

    pub(all) enum ToastKind {
    Info
    Success
    Warning
    Danger
    } derive(Eq,
    Debug
    )

    ToastResponse

    pub struct ToastResponse {
    active_toasts : Array[Toast]
    dismissed_id : String?
    } derive(Eq,
    Debug
    )

    Toggle

    pub struct Toggle {
    text : String
    checked : Bool
    } derive(Eq,
    Debug
    )

    Standalone toggle switch pill widget supporting fluent configuration.

    Toggle::from_ref

    fn Toggle::from_ref(text : String, target :
    Ref
    [Bool]) -> ToggleRef

    Create a toggle switch bound directly to a Ref[Bool].

    Toggle::new

    fn Toggle::new(text : String, checked : Bool) -> Toggle

    Create a new toggle switch pill widget.

    Toggle::show

    Render the toggle switch pill and return updated checked state alongside interaction response.

    ToggleRef

    pub struct ToggleRef {
    text : String
    target :
    Ref
    [Bool]
    }

    Reference-bound toggle switch widget for uniform ui.add(...) dispatch.

    Tooltip

    pub struct Tooltip {
    text : String
    placement_val : TooltipPlacement
    custom_style : TooltipStyle?
    delay_frames_val : Int
    } derive(Eq,
    Debug
    )

    Tooltip widget providing floating contextual hints on hover with delayed revelation.

    Tooltip::delay

    fn Tooltip::delay(self : Tooltip, frames : Int) -> Tooltip

    Tooltip::new

    fn Tooltip::new(text : String) -> Tooltip

    Tooltip::placement

    fn Tooltip::placement(self : Tooltip, p : TooltipPlacement) -> Tooltip

    Tooltip::show

    Show the tooltip bubble at current cursor position (immediate or delayed).

    Tooltip::show_for

    Evaluates hover timing and renders the tooltip adjacent to target_rect if visible. Returns true if the tooltip was displayed during the current frame.

    Tooltip::style

    fn Tooltip::style(self : Tooltip, s : TooltipStyle) -> Tooltip

    TooltipPlacement

    pub(all) enum TooltipPlacement {
    Top
    Bottom
    Left
    Right
    } derive(Eq,
    Debug
    )

    Cardinal placement direction for floating tooltips.

    TooltipStyle

    pub struct TooltipStyle {
    padding_x : Double
    padding_y : Double
    corner_radius : Double
    font_size : Double
    offset : Double
    delay_frames : Int
    } derive(Eq,
    Debug
    )

    Component-level style configuration for tooltips, derived from foundational design tokens.

    TooltipStyle::default_for

    Derives the standard tooltip style from the active UIContext widget style tokens.

    VirtualList

    pub struct VirtualList {
    id_salt : String
    total_items : Int
    height : Double
    width_val : Double?
    item_height_val : Double
    overscan_val : Int
    } derive(Eq,
    Debug
    )

    Standalone virtualized 1D list container rendering only items currently visible within the viewable scissor bounds.

    VirtualList::item_height

    fn VirtualList::item_height(self : VirtualList, h : Double) -> VirtualList

    VirtualList::new

    fn VirtualList::new(id_salt : String, total_items : Int, height : Double) -> VirtualList

    VirtualList::overscan

    fn VirtualList::overscan(self : VirtualList, count : Int) -> VirtualList

    VirtualList::render

    Computes visible slice bounds and executes the row rendering closure exclusively for visible items within the scroll viewport.

    VirtualList::width

    fn VirtualList::width(self : VirtualList, w : Double) -> VirtualList

    VirtualListResponse

    pub struct VirtualListResponse {
    rect :
    Rect

    scroll_offset : Double
    first_visible : Int
    last_visible : Int
    hovered : Bool
    } derive(Eq,
    Debug
    )

    Interactive response data returned from VirtualList execution.

    Window

    Standalone floating window container widget supporting fluent configuration.

    Window::constrain_to

    fn Window::constrain_to(self : Window, bounds :
    Rect
    ) -> Window

    Constrain window dragging within specified boundary rectangle.

    Window::id_salt

    fn Window::id_salt(self : Window, id_salt : String) -> Window

    Explicitly configure a unique identification salt for distinguishing windows with matching titles.

    Window::new

    Create a new window container.

    Window::show

    Show the floating window and execute content closure.

    badge

    fn badge(ctx :
    UIContext
    , text : String, kind? : BadgeKind, dot? : Bool, pill? : Bool) ->
    Response

    Render a compact semantic status badge capsule with optional breathing status dot and pill-shaped fully rounded borders.
    fn breadcrumb(ctx :
    UIContext
    , id_salt : String, items : Array[String], separator? : String, max_visible? : Int) -> (Int?,
    Response
    )

    Render a horizontal breadcrumb navigation strip with ancestor hover highlights, smart ellipsis folding for long hierarchies, and node click detection.

    button

    Render an interactive button with modern Studio Light porcelain aesthetic and 1.5px physical mechanical actuation travel.

    button_primary

    Render an emphasized call-to-action primary button using accent colors.

    button_primary_sized

    Render an emphasized primary button with an explicitly specified size.

    button_sized

    Render an interactive button with an explicitly specified size.

    button_with_shortcut

    fn button_with_shortcut(ctx :
    UIContext
    , text : String, shortcut : String) ->
    Response

    Render an interactive button with a desktop-grade shortcut badge (e.g. "⌘S" or "Esc").

    checkbox

    Render an interactive toggle checkbox.

    collapsing_header

    fn collapsing_header(ctx :
    UIContext
    , id_salt : String, title : String, default_open : Bool, content : (
    UIContext
    ) -> Unit) ->
    Response

    Render a collapsible section header with expand/collapse arrow indicator and nested content.

    color_button

    Render an interactive color preview button.

    combo_box

    fn combo_box(ctx :
    UIContext
    , id_salt : String, label : String, selected_index : Int, options : Array[String]) -> (Int,
    Response
    )

    Render a dropdown selection menu in Studio Light. Returns a tuple of (new_selected_index, response).

    dialog

    fn dialog(ctx :
    UIContext
    , id_salt : String, title : String, message : String, kind? : DialogKind, confirm_label? : String, cancel_label? : String, width? : Double, viewport_size? :
    Vec2
    ) -> DialogResult

    Render a modal confirmation dialog in Studio Light porcelain style.

    drag_value

    fn drag_value(ctx :
    UIContext
    , label : String, value : Double, speed? : Double, min? : Double, max? : Double) -> (Double,
    Response
    )

    Render a compact numerical drag-value box.

    on_hover_text

    Fluent helper function to attach floating hover text to a Response.
    fn pagination(ctx :
    UIContext
    , id_salt : String, current_page : Int, total_pages : Int, item_size? : Double, spacing? : Double, show_prev_next? : Bool) -> (Int,
    Response
    )

    Convenience functional helper to render a Pagination component.

    progress_bar

    Render a styled progress bar with progress fill and label.

    radio

    Render an interactive radio button option.

    rating

    fn rating(ctx :
    UIContext
    , id_salt : String, value : Double, max_stars? : Int, allow_half? : Bool, read_only? : Bool, star_size? : Double, spacing? : Double) -> (Double,
    Response
    )

    Convenience functional helper to render a rating widget.

    scroll_area

    Render a vertical scrolling container with wheel scrolling, nested scissor clipping, and smooth interactive scrollbar indicator in Studio Light porcelain style.

    segmented_control

    fn segmented_control(ctx :
    UIContext
    , id_salt : String, options : Array[String], selected_index : Int, height? : Double, width? : Double) -> (Int,
    Response
    )

    Render a segmented control widget featuring a recessed porcelain track, a floating white porcelain pill indicator with ambient shadow, and keyboard arrow switching.

    slider

    fn slider(ctx :
    UIContext
    , label : String, value : Double, min : Double, max : Double, step? : Double) -> (Double,
    Response
    )

    Render a continuous floating-point slider.

    slider_int

    fn slider_int(ctx :
    UIContext
    , label : String, value : Int, min : Int, max : Int, step? : Int) -> (Int,
    Response
    )

    Render an integer step slider.

    spinner

    Render a smooth, continuous loading spinner animation driven by context time, featuring an asymmetric breathing sweep arc with trailing opacity taper.

    spinner_with_label

    fn spinner_with_label(ctx :
    UIContext
    , label : String, size? : Double, color? :
    Color
    , stroke_width? : Double) ->
    Response

    Render a loading spinner inline with an adjacent text label.

    split_horizontal

    fn split_horizontal(ctx :
    UIContext
    , id_salt : String, split_ratio : Double, size :
    Vec2
    , left : (
    UIContext
    ,
    Rect
    ) -> Unit, right : (
    UIContext
    ,
    Rect
    ) -> Unit, min_ratio? : Double, max_ratio? : Double, min_px? : Double) -> Double

    Scoped horizontal split container: Automatically divides available space into left and right panes, manages clipping for both sides, and handles interactive divider dragging.

    split_vertical

    fn split_vertical(ctx :
    UIContext
    , id_salt : String, split_ratio : Double, size :
    Vec2
    , top : (
    UIContext
    ,
    Rect
    ) -> Unit, bottom : (
    UIContext
    ,
    Rect
    ) -> Unit, min_ratio? : Double, max_ratio? : Double, min_px? : Double) -> Double

    Scoped vertical split container: Divides space into top and bottom panes with interactive vertical divider.

    stepper

    fn stepper(ctx :
    UIContext
    , id_salt : String, value : Double, step? : Double, min? : Double, max? : Double, precision? : Int, prefix? : String, suffix? : String, width? : Double) -> (Double,
    Response
    )

    Convenience functional helper to render a stepper widget.

    steps

    fn steps(ctx :
    UIContext
    , id_salt : String, current : Int, items : Array[StepItem], clickable? : Bool, width? : Double) -> (Int,
    Response
    )

    Convenience functional helper to render a Steps navigation bar.

    tab_bar

    fn tab_bar(ctx :
    UIContext
    , _id_str : String, tabs : Array[String], selected_idx : Int) -> (Int,
    Response
    )

    Render a segmented horizontal tab bar in Studio Light. Returns a tuple of (new_selected_index, response).

    tag

    fn tag(ctx :
    UIContext
    , id_salt : String, text : String, kind? : BadgeKind, closable? : Bool) -> (Bool,
    Response
    )

    Render an interactive tag chip with optional close button (returning true when clicked).

    text_edit

    fn text_edit(ctx :
    UIContext
    , id_salt : String, text :
    Ref
    [String], placeholder? : String) ->
    Response

    Render a single-line text input bound to a Ref[String].

    text_edit_sized

    fn text_edit_sized(ctx :
    UIContext
    , id_salt : String, text : String, placeholder : String, size :
    Vec2
    ) -> (String,
    Response
    )

    Render a single-line text input with explicit dimensions in Studio Light porcelain style.

    text_edit_val

    fn text_edit_val(ctx :
    UIContext
    , id_salt : String, text : String, placeholder? : String) -> (String,
    Response
    )

    Render a single-line text input with automatic width layout.

    toast_stack

    Render a floating toast stack in Studio Light porcelain style. Toasts automatically decay over elapsed frames, stack gracefully according to the chosen anchor, and allow manual dismissal via the close button.

    toggle

    Render an interactive toggle pill switch.

    tooltip

    fn tooltip(ctx :
    UIContext
    , text : String) -> Unit

    Render an on-hover floating tooltip bubble at cursor position.

    tooltip_for

    fn tooltip_for(ctx :
    UIContext
    , id_salt : String, target_rect :
    Rect
    , is_hovered : Bool, text : String, placement? : TooltipPlacement, delay_frames? : Int) -> Bool

    Convenience helper function to display a tooltip for a specified target rect.

    virtual_list

    fn virtual_list(ctx :
    UIContext
    , id_salt : String, total_items : Int, height : Double, item_height? : Double, item_renderer : (Int,
    Rect
    ) -> Unit) -> VirtualListResponse

    Convenience one-liner to render a virtual list with default metrics.

    window

    Render a floating window container with a draggable title bar, border, and clipped content region. The layout cursor inside the content closure is local to the window interior.