Expand description
Context-menu overlay widget.
Renders a floating right-click menu at the click coordinates, clamped to stay inside the visible window region. The caller is responsible for keyboard / mouse dispatch; this struct is purely a renderer.
§Layout
┌─────────────────────────┐
│ Back │ ← selected row (highlighted)
│ Forward │
│─────────────────────────│ ← separator (hairline)
│ Reload │
└─────────────────────────┘Structs§
- Context
Menu Entry - One entry as seen by the widget. The caller resolves
labelfromContextMenuItem::label()and setsis_separator/enabled. - Context
Menu Overlay - Snapshot passed to [
ContextMenuOverlay::paint_at] each frame.
Constants§
- CONTEXT_
MENU_ MIN_ WIDTH - Minimum menu width in pixels.
- CONTEXT_
MENU_ PADDING_ X - Horizontal padding inside the menu panel.
- CONTEXT_
MENU_ ROW_ HEIGHT - Height of a single selectable item row in pixels.
- CONTEXT_
MENU_ SEP_ HEIGHT - Height of a separator row in pixels.