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. | |
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.
| float pulp::view::ContextMenu::MenuLayout::border = 0.0f |
panel-edge padding on all four sides
| Rect pulp::view::ContextMenu::MenuLayout::box {} |
| float pulp::view::ContextMenu::MenuLayout::content_height = 0.0f |
Height the rows want, before the panel is capped to the overlay.
| FontSpec pulp::view::ContextMenu::MenuLayout::font {} |
the font the rows are measured/drawn with
| 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.
| std::vector<Rect> pulp::view::ContextMenu::MenuLayout::rows {} |
one per item, in item order