2 Copyright (C) 2000 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #include <sigc++/retype.h>
24 #include <libgnomecanvas/libgnomecanvas.h>
25 #include <gtkmm2ext/gtk_ui.h>
26 #include <gtkmm2ext/window_title.h>
28 #include <ardour/location.h>
29 #include <pbd/memento_command.h>
33 #include "selection.h"
35 #include "gui_thread.h"
36 #include "simplerect.h"
44 using namespace ARDOUR;
47 using namespace Gtkmm2ext;
50 Editor::clear_marker_display ()
52 for (LocationMarkerMap::iterator i = location_markers.begin(); i != location_markers.end(); ++i) {
56 location_markers.clear ();
60 Editor::add_new_location (Location *location)
62 ENSURE_GUI_THREAD (bind (mem_fun(*this, &Editor::add_new_location), location));
64 LocationMarkers *lam = new LocationMarkers;
67 if (location->is_cd_marker()) {
68 color = location_cd_marker_color;
69 } else if (location->is_mark()) {
70 color = location_marker_color;
71 } else if (location->is_auto_loop()) {
72 color = location_loop_color;
73 } else if (location->is_auto_punch()) {
74 color = location_punch_color;
76 color = location_range_color;
79 if (location->is_mark()) {
80 lam->start = new Marker (*this, *marker_group, color, location->name(), Marker::Mark, location->start());
83 } else if (location->is_auto_loop()) {
85 lam->start = new Marker (*this, *transport_marker_group, color,
86 location->name(), Marker::LoopStart, location->start());
87 lam->end = new Marker (*this, *transport_marker_group, color,
88 location->name(), Marker::LoopEnd, location->end());
90 } else if (location->is_auto_punch()) {
92 lam->start = new Marker (*this, *transport_marker_group, color,
93 location->name(), Marker::PunchIn, location->start());
94 lam->end = new Marker (*this, *transport_marker_group, color,
95 location->name(), Marker::PunchOut, location->end());
100 lam->start = new Marker (*this, *range_marker_group, color,
101 location->name(), Marker::Start, location->start());
102 lam->end = new Marker (*this, *range_marker_group, color,
103 location->name(), Marker::End, location->end());
106 if (location->is_hidden ()) {
112 location->start_changed.connect (mem_fun(*this, &Editor::location_changed));
113 location->end_changed.connect (mem_fun(*this, &Editor::location_changed));
114 location->changed.connect (mem_fun(*this, &Editor::location_changed));
115 location->name_changed.connect (mem_fun(*this, &Editor::location_changed));
116 location->FlagsChanged.connect (mem_fun(*this, &Editor::location_flags_changed));
118 pair<Location*,LocationMarkers*> newpair;
120 newpair.first = location;
121 newpair.second = lam;
123 location_markers.insert (newpair);
127 Editor::location_changed (Location *location)
129 ENSURE_GUI_THREAD (bind (mem_fun(*this, &Editor::location_changed), location));
131 LocationMarkers *lam = find_location_markers (location);
134 /* a location that isn't "marked" with markers */
138 lam->set_name (location->name());
139 lam->set_position (location->start(), location->end());
141 if (location->is_auto_loop()) {
142 update_loop_range_view ();
143 } else if (location->is_auto_punch()) {
144 update_punch_range_view ();
149 Editor::location_flags_changed (Location *location, void *src)
151 ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::location_flags_changed), location, src));
153 LocationMarkers *lam = find_location_markers (location);
156 /* a location that isn't "marked" with markers */
160 if (location->is_cd_marker()) {
161 lam->set_color_rgba (location_cd_marker_color);
162 } else if (location->is_mark()) {
163 lam->set_color_rgba (location_marker_color);
164 } else if (location->is_auto_punch()) {
165 lam->set_color_rgba (location_punch_color);
166 } else if (location->is_auto_loop()) {
167 lam->set_color_rgba (location_loop_color);
169 lam->set_color_rgba (location_range_color);
172 if (location->is_hidden()) {
179 Editor::LocationMarkers::~LocationMarkers ()
190 Editor::LocationMarkers *
191 Editor::find_location_markers (Location *location) const
193 LocationMarkerMap::const_iterator i;
195 for (i = location_markers.begin(); i != location_markers.end(); ++i) {
196 if ((*i).first == location) {
205 Editor::find_location_from_marker (Marker *marker, bool& is_start) const
207 LocationMarkerMap::const_iterator i;
209 for (i = location_markers.begin(); i != location_markers.end(); ++i) {
210 LocationMarkers *lm = (*i).second;
211 if (lm->start == marker) {
214 } else if (lm->end == marker) {
224 Editor::refresh_location_display_internal (Locations::LocationList& locations)
226 clear_marker_display ();
228 for (Locations::LocationList::iterator i = locations.begin(); i != locations.end(); ++i) {
229 add_new_location (*i);
234 Editor::refresh_location_display ()
236 ENSURE_GUI_THREAD(mem_fun(*this, &Editor::refresh_location_display));
239 session->locations()->apply (*this, &Editor::refresh_location_display_internal);
244 Editor::refresh_location_display_s (Change ignored)
246 ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::refresh_location_display_s), ignored));
249 session->locations()->apply (*this, &Editor::refresh_location_display_internal);
254 Editor::LocationMarkers::hide()
257 if (end) { end->hide(); }
261 Editor::LocationMarkers::show()
264 if (end) { end->show(); }
268 Editor::LocationMarkers::set_name (const string& str)
270 start->set_name (str);
271 if (end) { end->set_name (str); }
275 Editor::LocationMarkers::set_position (nframes_t startf,
278 start->set_position (startf);
279 if (end) { end->set_position (endf); }
283 Editor::LocationMarkers::set_color_rgba (uint32_t rgba)
285 start->set_color_rgba (rgba);
286 if (end) { end->set_color_rgba (rgba); }
290 Editor::mouse_add_new_marker (nframes_t where)
294 session->locations()->next_available_name(markername,"mark");
295 Location *location = new Location (where, where, markername, Location::IsMark);
296 session->begin_reversible_command (_("add marker"));
297 XMLNode &before = session->locations()->get_state();
298 session->locations()->add (location, true);
299 XMLNode &after = session->locations()->get_state();
300 session->add_command (new MementoCommand<Locations>(*(session->locations()), &before, &after));
301 session->commit_reversible_command ();
303 /* find the marker we just added */
305 LocationMarkers *lam = find_location_markers (location);
307 /* make it the selected marker */
308 selection->set (lam->start);
314 Editor::remove_marker (ArdourCanvas::Item& item, GdkEvent* event)
319 if ((marker = static_cast<Marker*> (item.get_data ("marker"))) == 0) {
320 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
324 Location* loc = find_location_from_marker (marker, is_start);
326 if (session && loc) {
327 Glib::signal_idle().connect (bind (mem_fun(*this, &Editor::really_remove_marker), loc));
332 Editor::really_remove_marker (Location* loc)
334 session->begin_reversible_command (_("remove marker"));
335 XMLNode &before = session->locations()->get_state();
336 session->locations()->remove (loc);
337 XMLNode &after = session->locations()->get_state();
338 session->add_command (new MementoCommand<Locations>(*(session->locations()), &before, &after));
339 session->commit_reversible_command ();
344 Editor::location_gone (Location *location)
346 ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::location_gone), location));
348 LocationMarkerMap::iterator i;
350 if (location == transport_loop_location()) {
351 update_loop_range_view (true);
354 if (location == transport_punch_location()) {
355 update_punch_range_view (true);
358 for (i = location_markers.begin(); i != location_markers.end(); ++i) {
359 if ((*i).first == location) {
361 location_markers.erase (i);
368 Editor::tm_marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item)
370 if (tm_marker_menu == 0) {
371 build_tm_marker_menu ();
374 marker_menu_item = item;
375 tm_marker_menu->popup (1, ev->time);
380 Editor::marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item)
383 if ((marker = reinterpret_cast<Marker *> (item->get_data("marker"))) == 0) {
384 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
389 Location * loc = find_location_from_marker (marker, is_start);
390 if (loc == transport_loop_location() || loc == transport_punch_location()) {
391 if (transport_marker_menu == 0) {
392 build_range_marker_menu (true);
394 marker_menu_item = item;
395 transport_marker_menu->popup (1, ev->time);
398 if (loc->is_mark()) {
399 bool start_or_end = loc->is_start() || loc->is_end();
402 if (start_end_marker_menu == 0)
403 build_marker_menu (true);
404 markerMenu = start_end_marker_menu;
406 if (marker_menu == 0)
407 build_marker_menu (false);
408 markerMenu = marker_menu;
412 // GTK2FIX use action group sensitivity
414 if (children.size() >= 3) {
415 MenuItem * loopitem = &children[2];
417 if (loc->is_mark()) {
418 loopitem->set_sensitive(false);
421 loopitem->set_sensitive(true);
426 marker_menu_item = item;
427 markerMenu->popup (1, ev->time);
430 if (loc->is_range_marker()) {
431 if (range_marker_menu == 0){
432 build_range_marker_menu (false);
434 marker_menu_item = item;
435 range_marker_menu->popup (1, ev->time);
441 Editor::new_transport_marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item)
443 if (new_transport_marker_menu == 0) {
444 build_new_transport_marker_menu ();
447 new_transport_marker_menu->popup (1, ev->time);
452 Editor::transport_marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item)
454 if (transport_marker_menu == 0) {
455 build_range_marker_menu (true);
458 transport_marker_menu->popup (1, ev->time);
462 Editor::build_marker_menu (bool start_or_end)
464 using namespace Menu_Helpers;
466 Menu *markerMenu = new Menu;
468 start_end_marker_menu = markerMenu;
470 marker_menu = markerMenu;
472 MenuList& items = markerMenu->items();
473 markerMenu->set_name ("ArdourContextMenu");
475 items.push_back (MenuElem (_("Locate to here"), mem_fun(*this, &Editor::marker_menu_set_playhead)));
476 items.push_back (MenuElem (_("Play from here"), mem_fun(*this, &Editor::marker_menu_play_from)));
477 items.push_back (MenuElem (_("Move Mark to Playhead"), mem_fun(*this, &Editor::marker_menu_set_from_playhead)));
479 items.push_back (SeparatorElem());
481 items.push_back (MenuElem (_("Hide"), mem_fun(*this, &Editor::marker_menu_hide)));
482 if (start_or_end) return;
483 items.push_back (MenuElem (_("Rename"), mem_fun(*this, &Editor::marker_menu_rename)));
484 items.push_back (MenuElem (_("Lock"), bind (mem_fun(*this, &Editor::marker_menu_lock), true)));
485 items.push_back (MenuElem (_("Unlock"), bind (mem_fun(*this, &Editor::marker_menu_lock), false)));
487 items.push_back (SeparatorElem());
489 items.push_back (MenuElem (_("Remove"), mem_fun(*this, &Editor::marker_menu_remove)));
493 Editor::build_range_marker_menu (bool loop_or_punch)
495 using namespace Menu_Helpers;
497 Menu *markerMenu = new Menu;
499 transport_marker_menu = markerMenu;
501 range_marker_menu = markerMenu;
504 MenuList& items = markerMenu->items();
505 markerMenu->set_name ("ArdourContextMenu");
507 items.push_back (MenuElem (_("Locate to Range Mark"), mem_fun(*this, &Editor::marker_menu_set_playhead)));
508 items.push_back (MenuElem (_("Play from Range Mark"), mem_fun(*this, &Editor::marker_menu_play_from)));
509 if (!loop_or_punch) {
510 items.push_back (MenuElem (_("Play Range"), mem_fun(*this, &Editor::marker_menu_play_range)));
511 items.push_back (MenuElem (_("Loop Range"), mem_fun(*this, &Editor::marker_menu_loop_range)));
513 items.push_back (MenuElem (_("Set Range Mark from Playhead"), mem_fun(*this, &Editor::marker_menu_set_from_playhead)));
514 items.push_back (MenuElem (_("Set Range from Range Selection"), mem_fun(*this, &Editor::marker_menu_set_from_selection)));
516 items.push_back (SeparatorElem());
518 items.push_back (MenuElem (_("Hide Range"), mem_fun(*this, &Editor::marker_menu_hide)));
519 if (!loop_or_punch) {
520 items.push_back (MenuElem (_("Rename Range"), mem_fun(*this, &Editor::marker_menu_rename)));
521 items.push_back (MenuElem (_("Remove Range"), mem_fun(*this, &Editor::marker_menu_remove)));
524 items.push_back (SeparatorElem());
526 items.push_back (MenuElem (_("Separate Regions in Range"), mem_fun(*this, &Editor::marker_menu_separate_regions_using_location)));
527 items.push_back (MenuElem (_("Select All in Range"), mem_fun(*this, &Editor::marker_menu_select_all_selectables_using_range)));
528 items.push_back (MenuElem (_("Select Range"), mem_fun(*this, &Editor::marker_menu_select_using_range)));
533 Editor::build_tm_marker_menu ()
535 using namespace Menu_Helpers;
537 tm_marker_menu = new Menu;
538 MenuList& items = tm_marker_menu->items();
539 tm_marker_menu->set_name ("ArdourContextMenu");
541 items.push_back (MenuElem (_("Edit"), mem_fun(*this, &Editor::marker_menu_edit)));
542 items.push_back (MenuElem (_("Remove"), mem_fun(*this, &Editor::marker_menu_remove)));
546 Editor::build_new_transport_marker_menu ()
548 using namespace Menu_Helpers;
550 new_transport_marker_menu = new Menu;
551 MenuList& items = new_transport_marker_menu->items();
552 new_transport_marker_menu->set_name ("ArdourContextMenu");
554 items.push_back (MenuElem (_("Set Loop Range"), mem_fun(*this, &Editor::new_transport_marker_menu_set_loop)));
555 items.push_back (MenuElem (_("Set Punch Range"), mem_fun(*this, &Editor::new_transport_marker_menu_set_punch)));
557 new_transport_marker_menu->signal_unmap_event().connect ( mem_fun(*this, &Editor::new_transport_marker_menu_popdown));
561 Editor::marker_menu_hide ()
565 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
566 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
573 if ((l = find_location_from_marker (marker, is_start)) != 0) {
574 l->set_hidden (true, this);
579 Editor::marker_menu_select_using_range ()
583 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
584 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
591 if (((l = find_location_from_marker (marker, is_start)) != 0) && (l->end() > l->start())) {
592 set_selection_from_range (*l);
597 Editor::marker_menu_select_all_selectables_using_range ()
601 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
602 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
609 if (((l = find_location_from_marker (marker, is_start)) != 0) && (l->end() > l->start())) {
610 select_all_within (l->start(), l->end() - 1, 0, DBL_MAX, track_views, Selection::Set);
616 Editor::marker_menu_separate_regions_using_location ()
620 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
621 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
628 if (((l = find_location_from_marker (marker, is_start)) != 0) && (l->end() > l->start())) {
629 separate_regions_using_location (*l);
635 Editor::marker_menu_play_from ()
639 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
640 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
647 if ((l = find_location_from_marker (marker, is_start)) != 0) {
650 session->request_locate (l->start(), true);
653 //session->request_bounded_roll (l->start(), l->end());
656 session->request_locate (l->start(), true);
658 session->request_locate (l->end(), true);
665 Editor::marker_menu_set_playhead ()
669 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
670 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
677 if ((l = find_location_from_marker (marker, is_start)) != 0) {
680 session->request_locate (l->start(), false);
684 session->request_locate (l->start(), false);
686 session->request_locate (l->end(), false);
693 Editor::marker_menu_set_from_playhead ()
697 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
698 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
705 if ((l = find_location_from_marker (marker, is_start)) != 0) {
708 l->set_start (session->transport_frame ());
712 l->set_start (session->transport_frame ());
714 l->set_end (session->transport_frame ());
721 Editor::marker_menu_set_from_selection ()
725 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
726 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
733 if ((l = find_location_from_marker (marker, is_start)) != 0) {
739 /* if range selection use first to last */
741 if (mouse_mode == Editing::MouseRange) {
742 if (!selection->time.empty()) {
743 l->set_start (selection->time.start());
744 l->set_end (selection->time.end_frame());
748 if (!selection->regions.empty()) {
749 l->set_start (selection->regions.start());
750 l->set_end (selection->regions.end_frame());
759 Editor::marker_menu_play_range ()
763 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
764 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
771 if ((l = find_location_from_marker (marker, is_start)) != 0) {
774 session->request_locate (l->start(), true);
777 session->request_bounded_roll (l->start(), l->end());
784 Editor::marker_menu_loop_range ()
788 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
789 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
796 if ((l = find_location_from_marker (marker, is_start)) != 0) {
798 if ((l2 = transport_loop_location()) != 0) {
799 l2->set (l->start(), l->end());
801 // enable looping, reposition and start rolling
802 session->request_play_loop(true);
803 session->request_locate (l2->start(), true);
809 Editor::marker_menu_edit ()
815 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
816 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
820 if ((mm = dynamic_cast<MeterMarker*> (marker)) != 0) {
821 edit_meter_section (&mm->meter());
822 } else if ((tm = dynamic_cast<TempoMarker*> (marker)) != 0) {
823 edit_tempo_section (&tm->tempo());
825 fatal << X_("programming erorr: unhandled marker type in Editor::marker_menu_edit")
832 Editor::marker_menu_remove ()
838 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
839 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
843 if ((mm = dynamic_cast<MeterMarker*> (marker)) != 0) {
844 remove_meter_marker (marker_menu_item);
845 } else if ((tm = dynamic_cast<TempoMarker*> (marker)) != 0) {
846 remove_tempo_marker (marker_menu_item);
848 remove_marker (*marker_menu_item, (GdkEvent*) 0);
853 Editor::marker_menu_lock (bool yn)
858 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
859 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
866 loc = find_location_from_marker (marker, ignored);
878 Editor::marker_menu_rename ()
882 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
883 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
890 loc = find_location_from_marker (marker, is_start);
894 ArdourPrompter dialog (true);
897 dialog.set_prompt (_("New Name:"));
899 WindowTitle title(Glib::get_application_name());
900 if (loc->is_mark()) {
901 title += _("Rename Mark");
903 title += _("Rename Range");
906 dialog.set_title(title.get_string());
908 dialog.set_name ("MarkRenameWindow");
909 dialog.set_size_request (250, -1);
910 dialog.set_position (Gtk::WIN_POS_MOUSE);
912 dialog.add_button (_("Rename"), RESPONSE_ACCEPT);
913 dialog.set_response_sensitive (Gtk::RESPONSE_ACCEPT, false);
914 dialog.set_initial_text (loc->name());
918 switch (dialog.run ()) {
919 case RESPONSE_ACCEPT:
925 begin_reversible_command ( _("rename marker") );
926 XMLNode &before = session->locations()->get_state();
928 dialog.get_result(txt);
931 XMLNode &after = session->locations()->get_state();
932 session->add_command (new MementoCommand<Locations>(*(session->locations()), &before, &after));
933 commit_reversible_command ();
937 Editor::new_transport_marker_menu_popdown (GdkEventAny *ev)
940 transport_bar_drag_rect->hide();
941 range_marker_drag_rect->hide();
947 Editor::new_transport_marker_menu_set_loop ()
949 set_loop_range (temp_location->start(), temp_location->end(), _("set loop range"));
953 Editor::new_transport_marker_menu_set_punch ()
955 set_punch_range (temp_location->start(), temp_location->end(), _("set punch range"));
959 Editor::update_loop_range_view (bool visibility)
967 if (session->get_play_loop() && ((tll = transport_loop_location()) != 0)) {
969 double x1 = frame_to_pixel (tll->start());
970 double x2 = frame_to_pixel (tll->end());
972 transport_loop_range_rect->property_x1() = x1;
973 transport_loop_range_rect->property_x2() = x2;
976 transport_loop_range_rect->show();
979 } else if (visibility) {
980 transport_loop_range_rect->hide();
985 Editor::update_punch_range_view (bool visibility)
993 if ((Config->get_punch_in() || Config->get_punch_out()) && ((tpl = transport_punch_location()) != 0)) {
995 double x1 = frame_to_pixel (tpl->start());
996 double x2 = frame_to_pixel (tpl->end());
998 transport_punch_range_rect->property_x1() = x1;
999 transport_punch_range_rect->property_x2() = x2;
1002 transport_punch_range_rect->show();
1005 else if (visibility) {
1006 transport_punch_range_rect->hide();
1009 // if (session->get_punch_in()) {
1010 // double x = frame_to_pixel (transport_punch_location->start());
1011 // gnome_canvas_item_set (transport_punchin_line, "x1", x, "x2", x, NULL);
1013 // if (visibility) {
1014 // gnome_canvas_item_show (transport_punchin_line);
1017 // else if (visibility) {
1018 // gnome_canvas_item_hide (transport_punchin_line);
1021 // if (session->get_punch_out()) {
1022 // double x = frame_to_pixel (transport_punch_location->end());
1024 // gnome_canvas_item_set (transport_punchout_line, "x1", x, "x2", x, NULL);
1026 // if (visibility) {
1027 // gnome_canvas_item_show (transport_punchout_line);
1030 // else if (visibility) {
1031 // gnome_canvas_item_hide (transport_punchout_line);
1036 Editor::marker_selection_changed ()
1038 for (LocationMarkerMap::iterator i = location_markers.begin(); i != location_markers.end(); ++i) {
1039 LocationMarkers* lam = i->second;
1042 lam->start->hide_line();
1046 lam->end->hide_line();
1050 for (MarkerSelection::iterator x = selection->markers.begin(); x != selection->markers.end(); ++x) {
1051 (*x)->add_line (cursor_group, canvas_height);