Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
context_menu.hpp File Reference

Pulp-drawn (Canvas/Skia) popup / context menu rendered in the view tree. More...

#include <pulp/view/view.hpp>
#include <pulp/view/widget_painter.hpp>
#include <pulp/view/widget_metrics.hpp>
#include <pulp/view/input_events.hpp>
#include <pulp/canvas/canvas.hpp>
#include <functional>
#include <algorithm>
#include <array>
#include <memory>
#include <optional>
#include <string>
#include <vector>

Go to the source code of this file.

Classes

class  pulp::view::ContextMenu
 Floating, view-tree-drawn context / popup menu. More...
struct  pulp::view::ContextMenu::Item
struct  pulp::view::ContextMenu::MenuLayout
 The menu's resolved geometry: the panel rect and one rect per row, in this view's LOCAL coordinates. More...
struct  pulp::view::ContextMenu::ModulationLane
 A lane is the product-independent state needed by the standard two-LFO modulation popup. More...
struct  pulp::view::ContextMenu::ModulationMenuSpec

Namespaces

namespace  pulp
namespace  pulp::view
 Hover-cursor tracking for platform window hosts.

Typedefs

using pulp::view::PopupMenu = ContextMenu
 Design-system alias.

Detailed Description

Pulp-drawn (Canvas/Skia) popup / context menu rendered in the view tree.

Unlike a native OS / GTK popup menu, ContextMenu is a plain View subclass: a full-window transparent overlay that draws a menu box at an anchor point. It works identically on every platform and pulls in no new dependencies. Rows are selectable; selection fires a callback; outside-click and Escape dismiss the menu. It mirrors the ComboBox dropdown idioms (24px rows, hover highlight, separators, checkmarks, keyboard nav skipping separators) and the ModalOverlay full-window overlay pattern (minus the dimmed backdrop — a context menu does not darken what is behind it).