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

BubbleMessageComponent — small floating message bubble anchored to a source View with auto-dismiss + transient lifetime. More...

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

Go to the source code of this file.

Classes

class  pulp::view::BubbleMessageComponent

Namespaces

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

Detailed Description

BubbleMessageComponent — small floating message bubble anchored to a source View with auto-dismiss + transient lifetime.

A BubbleMessageComponent is conceptually a tooltip with a stronger caller-driven story:

  • the bubble is shown by show_for(view, text, dt_lifetime),
  • it stays anchored to the source view: position updates with anchor changes via move_to(anchor), OR (when the caller wants auto-tracking) the host can call recompute_anchor() on every tick to re-derive the position from the source view's bounds,
  • it auto-dismisses after lifetime() seconds, then fades out and finally goes idle,
  • it is transient: dismissing it nullifies the source-view pointer so subsequent tick(dt) calls do not chase a deleted view.

The widget is headless-friendly: time is driven by tick(dt), no scheduler, no OS coupling. Hosts observe visible(), opacity(), position(), text(), and source_view() and paint accordingly.

License-lineage note: the type, accessors, and lifetime contract are Pulp-native. The "anchored bubble" idea is generic UI.