Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::view::ScalarSourceBinding Class Reference

Binds a ScalarSource and caches the latest value for paint. More...

#include <value_source_binding.hpp>

Public Member Functions

 ScalarSourceBinding (View &owner)
void set_source (std::shared_ptr< ScalarSource > source)
 Drops the cached value along with the old source — see MeterSourceBinding::set_source.
void set_active (bool active)
 See MeterSourceBinding::set_active.
bool active () const
void refresh ()
void stop ()
float value () const
 The most recent value snapshotted on the clock.
bool has_source () const
bool subscribed () const
FrameClock * subscribed_clock () const

Detailed Description

Binds a ScalarSource and caches the latest value for paint.

Same lifetime contract as MeterSourceBinding.

Constructor & Destructor Documentation

◆ ScalarSourceBinding()

pulp::view::ScalarSourceBinding::ScalarSourceBinding ( View & owner)
inlineexplicit

Member Function Documentation

◆ active()

bool pulp::view::ScalarSourceBinding::active ( ) const
inline

◆ has_source()

bool pulp::view::ScalarSourceBinding::has_source ( ) const
inline

◆ refresh()

void pulp::view::ScalarSourceBinding::refresh ( )
inline

◆ set_active()

void pulp::view::ScalarSourceBinding::set_active ( bool active)

◆ set_source()

void pulp::view::ScalarSourceBinding::set_source ( std::shared_ptr< ScalarSource > source)

Drops the cached value along with the old source — see MeterSourceBinding::set_source.

◆ stop()

void pulp::view::ScalarSourceBinding::stop ( )
inline

◆ subscribed()

bool pulp::view::ScalarSourceBinding::subscribed ( ) const
inline

◆ subscribed_clock()

FrameClock * pulp::view::ScalarSourceBinding::subscribed_clock ( ) const
inline

◆ value()

float pulp::view::ScalarSourceBinding::value ( ) const
inline

The most recent value snapshotted on the clock.

Paint-safe: a plain member read. 0 until the first frame.


The documentation for this class was generated from the following file: