Skip to main content

Module layout

Module layout 

Source
Expand description

Simple layout helpers for positioning widgets.

Structs§

GridLayout
Grid-based layout for a plugin UI.
GridWidget
A widget placed in a grid layout.
HeaderTitles
Title band drawn above a layout. The title slot renders larger / brighter on the left of the band; the subtitle slot renders smaller / dimmer on the right. Each slot is independently optional - set either, both, or neither.
KnobDef
A widget definition for the layout - either explicit type or auto-detected.
KnobRow
A row of widgets with an optional section label.
PluginLayout
Layout configuration for a plugin UI.
Section
A group of widgets with an optional section label.

Enums§

Layout
Layout variant for editor dispatch.
WidgetKind
Explicit widget type for layout overrides.

Constants§

AUTO
Sentinel value for auto-placed grid widgets.
DROPDOWN_BOX_HEIGHT
Pixel height of the dropdown button box (the closed state - clicking this opens the popup). Both widgets::draw_dropdown (paint side) and interaction::open_dropdown (popup-anchor math) need to agree.
GRID_DEFAULT_CELL_SIZE
Default cell size in logical points when GridLayout::build is called without .with_cell_size(...). Matches the scaffolded plugin’s pre-refactor value so untouched scaffolds render the same as before.
GRID_GAP
GRID_HEADER_H
GRID_PADDING
GRID_SECTION_H
HEADER_HEIGHT
Pixel height of the title-bar header widgets::draw_header paints at the top of the editor.
ROWS_COLUMN_GAP
Horizontal gap between adjacent widgets in a row. The full pitch between widget origins is knob_size + ROWS_COLUMN_GAP.
ROWS_LAYOUT_TOP
Y-offset of the first row below the header. The 4-pixel gap between HEADER_HEIGHT and ROWS_LAYOUT_TOP is the breathing room between the title bar and the first row of widgets.
ROWS_ROW_GAP
Vertical gap below a row. The full pitch between row origins is knob_size + ROWS_ROW_GAP.
ROWS_SECTION_LABEL_HEIGHT
Vertical pixels reserved for a section label (Row::label) drawn above its row.

Functions§

compute_section_offsets
Compute cumulative section-label pixel offsets per row.
dropdown
Dropdown list widget.
knob
Rotary knob widget.
meter
Level meter widget.
section
Create a labeled section of widgets for GridLayout::build().
selector
Click-to-cycle selector widget.
slider
Horizontal slider widget.
toggle
Toggle switch widget.
widgets
Wrap bare widgets into an unlabeled section (no section header).
xy_pad
XY pad controlling two parameters.