mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
triggerbox: change entire UI side to avoid using TriggerPtr
Lifetime management of Triggers is unlike anything(?) we've dealt with in Ardour so far. The parent object (Triggerbox) has a normal lifetime pattern, but Triggers can come and go in a way that few other objects do (although Processors and particularly PluginInsert are somewhat similar). We do not want the GUI to hold references to the actual Triggers, because the end of life of a Trigger is not really a signal for the GUI element to go away (the Trigger will be replaced in the slot). Consequently, we do not want TriggerPtr used as a member variable anywhere in the UI. Instead we use a TriggerReference which can "lookup" a Trigger on-demand (by box and slot number). The (G)UI now uses these exclusively. Work still needed to pick up trigger swap signals from the boxen.
This commit is contained in:
parent
401411d5c3
commit
c18823c0e0
16 changed files with 109 additions and 99 deletions
|
|
@ -37,7 +37,7 @@ public:
|
|||
TriggerPropertiesBox () {}
|
||||
~TriggerPropertiesBox () {}
|
||||
|
||||
virtual void set_trigger (ARDOUR::TriggerPtr) = 0;
|
||||
virtual void set_trigger (ARDOUR::TriggerReference) = 0;
|
||||
};
|
||||
|
||||
class AudioTriggerPropertiesBox : public TriggerPropertiesBox
|
||||
|
|
@ -46,7 +46,7 @@ public:
|
|||
AudioTriggerPropertiesBox ();
|
||||
~AudioTriggerPropertiesBox ();
|
||||
|
||||
void set_trigger (ARDOUR::TriggerPtr);
|
||||
void set_trigger (ARDOUR::TriggerReference);
|
||||
|
||||
void set_session (ARDOUR::Session*);
|
||||
|
||||
|
|
@ -58,7 +58,7 @@ protected:
|
|||
Gtk::Label _header_label;
|
||||
|
||||
private:
|
||||
boost::shared_ptr<ARDOUR::AudioTrigger> _trigger;
|
||||
ARDOUR::TriggerReference tref;
|
||||
|
||||
Gtk::Table _table;
|
||||
Gtk::Label _abpm_label;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue