Skip to main content

Module tool_box

Module tool_box 

Source
Expand description

ToolBox — a vertical stack of collapsible sections, exactly one expanded at a time.

Semantic cousin of Qt’s QToolBox and the collapsible groups in IntelliJ’s Settings dialog. Differs from Accordion (single-item independent disclosure) and TabWidget (horizontal tab bar with dormant panes) by combining vertical layout, always-visible headers, and exclusive expansion in one widget.

Int UI visual language:

  • flat, borderless headers (no corner radius)
  • 1 dp accent indicator bar on the leading edge of the active header
  • color-only emphasis (selected / hover / pressed surface roles)
  • border IS the focus ring: 1 dp accent border appears on the focused header, no separate ring primitive
  • content swaps are instant — Int UI’s house rule is to avoid decorative animation for inline transitions; see MotionTokens. Matches the existing TabWidget precedent where pane swaps have no transition.
let selected = ctx.signal(0_usize);
ToolBox::new(selected.clone())
    .item("Outline",    outline_widget)
    .item("Properties", properties_widget)
    .add(ToolBoxItem::new("Build", build_widget).enabled(false))

Structs§

ToolBox
A vertical container of collapsible sections with exactly one expanded at a time — the Int UI / QToolBox pattern.
ToolBoxItem
One section of a ToolBox. Construct with ToolBoxItem::new and pass to ToolBox::add, or use the convenience ToolBox::item / ToolBox::item_id builders directly when leading / trailing slots and tooltip are not needed.

Enums§

ToolBoxOrientation
Orientation of a ToolBox: how its collapsible sections are arranged.

Constants§

TOOL_BOX_CHEVRON_SIZE
TOOL_BOX_HEADER_MIN_HEIGHT
ToolBox design tokens.
TOOL_BOX_HEADER_PADDING_HORIZONTAL
TOOL_BOX_ICON_TEXT_SPACING
TOOL_BOX_INDICATOR_THICKNESS