triggerbox: move TriggerReference object into ARDOUR::Triggerbox
Also, change box handle to a pointer so that we can have a default (empty) constructor.
This commit is contained in:
parent
ce71ee010e
commit
4d15bf9f18
@ -45,26 +45,17 @@ namespace ArdourCanvas
|
|||||||
class Polygon;
|
class Polygon;
|
||||||
}
|
}
|
||||||
|
|
||||||
class TriggerReference
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
TriggerReference (ARDOUR::TriggerBox& b, uint32_t s) : box (b), slot (s) {}
|
|
||||||
boost::shared_ptr<ARDOUR::Trigger> trigger() const { return box.trigger (slot); }
|
|
||||||
|
|
||||||
ARDOUR::TriggerBox& box;
|
|
||||||
uint32_t slot;
|
|
||||||
};
|
|
||||||
|
|
||||||
class TriggerEntry : public ArdourCanvas::Rectangle
|
class TriggerEntry : public ArdourCanvas::Rectangle
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TriggerEntry (ArdourCanvas::Item* item, TriggerReference rf);
|
TriggerEntry (ArdourCanvas::Item* item, ARDOUR::TriggerReference rf);
|
||||||
~TriggerEntry ();
|
~TriggerEntry ();
|
||||||
|
|
||||||
boost::shared_ptr<ARDOUR::Trigger> trigger () const
|
boost::shared_ptr<ARDOUR::Trigger> trigger () const
|
||||||
{
|
{
|
||||||
return tref.trigger();
|
return tref.trigger();
|
||||||
}
|
}
|
||||||
|
ARDOUR::TriggerReference trigger_reference() const { return tref; }
|
||||||
|
|
||||||
ArdourCanvas::Rectangle* play_button;
|
ArdourCanvas::Rectangle* play_button;
|
||||||
ArdourCanvas::Rectangle* name_button;
|
ArdourCanvas::Rectangle* name_button;
|
||||||
|
@ -648,6 +648,18 @@ class LIBARDOUR_API TriggerBox : public Processor
|
|||||||
static std::atomic<int> active_trigger_boxes;
|
static std::atomic<int> active_trigger_boxes;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class TriggerReference
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
TriggerReference () : box (0), slot (0) {}
|
||||||
|
TriggerReference (ARDOUR::TriggerBox& b, uint32_t s) : box (&b), slot (s) {}
|
||||||
|
|
||||||
|
boost::shared_ptr<ARDOUR::Trigger> trigger() const { assert (box); return box->trigger (slot); }
|
||||||
|
|
||||||
|
ARDOUR::TriggerBox* box;
|
||||||
|
uint32_t slot;
|
||||||
|
};
|
||||||
|
|
||||||
namespace Properties {
|
namespace Properties {
|
||||||
LIBARDOUR_API extern PBD::PropertyDescriptor<bool> use_follow;
|
LIBARDOUR_API extern PBD::PropertyDescriptor<bool> use_follow;
|
||||||
LIBARDOUR_API extern PBD::PropertyDescriptor<bool> running;
|
LIBARDOUR_API extern PBD::PropertyDescriptor<bool> running;
|
||||||
|
Loading…
Reference in New Issue
Block a user