13
0

add skeleton for lollipop drags

This commit is contained in:
Paul Davis 2023-06-16 12:31:18 -06:00
parent 0a530d3c18
commit 2977205f3a
2 changed files with 67 additions and 0 deletions

View File

@ -7177,3 +7177,39 @@ RegionMarkerDrag::setup_pointer_sample_offset ()
const timepos_t model_abs_pos = rv->region ()->position () + (rv->region ()->start ().distance (model.position ()));
_pointer_offset = model_abs_pos.distance (raw_grab_time ());
}
LollipopDrag::LollipopDrag (Editor* ed, MidiRegionView* r, ArdourCanvas::Item* i)
: Drag (ed, i, r->region ()->position ().time_domain ())
{
}
LollipopDrag::~LollipopDrag ()
{
}
void
LollipopDrag::start_grab (GdkEvent *ev, Gdk::Cursor* c)
{
Drag::start_grab (ev, c);
}
void
LollipopDrag::motion (GdkEvent *ev, bool first_move)
{
}
void
LollipopDrag::finished (GdkEvent *ev, bool did_move)
{
}
void
LollipopDrag::aborted (bool)
{
}
void
LollipopDrag::setup_pointer_sample_offset ()
{
}

View File

@ -1546,4 +1546,35 @@ class RegionMarkerDrag : public Drag
ARDOUR::CueMarker dragging_model;
};
class LollipopDrag : public Drag
{
public:
LollipopDrag (Editor*, MidiRegionView*, ArdourCanvas::Item*);
~LollipopDrag ();
void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
void motion (GdkEvent *, bool);
void finished (GdkEvent *, bool);
void aborted (bool);
bool allow_vertical_autoscroll () const {
return false;
}
bool allow_horizontal_autoscroll () const {
return false;
}
bool x_movement_matters () const {
return false;
}
void setup_pointer_sample_offset ();
private:
MidiRegionView* _region;
NoteBase* _primary;
};
#endif /* __gtk2_ardour_editor_drag_h_ */