Add dedicated Section Ruler and UI for section boundary markers
This commit is contained in:
parent
46a916f0b4
commit
9c984fc2ad
@ -541,6 +541,7 @@
|
||||
<menuitem action="toggle-range-ruler"/>
|
||||
<menuitem action="toggle-loop-punch-ruler"/>
|
||||
<menuitem action="toggle-cd-marker-ruler"/>
|
||||
<menuitem action="toggle-section-ruler"/>
|
||||
<menuitem action="toggle-marker-ruler"/>
|
||||
<menuitem action="toggle-cue-marker-ruler"/>
|
||||
<separator/>
|
||||
|
@ -288,6 +288,7 @@ Editor::Editor ()
|
||||
, range_marker_group (0)
|
||||
, transport_marker_group (0)
|
||||
, cd_marker_group (0)
|
||||
, section_marker_group (0)
|
||||
, _time_markers_group (0)
|
||||
, _selection_marker_group (0)
|
||||
, _selection_marker (new LocationMarkers)
|
||||
@ -318,11 +319,13 @@ Editor::Editor ()
|
||||
, visible_timebars (0)
|
||||
, editor_ruler_menu (0)
|
||||
, tempo_bar (0)
|
||||
, mapping_bar (0)
|
||||
, meter_bar (0)
|
||||
, marker_bar (0)
|
||||
, range_marker_bar (0)
|
||||
, transport_marker_bar (0)
|
||||
, cd_marker_bar (0)
|
||||
, section_marker_bar (0)
|
||||
, cue_marker_bar (0)
|
||||
, ruler_separator (0)
|
||||
, minsec_label (_("Mins:Secs"))
|
||||
@ -335,6 +338,7 @@ Editor::Editor ()
|
||||
, range_mark_label (_("Range Markers"))
|
||||
, transport_mark_label (_("Loop/Punch Ranges"))
|
||||
, cd_mark_label (_("CD Markers"))
|
||||
, section_mark_label (_("Sections"))
|
||||
, cue_mark_label (_("Cue Markers"))
|
||||
, videotl_label (_("Video Timeline"))
|
||||
, videotl_group (0)
|
||||
@ -558,6 +562,13 @@ Editor::Editor ()
|
||||
cd_mark_label.hide();
|
||||
cd_mark_label.set_no_show_all();
|
||||
|
||||
section_mark_label.set_name ("EditorRulerLabel");
|
||||
section_mark_label.set_size_request (-1, (int)timebar_height);
|
||||
section_mark_label.set_alignment (1.0, 0.5);
|
||||
section_mark_label.set_padding (5,0);
|
||||
section_mark_label.hide();
|
||||
section_mark_label.set_no_show_all();
|
||||
|
||||
cue_mark_label.set_name ("EditorRulerLabel");
|
||||
cue_mark_label.set_size_request (-1, (int)timebar_height);
|
||||
cue_mark_label.set_alignment (1.0, 0.5);
|
||||
|
@ -759,6 +759,8 @@ private:
|
||||
void set_color (std::string const&);
|
||||
};
|
||||
|
||||
static void reparent_location_markers (LocationMarkers*, ArdourCanvas::Item*);
|
||||
|
||||
LocationMarkers* find_location_markers (ARDOUR::Location*) const;
|
||||
ARDOUR::Location* find_location_from_marker (ArdourMarker*, bool& is_start) const;
|
||||
ArdourMarker* find_marker_from_location_id (PBD::ID const&, bool) const;
|
||||
@ -789,10 +791,8 @@ private:
|
||||
void mouse_add_new_loop (Temporal::timepos_t);
|
||||
void mouse_add_new_punch (Temporal::timepos_t);
|
||||
bool choose_new_marker_name(std::string &name, bool is_range=false);
|
||||
void update_cd_marker_display ();
|
||||
void ensure_cd_marker_updated (LocationMarkers* lam, ARDOUR::Location* location);
|
||||
void update_cue_marker_display ();
|
||||
void ensure_cue_marker_updated (LocationMarkers* lam, ARDOUR::Location* location);
|
||||
void update_marker_display ();
|
||||
void ensure_marker_updated (LocationMarkers* lam, ARDOUR::Location* location);
|
||||
void update_all_marker_lanes ();
|
||||
|
||||
TimeAxisView* clicked_axisview;
|
||||
@ -926,6 +926,7 @@ private:
|
||||
ArdourCanvas::Container* range_marker_group;
|
||||
ArdourCanvas::Container* transport_marker_group;
|
||||
ArdourCanvas::Container* cd_marker_group;
|
||||
ArdourCanvas::Container* section_marker_group;
|
||||
ArdourCanvas::Container* cue_marker_group;
|
||||
|
||||
/* parent for groups which themselves contain time markers */
|
||||
@ -974,6 +975,7 @@ private:
|
||||
Glib::RefPtr<Gtk::ToggleAction> ruler_range_action;
|
||||
Glib::RefPtr<Gtk::ToggleAction> ruler_loop_punch_action;
|
||||
Glib::RefPtr<Gtk::ToggleAction> ruler_cd_marker_action;
|
||||
Glib::RefPtr<Gtk::ToggleAction> ruler_section_action;
|
||||
Glib::RefPtr<Gtk::ToggleAction> ruler_marker_action;
|
||||
Glib::RefPtr<Gtk::ToggleAction> ruler_cue_marker_action;
|
||||
bool no_ruler_shown_update;
|
||||
@ -1066,6 +1068,7 @@ private:
|
||||
ArdourCanvas::Rectangle* range_marker_bar;
|
||||
ArdourCanvas::Rectangle* transport_marker_bar;
|
||||
ArdourCanvas::Rectangle* cd_marker_bar;
|
||||
ArdourCanvas::Rectangle* section_marker_bar;
|
||||
ArdourCanvas::Rectangle* cue_marker_bar;
|
||||
ArdourCanvas::Line* ruler_separator;
|
||||
|
||||
@ -1081,6 +1084,7 @@ private:
|
||||
Gtk::Label range_mark_label;
|
||||
Gtk::Label transport_mark_label;
|
||||
Gtk::Label cd_mark_label;
|
||||
Gtk::Label section_mark_label;
|
||||
Gtk::Label cue_mark_label;
|
||||
|
||||
/* videtimline related actions */
|
||||
@ -1856,6 +1860,7 @@ private:
|
||||
void toggle_tempo_type ();
|
||||
void ramp_to_next_tempo ();
|
||||
void toggle_marker_menu_lock ();
|
||||
void toggle_marker_section ();
|
||||
void marker_menu_hide ();
|
||||
void marker_menu_set_origin ();
|
||||
void marker_menu_loop_range ();
|
||||
|
@ -728,6 +728,7 @@ Editor::register_actions ()
|
||||
ruler_range_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-range-ruler"), _("Range Markers"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility)));
|
||||
ruler_loop_punch_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-loop-punch-ruler"), _("Loop/Punch Ranges"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility)));
|
||||
ruler_cd_marker_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-cd-marker-ruler"), _("CD Markers"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility)));
|
||||
ruler_section_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-section-ruler"), _("Section Markers"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility)));
|
||||
ruler_marker_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-marker-ruler"), _("Location Markers"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility)));
|
||||
ruler_cue_marker_action = Glib::RefPtr<ToggleAction>::cast_static (ActionManager::register_toggle_action (ruler_actions, X_("toggle-cue-marker-ruler"), _("Cue Markers"), sigc::mem_fun(*this, &Editor::toggle_ruler_visibility)));
|
||||
|
||||
|
@ -157,7 +157,7 @@ Editor::initialize_canvas ()
|
||||
|
||||
cd_marker_group = new ArdourCanvas::Container (_time_markers_group, ArdourCanvas::Duple (0.0, 0.0));
|
||||
CANVAS_DEBUG_NAME (cd_marker_group, "cd marker group");
|
||||
/* the vide is temporarily placed a the same location as the
|
||||
/* the video ruler is temporarily placed a the same location as the
|
||||
cd_marker_group, but is moved later.
|
||||
*/
|
||||
videotl_group = new ArdourCanvas::Container (_time_markers_group, ArdourCanvas::Duple(0.0, 0.0));
|
||||
@ -170,6 +170,8 @@ Editor::initialize_canvas ()
|
||||
CANVAS_DEBUG_NAME (range_marker_group, "range marker group");
|
||||
tempo_meta_group = new ArdourCanvas::Container (_time_markers_group, ArdourCanvas::Duple (0.0, (timebar_height * 4.0) + 1.0));
|
||||
CANVAS_DEBUG_NAME (tempo_meta_group, "tempo meta group");
|
||||
section_marker_group = new ArdourCanvas::Container (_time_markers_group, ArdourCanvas::Duple (0.0, (timebar_height * 5.0) + 1.0));
|
||||
CANVAS_DEBUG_NAME (tempo_meta_group, "Section marker group");
|
||||
tempo_group = new ArdourCanvas::Container (tempo_meta_group, ArdourCanvas::Duple (0.0, 0.0));
|
||||
CANVAS_DEBUG_NAME (tempo_group, "tempo group");
|
||||
mapping_group = new ArdourCanvas::Container (tempo_meta_group, ArdourCanvas::Duple (0.0, 0.0));
|
||||
@ -218,6 +220,9 @@ Editor::initialize_canvas ()
|
||||
cd_marker_bar = new ArdourCanvas::Rectangle (cd_marker_group, ArdourCanvas::Rect (0.0, timebar_top, ArdourCanvas::COORD_MAX, timebar_btm));
|
||||
CANVAS_DEBUG_NAME (cd_marker_bar, "CD Marker Bar");
|
||||
|
||||
section_marker_bar = new ArdourCanvas::Rectangle (section_marker_group, ArdourCanvas::Rect (0.0, timebar_top, ArdourCanvas::COORD_MAX, timebar_btm));
|
||||
CANVAS_DEBUG_NAME (section_marker_bar, "Section Marker Bar");
|
||||
|
||||
cue_marker_group = new ArdourCanvas::Container (_time_markers_group, ArdourCanvas::Duple (0.0, 0.0));
|
||||
cue_marker_bar = new ArdourCanvas::Rectangle (cue_marker_group, ArdourCanvas::Rect (0.0, timebar_top, ArdourCanvas::COORD_MAX, timebar_btm));
|
||||
CANVAS_DEBUG_NAME (cue_marker_bar, "Cue Marker Bar");
|
||||
@ -270,6 +275,7 @@ Editor::initialize_canvas ()
|
||||
meter_bar->Event.connect (sigc::bind (sigc::mem_fun (*this, &Editor::canvas_ruler_bar_event), meter_bar, MeterBarItem, "meter bar"));
|
||||
marker_bar->Event.connect (sigc::bind (sigc::mem_fun (*this, &Editor::canvas_ruler_bar_event), marker_bar, MarkerBarItem, "marker bar"));
|
||||
cd_marker_bar->Event.connect (sigc::bind (sigc::mem_fun (*this, &Editor::canvas_ruler_bar_event), cd_marker_bar, CdMarkerBarItem, "cd marker bar"));
|
||||
section_marker_bar->Event.connect (sigc::bind (sigc::mem_fun (*this, &Editor::canvas_ruler_bar_event), section_marker_bar, SectionMarkerBarItem, "section marker bar"));
|
||||
cue_marker_bar->Event.connect (sigc::bind (sigc::mem_fun (*this, &Editor::canvas_ruler_bar_event), cue_marker_bar, CueMarkerBarItem, "cd marker bar"));
|
||||
videotl_group->Event.connect (sigc::bind (sigc::mem_fun (*this, &Editor::canvas_videotl_bar_event), videotl_group));
|
||||
range_marker_bar->Event.connect (sigc::bind (sigc::mem_fun (*this, &Editor::canvas_ruler_bar_event), range_marker_bar, RangeMarkerBarItem, "range marker bar"));
|
||||
@ -1083,6 +1089,9 @@ Editor::color_handler()
|
||||
cd_marker_bar->set_fill_color (UIConfiguration::instance().color_mod ("cd marker bar", "marker bar"));
|
||||
cd_marker_bar->set_outline_color (UIConfiguration::instance().color ("marker bar separator"));
|
||||
|
||||
section_marker_bar->set_fill_color (UIConfiguration::instance().color_mod ("section marker bar", "marker bar"));
|
||||
section_marker_bar->set_outline_color (UIConfiguration::instance().color ("marker bar separator"));
|
||||
|
||||
cue_marker_bar->set_fill_color (UIConfiguration::instance().color_mod ("cd marker bar", "marker bar"));
|
||||
cue_marker_bar->set_outline_color (UIConfiguration::instance().color ("marker bar separator"));
|
||||
|
||||
@ -1493,6 +1502,7 @@ Editor::which_canvas_cursor(ItemType type) const
|
||||
case MarkerBarItem:
|
||||
case RangeMarkerBarItem:
|
||||
case CdMarkerBarItem:
|
||||
case SectionMarkerBarItem:
|
||||
case CueMarkerBarItem:
|
||||
case VideoBarItem:
|
||||
case TransportMarkerBarItem:
|
||||
|
@ -30,6 +30,7 @@ enum ItemType {
|
||||
MarkerBarItem,
|
||||
RangeMarkerBarItem,
|
||||
CdMarkerBarItem,
|
||||
SectionMarkerBarItem,
|
||||
CueMarkerBarItem,
|
||||
VideoBarItem,
|
||||
TransportMarkerBarItem,
|
||||
|
@ -107,6 +107,8 @@ Editor::add_new_location_internal (Location* location)
|
||||
|
||||
if (location->is_cd_marker()) {
|
||||
color = X_("location cd marker");
|
||||
} else if (location->is_section()) {
|
||||
color = X_("location section marker");
|
||||
} else if (location->is_mark()) {
|
||||
color = X_("location marker");
|
||||
} else if (location->is_auto_loop()) {
|
||||
@ -126,6 +128,9 @@ Editor::add_new_location_internal (Location* location)
|
||||
lam->start = new ArdourMarker (*this, *cue_marker_group, color, location->name(), ArdourMarker::Cue, location->start());
|
||||
lam->start->set_cue_index(location->cue_id());
|
||||
group = cue_marker_group;
|
||||
} else if (location->is_section() && ruler_section_action->get_active()) {
|
||||
lam->start = new ArdourMarker (*this, *section_marker_group, color, location->name(), ArdourMarker::RangeStart, location->start());
|
||||
group = section_marker_group;
|
||||
} else {
|
||||
lam->start = new ArdourMarker (*this, *marker_group, color, location->name(), ArdourMarker::Mark, location->start());
|
||||
group = marker_group;
|
||||
@ -414,11 +419,13 @@ Editor::location_flags_changed (Location *location)
|
||||
return;
|
||||
}
|
||||
|
||||
// move cd markers to/from cd marker bar as appropriate
|
||||
ensure_cd_marker_updated (lam, location);
|
||||
// moved markers to/from cd marker bar as appropriate
|
||||
ensure_marker_updated (lam, location);
|
||||
|
||||
if (location->is_cd_marker()) {
|
||||
lam->set_color ("location cd marker");
|
||||
} else if (location->is_section()) {
|
||||
lam->set_color ("location section marker");
|
||||
} else if (location->is_mark()) {
|
||||
lam->set_color ("location marker");
|
||||
} else if (location->is_auto_punch()) {
|
||||
@ -437,97 +444,48 @@ Editor::location_flags_changed (Location *location)
|
||||
}
|
||||
|
||||
void
|
||||
Editor::update_cd_marker_display ()
|
||||
Editor::update_marker_display ()
|
||||
{
|
||||
for (LocationMarkerMap::iterator i = location_markers.begin(); i != location_markers.end(); ++i) {
|
||||
LocationMarkers * lam = i->second;
|
||||
Location * location = i->first;
|
||||
|
||||
ensure_cd_marker_updated (lam, location);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Editor::ensure_cd_marker_updated (LocationMarkers * lam, Location * location)
|
||||
{
|
||||
if (location->is_cd_marker()
|
||||
&& (ruler_cd_marker_action->get_active() && lam->start->get_parent() != cd_marker_group))
|
||||
{
|
||||
//cerr << "reparenting non-cd marker so it can be relocated: " << location->name() << endl;
|
||||
if (lam->start) {
|
||||
lam->start->reparent (*cd_marker_group);
|
||||
}
|
||||
if (lam->end) {
|
||||
lam->end->reparent (*cd_marker_group);
|
||||
}
|
||||
}
|
||||
else if ( (!location->is_cd_marker() || !ruler_cd_marker_action->get_active())
|
||||
&& (lam->start->get_parent() == cd_marker_group))
|
||||
{
|
||||
//cerr << "reparenting non-cd marker so it can be relocated: " << location->name() << endl;
|
||||
if (location->is_mark()) {
|
||||
if (lam->start) {
|
||||
lam->start->reparent (*marker_group);
|
||||
}
|
||||
if (lam->end) {
|
||||
lam->end->reparent (*marker_group);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (lam->start) {
|
||||
lam->start->reparent (*range_marker_group);
|
||||
}
|
||||
if (lam->end) {
|
||||
lam->end->reparent (*range_marker_group);
|
||||
}
|
||||
}
|
||||
for (auto const& i : location_markers) {
|
||||
ensure_marker_updated (i.second, i.first);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::update_cue_marker_display ()
|
||||
Editor::reparent_location_markers (LocationMarkers* lam, ArdourCanvas::Item* new_parent)
|
||||
{
|
||||
for (LocationMarkerMap::iterator i = location_markers.begin(); i != location_markers.end(); ++i) {
|
||||
LocationMarkers * lam = i->second;
|
||||
Location * location = i->first;
|
||||
|
||||
ensure_cue_marker_updated (lam, location);
|
||||
if (lam->start && lam->start->get_parent() != new_parent) {
|
||||
lam->start->reparent (*new_parent);
|
||||
}
|
||||
if (lam->end && lam->end->get_parent() != new_parent) {
|
||||
lam->end->reparent (*new_parent);
|
||||
}
|
||||
}
|
||||
|
||||
void Editor::ensure_cue_marker_updated (LocationMarkers * lam, Location * location)
|
||||
void Editor::ensure_marker_updated (LocationMarkers* lam, Location* location)
|
||||
{
|
||||
if (location->is_cd_marker()
|
||||
&& (ruler_cd_marker_action->get_active() && lam->start->get_parent() != cd_marker_group))
|
||||
{
|
||||
//cerr << "reparenting non-cd marker so it can be relocated: " << location->name() << endl;
|
||||
if (lam->start) {
|
||||
lam->start->reparent (*cd_marker_group);
|
||||
}
|
||||
if (lam->end) {
|
||||
lam->end->reparent (*cd_marker_group);
|
||||
if (location->is_cd_marker()) {
|
||||
if (ruler_cd_marker_action->get_active ()) {
|
||||
reparent_location_markers (lam, cd_marker_group);
|
||||
} else if (location->is_mark()) {
|
||||
reparent_location_markers (lam, marker_group);
|
||||
} else {
|
||||
reparent_location_markers (lam, range_marker_group);
|
||||
}
|
||||
return;
|
||||
}
|
||||
else if ( (!location->is_cd_marker() || !ruler_cd_marker_action->get_active())
|
||||
&& (lam->start->get_parent() == cd_marker_group))
|
||||
{
|
||||
//cerr << "reparenting non-cd marker so it can be relocated: " << location->name() << endl;
|
||||
if (location->is_mark()) {
|
||||
if (lam->start) {
|
||||
lam->start->reparent (*marker_group);
|
||||
}
|
||||
if (lam->end) {
|
||||
lam->end->reparent (*marker_group);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (lam->start) {
|
||||
lam->start->reparent (*range_marker_group);
|
||||
}
|
||||
if (lam->end) {
|
||||
lam->end->reparent (*range_marker_group);
|
||||
}
|
||||
|
||||
if (location->is_section()) {
|
||||
if (ruler_section_action->get_active ()) {
|
||||
reparent_location_markers (lam, section_marker_group);
|
||||
} else {
|
||||
reparent_location_markers (lam, marker_group);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (location->is_mark() || location->matches (Location::Flags(0))) {
|
||||
reparent_location_markers (lam, marker_group);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1102,6 +1060,16 @@ Editor::build_marker_menu (Location* loc)
|
||||
|
||||
items.push_back (SeparatorElem());
|
||||
|
||||
if (!loc->is_range () && !loc->is_xrun ()) {
|
||||
items.push_back (CheckMenuElem (_("Section Boundary")));
|
||||
Gtk::CheckMenuItem* item = static_cast<Gtk::CheckMenuItem*> (&items.back());
|
||||
if (loc->is_section ()) {
|
||||
item->set_active ();
|
||||
}
|
||||
item->signal_activate().connect (sigc::mem_fun (*this, &Editor::toggle_marker_section));
|
||||
items.push_back (SeparatorElem());
|
||||
}
|
||||
|
||||
items.push_back (MenuElem (_("Remove"), sigc::mem_fun(*this, &Editor::marker_menu_remove)));
|
||||
}
|
||||
|
||||
@ -1728,6 +1696,28 @@ Editor::toggle_marker_menu_lock ()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::toggle_marker_section ()
|
||||
{
|
||||
ArdourMarker* marker;
|
||||
|
||||
if ((marker = reinterpret_cast<ArdourMarker *> (marker_menu_item->get_data ("marker"))) == 0) {
|
||||
fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
|
||||
abort(); /*NOTREACHED*/
|
||||
}
|
||||
|
||||
Location* loc;
|
||||
bool ignored;
|
||||
|
||||
loc = find_location_from_marker (marker, ignored);
|
||||
|
||||
if (!loc) {
|
||||
return;
|
||||
}
|
||||
|
||||
loc->set_section (!loc->is_section ());
|
||||
}
|
||||
|
||||
void
|
||||
Editor::marker_menu_rename ()
|
||||
{
|
||||
|
@ -854,6 +854,7 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
|
||||
case SamplesRulerItem:
|
||||
case MinsecRulerItem:
|
||||
case MarkerBarItem:
|
||||
case SectionMarkerBarItem:
|
||||
if (!Keyboard::modifier_state_equals (event->button.state, Keyboard::PrimaryModifier)
|
||||
&& !ArdourKeyboard::indicates_constraint (event->button.state)) {
|
||||
_drags->set (new CursorDrag (this, *_playhead_cursor, false), event);
|
||||
@ -1715,6 +1716,7 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
|
||||
case RangeMarkerBarItem:
|
||||
case TransportMarkerBarItem:
|
||||
case CdMarkerBarItem:
|
||||
case SectionMarkerBarItem:
|
||||
case TempoBarItem:
|
||||
case MappingBarItem:
|
||||
case TempoCurveItem:
|
||||
@ -1837,6 +1839,13 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
|
||||
}
|
||||
return true;
|
||||
|
||||
case SectionMarkerBarItem:
|
||||
if (!_dragging_playhead) {
|
||||
snap_to_with_modifier (where, event, Temporal::RoundNearest, SnapToGrid_Scaled);
|
||||
mouse_add_new_marker (where, Location::IsSection);
|
||||
}
|
||||
return true;
|
||||
|
||||
case CueMarkerBarItem:
|
||||
if (!_dragging_playhead) {
|
||||
/* if we get here then a dragged range wasn't done */
|
||||
|
@ -178,6 +178,7 @@ Editor::initialize_rulers ()
|
||||
lab_children.push_back (Element(range_mark_label, PACK_SHRINK, PACK_START));
|
||||
lab_children.push_back (Element(transport_mark_label, PACK_SHRINK, PACK_START));
|
||||
lab_children.push_back (Element(cd_mark_label, PACK_SHRINK, PACK_START));
|
||||
lab_children.push_back (Element(section_mark_label, PACK_SHRINK, PACK_START));
|
||||
lab_children.push_back (Element(mark_label, PACK_SHRINK, PACK_START));
|
||||
lab_children.push_back (Element(cue_mark_label, PACK_SHRINK, PACK_START));
|
||||
lab_children.push_back (Element(videotl_label, PACK_SHRINK, PACK_START));
|
||||
@ -241,8 +242,11 @@ Editor::popup_ruler_menu (timepos_t const & where, ItemType t)
|
||||
break;
|
||||
|
||||
case CdMarkerBarItem:
|
||||
// TODO
|
||||
ruler_items.push_back (MenuElem (_("New CD Track Marker"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_add_new_marker), where, Location::IsCDMarker, 0)));
|
||||
ruler_items.push_back (MenuElem (_("New CD Track Marker"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_add_new_marker), where, Location::Flags(Location::IsMark |Location::IsCDMarker), 0)));
|
||||
break;
|
||||
|
||||
case SectionMarkerBarItem:
|
||||
ruler_items.push_back (MenuElem (_("New Section Marker"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_add_new_marker), where, Location::Flags(Location::IsMark | Location::IsSection), 0)));
|
||||
break;
|
||||
|
||||
case CueMarkerBarItem:
|
||||
@ -341,6 +345,7 @@ Editor::store_ruler_visibility ()
|
||||
node->set_property (X_("rangemarker"), ruler_range_action->get_active());
|
||||
node->set_property (X_("transportmarker"), ruler_loop_punch_action->get_active());
|
||||
node->set_property (X_("cdmarker"), ruler_cd_marker_action->get_active());
|
||||
node->set_property (X_("section"), ruler_section_action->get_active());
|
||||
node->set_property (X_("marker"), ruler_marker_action->get_active());
|
||||
node->set_property (X_("cuemarker"), ruler_cue_marker_action->get_active());
|
||||
node->set_property (X_("videotl"), ruler_video_action->get_active());
|
||||
@ -401,6 +406,12 @@ Editor::restore_ruler_visibility ()
|
||||
}
|
||||
}
|
||||
|
||||
if (node->get_property ("section", yn)) {
|
||||
ruler_section_action->set_active (yn);
|
||||
} else {
|
||||
ruler_section_action->set_active (true);
|
||||
}
|
||||
|
||||
if (node->get_property ("cuemarker", yn)) {
|
||||
ruler_cue_marker_action->set_active (yn);
|
||||
} else {
|
||||
@ -455,6 +466,7 @@ Editor::update_ruler_visibility ()
|
||||
range_mark_label.hide();
|
||||
transport_mark_label.hide();
|
||||
cd_mark_label.hide();
|
||||
section_mark_label.hide();
|
||||
cue_mark_label.hide();
|
||||
mark_label.hide();
|
||||
videotl_label.hide();
|
||||
@ -604,12 +616,32 @@ Editor::update_ruler_visibility ()
|
||||
tbgpos += timebar_height;
|
||||
visible_timebars++;
|
||||
// make sure all cd markers show up in their respective places
|
||||
update_cd_marker_display();
|
||||
update_marker_display();
|
||||
} else {
|
||||
cd_marker_group->hide();
|
||||
cd_mark_label.hide();
|
||||
// make sure all cd markers show up in their respective places
|
||||
update_cd_marker_display();
|
||||
update_marker_display();
|
||||
}
|
||||
|
||||
if (ruler_section_action->get_active()) {
|
||||
old_unit_pos = section_marker_group->position().y;
|
||||
if (tbpos != old_unit_pos) {
|
||||
section_marker_group->move (ArdourCanvas::Duple (0.0, tbpos - old_unit_pos));
|
||||
}
|
||||
section_marker_group->show();
|
||||
section_mark_label.show();
|
||||
|
||||
section_marker_bar->set_outline(false);
|
||||
|
||||
tbpos += timebar_height;
|
||||
tbgpos += timebar_height;
|
||||
visible_timebars++;
|
||||
update_marker_display();
|
||||
} else {
|
||||
section_marker_group->hide();
|
||||
section_mark_label.hide();
|
||||
update_marker_display();
|
||||
}
|
||||
|
||||
if (ruler_marker_action->get_active()) {
|
||||
@ -643,13 +675,9 @@ Editor::update_ruler_visibility ()
|
||||
tbpos += timebar_height;
|
||||
tbgpos += timebar_height;
|
||||
visible_timebars++;
|
||||
// make sure all cd markers show up in their respective places
|
||||
update_cue_marker_display();
|
||||
} else {
|
||||
cue_marker_group->hide();
|
||||
cue_mark_label.hide();
|
||||
// make sure all cd markers show up in their respective places
|
||||
update_cue_marker_display();
|
||||
}
|
||||
|
||||
if (ruler_video_action->get_active()) {
|
||||
|
@ -150,6 +150,7 @@ setup_gtk_ardour_enums ()
|
||||
REGISTER_ENUM (MarkerBarItem);
|
||||
REGISTER_ENUM (RangeMarkerBarItem);
|
||||
REGISTER_ENUM (CdMarkerBarItem);
|
||||
REGISTER_ENUM (SectionMarkerBarItem);
|
||||
REGISTER_ENUM (CueMarkerBarItem);
|
||||
REGISTER_ENUM (VideoBarItem);
|
||||
REGISTER_ENUM (TransportMarkerBarItem);
|
||||
|
@ -38,6 +38,7 @@ RulerDialog::RulerDialog ()
|
||||
get_vbox()->pack_start (range_button);
|
||||
get_vbox()->pack_start (loop_punch_button);
|
||||
get_vbox()->pack_start (cdmark_button);
|
||||
get_vbox()->pack_start (section_button);
|
||||
get_vbox()->pack_start (mark_button);
|
||||
get_vbox()->pack_start (cuemark_button);
|
||||
get_vbox()->pack_start (video_button);
|
||||
@ -54,6 +55,7 @@ RulerDialog::RulerDialog ()
|
||||
connect_action (range_button, "range-ruler");
|
||||
connect_action (mark_button, "marker-ruler");
|
||||
connect_action (cdmark_button, "cd-marker-ruler");
|
||||
connect_action (section_button, "section-ruler");
|
||||
connect_action (cuemark_button, "cue-marker-ruler");
|
||||
connect_action (video_button, "video-ruler");
|
||||
}
|
||||
|
@ -45,6 +45,7 @@ private:
|
||||
Gtk::CheckButton range_button;
|
||||
Gtk::CheckButton mark_button;
|
||||
Gtk::CheckButton cdmark_button;
|
||||
Gtk::CheckButton section_button;
|
||||
Gtk::CheckButton cuemark_button;
|
||||
Gtk::CheckButton video_button;
|
||||
|
||||
|
@ -175,6 +175,7 @@
|
||||
<ColorAlias name="location marker" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="location punch" alias="alert:ruddy"/>
|
||||
<ColorAlias name="location range" alias="alert:green"/>
|
||||
<ColorAlias name="location section marker" alias="theme:contrasting clock"/>
|
||||
<ColorAlias name="lock button: fill active" alias="widget:bg"/>
|
||||
<ColorAlias name="lock button: led active" alias="alert:red"/>
|
||||
<ColorAlias name="lua action button: fill" alias="widget:bg"/>
|
||||
@ -373,6 +374,7 @@
|
||||
<ColorAlias name="secondary delta clock: cursor" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="secondary delta clock: edited text" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="secondary delta clock: text" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="section marker bar" alias="neutral:background2"/>
|
||||
<ColorAlias name="selected midi note frame" alias="neutral:foregroundest"/>
|
||||
<ColorAlias name="selected region base" alias="widget:ruddy"/>
|
||||
<ColorAlias name="selected time axis frame" alias="alert:blue"/>
|
||||
|
@ -176,6 +176,7 @@
|
||||
<ColorAlias name="location marker" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="location punch" alias="alert:ruddy"/>
|
||||
<ColorAlias name="location range" alias="alert:green"/>
|
||||
<ColorAlias name="location section marker" alias="theme:contrasting clock"/>
|
||||
<ColorAlias name="lock button: fill active" alias="widget:bg"/>
|
||||
<ColorAlias name="lock button: led active" alias="alert:red"/>
|
||||
<ColorAlias name="lua action button: fill" alias="widget:bg"/>
|
||||
@ -374,6 +375,7 @@
|
||||
<ColorAlias name="secondary delta clock: cursor" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="secondary delta clock: edited text" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="secondary delta clock: text" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="section marker bar" alias="neutral:background2"/>
|
||||
<ColorAlias name="selected midi note frame" alias="alert:ruddy"/>
|
||||
<ColorAlias name="selected region base" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="selected time axis frame" alias="alert:ruddy"/>
|
||||
|
@ -176,6 +176,7 @@
|
||||
<ColorAlias name="location marker" alias="theme:contrasting"/>
|
||||
<ColorAlias name="location punch" alias="alert:ruddy"/>
|
||||
<ColorAlias name="location range" alias="alert:green"/>
|
||||
<ColorAlias name="location section marker" alias="theme:contrasting clock"/>
|
||||
<ColorAlias name="lock button: fill active" alias="widget:bg"/>
|
||||
<ColorAlias name="lock button: led active" alias="alert:red"/>
|
||||
<ColorAlias name="lua action button: fill" alias="widget:bg"/>
|
||||
@ -374,6 +375,7 @@
|
||||
<ColorAlias name="secondary delta clock: cursor" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="secondary delta clock: edited text" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="secondary delta clock: text" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="section marker bar" alias="neutral:background2"/>
|
||||
<ColorAlias name="selected midi note frame" alias="alert:ruddy"/>
|
||||
<ColorAlias name="selected region base" alias="alert:ruddy"/>
|
||||
<ColorAlias name="selected time axis frame" alias="alert:ruddy"/>
|
||||
|
@ -176,6 +176,7 @@
|
||||
<ColorAlias name="location marker" alias="widget:blue"/>
|
||||
<ColorAlias name="location punch" alias="alert:ruddy"/>
|
||||
<ColorAlias name="location range" alias="alert:green"/>
|
||||
<ColorAlias name="location section marker" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="lock button: fill active" alias="widget:bg"/>
|
||||
<ColorAlias name="lock button: led active" alias="alert:red"/>
|
||||
<ColorAlias name="lua action button: fill" alias="widget:bg"/>
|
||||
@ -374,6 +375,7 @@
|
||||
<ColorAlias name="secondary delta clock: cursor" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="secondary delta clock: edited text" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="secondary delta clock: text" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="section marker bar" alias="neutral:backgroundest"/>
|
||||
<ColorAlias name="selected midi note frame" alias="alert:cyan"/>
|
||||
<ColorAlias name="selected region base" alias="theme:contrasting clock"/>
|
||||
<ColorAlias name="selected time axis frame" alias="widget:blue"/>
|
||||
|
@ -177,6 +177,7 @@
|
||||
<ColorAlias name="location marker" alias="theme:contrasting less"/>
|
||||
<ColorAlias name="location punch" alias="widget:ruddy"/>
|
||||
<ColorAlias name="location range" alias="theme:contrasting less"/>
|
||||
<ColorAlias name="location section marker" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="lock button: fill active" alias="widget:bg"/>
|
||||
<ColorAlias name="lock button: led active" alias="alert:red"/>
|
||||
<ColorAlias name="lua action button: fill" alias="widget:bg"/>
|
||||
@ -375,6 +376,7 @@
|
||||
<ColorAlias name="secondary delta clock: cursor" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="secondary delta clock: edited text" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="secondary delta clock: text" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="section marker bar" alias="neutral:background2"/>
|
||||
<ColorAlias name="selected midi note frame" alias="alert:ruddy"/>
|
||||
<ColorAlias name="selected region base" alias="alert:ruddy"/>
|
||||
<ColorAlias name="selected time axis frame" alias="alert:ruddy"/>
|
||||
|
@ -177,6 +177,7 @@
|
||||
<ColorAlias name="location marker" alias="theme:contrasting clock"/>
|
||||
<ColorAlias name="location punch" alias="alert:ruddy"/>
|
||||
<ColorAlias name="location range" alias="alert:green"/>
|
||||
<ColorAlias name="location section marker" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="lock button: fill active" alias="widget:bg"/>
|
||||
<ColorAlias name="lock button: led active" alias="alert:red"/>
|
||||
<ColorAlias name="lua action button: fill" alias="widget:bg"/>
|
||||
@ -376,6 +377,7 @@
|
||||
<ColorAlias name="secondary delta clock: cursor" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="secondary delta clock: edited text" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="secondary delta clock: text" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="section marker bar" alias="neutral:background2"/>
|
||||
<ColorAlias name="selected midi note frame" alias="alert:ruddy"/>
|
||||
<ColorAlias name="selected region base" alias="alert:ruddy"/>
|
||||
<ColorAlias name="selected time axis frame" alias="alert:ruddy"/>
|
||||
|
@ -177,6 +177,7 @@
|
||||
<ColorAlias name="location marker" alias="theme:contrasting clock"/>
|
||||
<ColorAlias name="location punch" alias="alert:ruddy"/>
|
||||
<ColorAlias name="location range" alias="alert:green"/>
|
||||
<ColorAlias name="location section marker" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="lock button: fill active" alias="widget:bg"/>
|
||||
<ColorAlias name="lock button: led active" alias="alert:red"/>
|
||||
<ColorAlias name="lua action button: fill" alias="widget:bg"/>
|
||||
@ -375,6 +376,7 @@
|
||||
<ColorAlias name="secondary delta clock: cursor" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="secondary delta clock: edited text" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="secondary delta clock: text" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="section marker bar" alias="neutral:background2"/>
|
||||
<ColorAlias name="selected midi note frame" alias="alert:ruddy"/>
|
||||
<ColorAlias name="selected region base" alias="alert:ruddy"/>
|
||||
<ColorAlias name="selected time axis frame" alias="alert:ruddy"/>
|
||||
|
@ -175,6 +175,7 @@
|
||||
<ColorAlias name="location marker" alias="theme:contrasting clock"/>
|
||||
<ColorAlias name="location punch" alias="alert:ruddy"/>
|
||||
<ColorAlias name="location range" alias="alert:blue"/>
|
||||
<ColorAlias name="location section marker" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="lock button: fill active" alias="widget:bg"/>
|
||||
<ColorAlias name="lock button: led active" alias="alert:red"/>
|
||||
<ColorAlias name="lua action button: fill" alias="widget:bg"/>
|
||||
@ -372,6 +373,7 @@
|
||||
<ColorAlias name="secondary delta clock: background" alias="theme:bg2"/>
|
||||
<ColorAlias name="secondary delta clock: cursor" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="secondary delta clock: edited text" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="section marker bar" alias="neutral:background2"/>
|
||||
<ColorAlias name="secondary delta clock: text" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="selected midi note frame" alias="alert:ruddy"/>
|
||||
<ColorAlias name="selected region base" alias="neutral:foregroundest"/>
|
||||
|
@ -176,6 +176,7 @@
|
||||
<ColorAlias name="location marker" alias="alert:yellow"/>
|
||||
<ColorAlias name="location punch" alias="alert:red"/>
|
||||
<ColorAlias name="location range" alias="alert:greenish"/>
|
||||
<ColorAlias name="location section marker" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="lock button: fill active" alias="widget:bg"/>
|
||||
<ColorAlias name="lock button: led active" alias="alert:red"/>
|
||||
<ColorAlias name="lua action button: fill" alias="widget:bg"/>
|
||||
@ -374,6 +375,7 @@
|
||||
<ColorAlias name="secondary delta clock: cursor" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="secondary delta clock: edited text" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="secondary delta clock: text" alias="theme:contrasting alt"/>
|
||||
<ColorAlias name="section marker bar" alias="neutral:background2"/>
|
||||
<ColorAlias name="selected midi note frame" alias="alert:ruddy"/>
|
||||
<ColorAlias name="selected region base" alias="alert:ruddy"/>
|
||||
<ColorAlias name="selected time axis frame" alias="alert:ruddy"/>
|
||||
|
Loading…
Reference in New Issue
Block a user