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

SidePanel widget (pulp #6.3 in macos plugin-authoring plan). More...

#include <algorithm>
#include <functional>
#include <pulp/view/animation.hpp>
#include <pulp/view/view.hpp>

Go to the source code of this file.

Classes

class  pulp::view::SidePanel

Namespaces

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

Typedefs

using pulp::view::Sidebar = SidePanel
 Design-system alias.

Detailed Description

SidePanel widget (pulp #6.3 in macos plugin-authoring plan).

A View subclass that animates in/out from one of its parent's four edges using core/view::Tween. Hosts a single content view that's swapped on open() and resized to fill the panel.

Surface:

  • set_edge(Edge) — which side it slides from.
  • set_extent(float) — the panel's pixel extent perpendicular to the edge (height for top/bottom, width for left/right).
  • open() / close() / toggle() — kick off slide tween.
  • is_open() — true once fully visible; is_open_or_opening() true while opening or open.
  • advance_animations(float dt) — drives the underlying Tween, mirrors the convention Knob/Fader/ScrollView use.
  • Default duration honors MotionPreferences (Tween's built-in short-circuit handles Reduced/Off).

Headless-friendly: position is computed every advance pass, so a test can poll slide_offset() between ticks without a window host.