triggerbox: add void* pointer to hold reference to anonymous UI object

This commit is contained in:
Paul Davis 2021-09-10 13:04:49 -06:00
parent 00d4765b57
commit e777acb7f9
2 changed files with 11 additions and 0 deletions

View file

@ -167,6 +167,9 @@ class LIBARDOUR_API Trigger : public PBD::Stateful {
virtual void jump_start ();
virtual void jump_stop ();
void set_ui (void*);
void* ui () const { return _ui; }
protected:
TriggerBox& _box;
State _state;
@ -182,6 +185,7 @@ class LIBARDOUR_API Trigger : public PBD::Stateful {
Temporal::BBT_Offset _quantization;
bool _legato;
std::string _name;
void* _ui;
void set_region_internal (boost::shared_ptr<Region>);
void request_state (State s);

View file

@ -48,6 +48,7 @@ Trigger::Trigger (size_t n, TriggerBox& b)
, _follow_action_probability (100)
, _quantization (Temporal::BBT_Offset (0, 1, 0))
, _legato (true)
, _ui (0)
{
}
@ -57,6 +58,12 @@ Trigger::set_name (std::string const & str)
_name = str;
}
void
Trigger::set_ui (void* p)
{
_ui = p;
}
void
Trigger::bang ()
{