From 41ade3b024cae2c8f953959f51f54970034a0137 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 19 Jan 2022 09:06:38 -0700 Subject: [PATCH] add a distinct Marker type enum for cue markers Plan is to change the shape before this is considered done; for now it uses the same shape as a regular marker --- gtk2_ardour/editor_markers.cc | 2 +- gtk2_ardour/marker.cc | 16 ++++++++++++++++ gtk2_ardour/marker.h | 3 ++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc index 25ef61eee0..00afe7f0f5 100644 --- a/gtk2_ardour/editor_markers.cc +++ b/gtk2_ardour/editor_markers.cc @@ -122,7 +122,7 @@ Editor::add_new_location_internal (Location* location) lam->start = new ArdourMarker (*this, *cd_marker_group, color, location->name(), ArdourMarker::Mark, location->start()); group = cd_marker_group; } else if (location->is_cue_marker() && ruler_cue_marker_action->get_active()) { - lam->start = new ArdourMarker (*this, *cue_marker_group, color, location->name(), ArdourMarker::Mark, location->start()); + lam->start = new ArdourMarker (*this, *cue_marker_group, color, location->name(), ArdourMarker::Cue, location->start()); group = cue_marker_group; } else { lam->start = new ArdourMarker (*this, *marker_group, color, location->name(), ArdourMarker::Mark, location->start()); diff --git a/gtk2_ardour/marker.cc b/gtk2_ardour/marker.cc index 910fc2e79c..9628320a7f 100644 --- a/gtk2_ardour/marker.cc +++ b/gtk2_ardour/marker.cc @@ -167,6 +167,8 @@ ArdourMarker::ArdourMarker (PublicEditor& ed, ArdourCanvas::Item& parent, guint3 * \ | * MH,MH * + * Cue: + * ben: put your shape here :) */ switch (type) { @@ -268,6 +270,20 @@ ArdourMarker::ArdourMarker (PublicEditor& ed, ArdourCanvas::Item& parent, guint3 _label_offset = 0.0; break; + case Cue: + /* ben: new shape needed here */ + points = new ArdourCanvas::Points (); + + points->push_back (ArdourCanvas::Duple (0.0, 0.0)); + points->push_back (ArdourCanvas::Duple ( M6, 0.0)); + points->push_back (ArdourCanvas::Duple ( M6, MH * .4)); + points->push_back (ArdourCanvas::Duple ( M3, MH)); + points->push_back (ArdourCanvas::Duple (0.0, MH * .4)); + points->push_back (ArdourCanvas::Duple (0.0, 0.0)); + + _shift = 3; + _label_offset = 10.0; + break; } _position = pos; diff --git a/gtk2_ardour/marker.h b/gtk2_ardour/marker.h index dd67b14780..23fc4c7b8f 100644 --- a/gtk2_ardour/marker.h +++ b/gtk2_ardour/marker.h @@ -66,7 +66,8 @@ public: LoopEnd, PunchIn, PunchOut, - RegionCue + RegionCue, + Cue };