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

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

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

Go to the source code of this file.

Classes

class  pulp::view::ScrollBar
 Standalone, parameter-style scrollbar. More...

Namespaces

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

Detailed Description

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

The existing core/view::ScrollView ships its own intrinsic, hover-fade scroll affordance — but that one is coupled to the ScrollView container and isn't reusable on a developer-drawn canvas. ScrollBar is the standalone widget developers reach for when they need a parameter- style scroll affordance on a custom layout: range editors, timeline rulers, panes that aren't ScrollView subclasses, or anywhere a host wants a scrollbar wired to a RangedAudioParameter-like model.

Surface:

  • Horizontal or vertical orientation.
  • Holds a value in [min, max] plus a page_size (the visible window length) and an arrow_step / page_step for keyboard navigation.
  • Mouse: drag thumb, click track to page, click arrow buttons to step.
  • Keys (when focused): arrow left/right or up/down → arrow_step; page up / page down → page_step; home / end → min / max.
  • Headless-friendly: zero platform dependencies, paint via canvas API only, drives on_change callback for binding to a parameter store.