2024-08-26 15:09:50 -04:00
|
|
|
#ifndef __gtk2_ardour_ghost_event_h__
|
|
|
|
#define __gtk2_ardour_ghost_event_h__
|
|
|
|
|
2024-10-18 20:23:13 -04:00
|
|
|
#include <unordered_map>
|
2024-08-30 14:31:20 -04:00
|
|
|
#include <sigc++/trackable.h>
|
|
|
|
|
|
|
|
#include "evoral/Note.h"
|
|
|
|
#include "temporal/beats.h"
|
2024-08-26 15:09:50 -04:00
|
|
|
|
|
|
|
namespace ArdourCanvas {
|
|
|
|
class Container;
|
|
|
|
class Item;
|
|
|
|
}
|
|
|
|
|
|
|
|
class NoteBase;
|
|
|
|
|
|
|
|
class GhostEvent : public sigc::trackable
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
GhostEvent (::NoteBase *, ArdourCanvas::Container *);
|
|
|
|
GhostEvent (::NoteBase *, ArdourCanvas::Container *, ArdourCanvas::Item* i);
|
|
|
|
virtual ~GhostEvent ();
|
|
|
|
|
|
|
|
NoteBase* event;
|
|
|
|
ArdourCanvas::Item* item;
|
|
|
|
bool is_hit;
|
|
|
|
int velocity_while_editing;
|
|
|
|
|
|
|
|
/* must match typedef in NoteBase */
|
|
|
|
typedef Evoral::Note<Temporal::Beats> NoteType;
|
2024-10-18 20:23:13 -04:00
|
|
|
typedef std::unordered_map<std::shared_ptr<NoteType>, GhostEvent* > EventList;
|
2024-08-26 15:09:50 -04:00
|
|
|
|
|
|
|
static GhostEvent* find (std::shared_ptr<NoteType> parent, EventList& events, EventList::iterator& opti);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* __gtk2_ardour_ghost_event_h__ */
|