Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::timeline_editor::ScriptedUiHost< Intent > Class Template Referencefinal

#include <scripted_ui_host.hpp>

Classes

struct  AuditionRecord
 One audition the host was asked for, with the outcome it gave back. More...

Public Types

using IntentType = Intent

Public Member Functions

 ScriptedUiHost ()
void set_program (const ScriptedProgram &program)
 Update the current program in place.
void swap_program (const ScriptedProgram &program)
 Adopt a different compiled program, as an engine does when a recompile lands.
std::uint64_t program_generation () const
void set_audition_status (AuditionStatus status)
 What the host does with the next audition request.
void set_intent_status (IntentStatus status)
 What the host does with the next intent.
const std::vector< AuditionRecord > & auditions () const
const std::vector< AuditionHandle > & ended_auditions () const
const std::vector< Intent > & intents () const
void clear_emissions ()
UiPlayhead playhead () const noexcept override
 The latest playhead reading, by value.
AuditionResult begin_audition (const AuditionRequest &request) noexcept override
 Ask to hear something.
void end_audition (AuditionHandle handle) noexcept override
 End a sustained audition.
IntentResult submit_intent (const Intent &intent) noexcept override
 Hand over one intent a gesture produced.

Member Typedef Documentation

◆ IntentType

template<class Intent>
using pulp::timeline_editor::SequencerUiHostT< Intent >::IntentType = Intent
inherited

Constructor & Destructor Documentation

◆ ScriptedUiHost()

template<class Intent>
pulp::timeline_editor::ScriptedUiHost< Intent >::ScriptedUiHost ( )
inline

Member Function Documentation

◆ auditions()

template<class Intent>
const std::vector< AuditionRecord > & pulp::timeline_editor::ScriptedUiHost< Intent >::auditions ( ) const
inline

◆ begin_audition()

template<class Intent>
AuditionResult pulp::timeline_editor::ScriptedUiHost< Intent >::begin_audition ( const AuditionRequest & request)
inlineoverridevirtualnoexcept

Ask to hear something.

A host that does not audition returns Unsupported and does nothing else, which is a complete implementation.

Implements pulp::timeline_editor::SequencerUiHost.

◆ clear_emissions()

template<class Intent>
void pulp::timeline_editor::ScriptedUiHost< Intent >::clear_emissions ( )
inline

◆ end_audition()

template<class Intent>
void pulp::timeline_editor::ScriptedUiHost< Intent >::end_audition ( AuditionHandle handle)
inlineoverridevirtualnoexcept

End a sustained audition.

Ending an already-ended or never-started handle is a no-op, so a view may end unconditionally on mouse-up.

Implements pulp::timeline_editor::SequencerUiHost.

◆ ended_auditions()

template<class Intent>
const std::vector< AuditionHandle > & pulp::timeline_editor::ScriptedUiHost< Intent >::ended_auditions ( ) const
inline

◆ intents()

template<class Intent>
const std::vector< Intent > & pulp::timeline_editor::ScriptedUiHost< Intent >::intents ( ) const
inline

◆ playhead()

template<class Intent>
UiPlayhead pulp::timeline_editor::ScriptedUiHost< Intent >::playhead ( ) const
inlineoverridevirtualnoexcept

The latest playhead reading, by value.

Cheap enough to call once per frame; implementations publish through a lock-free primitive rather than blocking the caller.

Implements pulp::timeline_editor::SequencerUiHost.

◆ program_generation()

template<class Intent>
std::uint64_t pulp::timeline_editor::ScriptedUiHost< Intent >::program_generation ( ) const
inline

◆ set_audition_status()

template<class Intent>
void pulp::timeline_editor::ScriptedUiHost< Intent >::set_audition_status ( AuditionStatus status)
inline

What the host does with the next audition request.

Defaults to starting it; set Unsupported to exercise a view against a host with no audio.

◆ set_intent_status()

template<class Intent>
void pulp::timeline_editor::ScriptedUiHost< Intent >::set_intent_status ( IntentStatus status)
inline

What the host does with the next intent.

◆ set_program()

template<class Intent>
void pulp::timeline_editor::ScriptedUiHost< Intent >::set_program ( const ScriptedProgram & program)
inline

Update the current program in place.

Advances the publish sequence, not the program generation: this is the engine moving, not swapping.

◆ submit_intent()

template<class Intent>
IntentResult pulp::timeline_editor::ScriptedUiHost< Intent >::submit_intent ( const Intent & intent)
inlineoverridevirtualnoexcept

Hand over one intent a gesture produced.

The host routes it to whatever owns the document; the view never learns what that is.

Implements pulp::timeline_editor::SequencerUiHostT< Intent >.

◆ swap_program()

template<class Intent>
void pulp::timeline_editor::ScriptedUiHost< Intent >::swap_program ( const ScriptedProgram & program)
inline

Adopt a different compiled program, as an engine does when a recompile lands.

The previous program's storage is released before the new one is allocated, so anything that borrowed from it is now reading freed bytes.


The documentation for this class was generated from the following file:
  • /home/runner/work/pulp/pulp/core/timeline_editor/include/pulp/timeline_editor/scripted_ui_host.hpp