Skip to main content

Module widget

Module widget 

Source
Expand description

Widget types and styling.

Structs§

Style
Visual and layout style for a widget.
Widget
A single widget in the UI tree.

Enums§

Dock
WinForms-style dock — which edge(s) the widget attaches to inside its parent.
FocusStyle
How a focused widget shows its focus indicator.
Units
A size value — either a fixed pixel amount, a CSS-style percentage of the parent’s own resolved content size (0.0–100.0), or Auto (size to content/available space, this crate’s original behaviour).
WidgetKind

Functions§

button
inv_slot
An inventory-slot decoration (icon + stack-count overlay) for item_id (empty string = empty slot) with count items. Purely decorative — real drag-and-drop still goes through the vanilla Slot this overlays.
item_slot
label
mc_image
panel
scroll_view
A vertically scrolling column: clips its children, scrolls them by Widget::scroll_y and draws a scrollbar when they overflow — WPF’s ScrollViewer around a StackPanel. Give it a fixed (or flex) height.
spacer