Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::view::ContextMenu::MenuLayout Struct Reference

The menu's resolved geometry: the panel rect and one rect per row, in this view's LOCAL coordinates. More...

#include <context_menu.hpp>

Public Attributes

Rect box {}
float border = 0.0f
 panel-edge padding on all four sides
FontSpec font {}
 the font the rows are measured/drawn with
std::vector< Rect > rows {}
 one per item, in item order
float content_height = 0.0f
 Height the rows want, before the panel is capped to the overlay.
float max_scroll = 0.0f
 content_height - box.height, clamped at 0.

Detailed Description

The menu's resolved geometry: the panel rect and one rect per row, in this view's LOCAL coordinates.

Rows are NOT assumed to be uniform height — a skin may make a separator two pixels tall and a label row twenty — so hit-testing and painting both walk this list rather than dividing by a row constant.

Member Data Documentation

◆ border

float pulp::view::ContextMenu::MenuLayout::border = 0.0f

panel-edge padding on all four sides

◆ box

Rect pulp::view::ContextMenu::MenuLayout::box {}

◆ content_height

float pulp::view::ContextMenu::MenuLayout::content_height = 0.0f

Height the rows want, before the panel is capped to the overlay.

◆ font

FontSpec pulp::view::ContextMenu::MenuLayout::font {}

the font the rows are measured/drawn with

◆ max_scroll

float pulp::view::ContextMenu::MenuLayout::max_scroll = 0.0f

content_height - box.height, clamped at 0.

Non-zero means the panel could not show every row and the rows scroll inside it.

◆ rows

std::vector<Rect> pulp::view::ContextMenu::MenuLayout::rows {}

one per item, in item order


The documentation for this struct was generated from the following file: