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.
21 #include <sigc++/retype.h>
25 #include <libgnomecanvas/libgnomecanvas.h>
26 #include <gtkmm2ext/gtk_ui.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;
49 Editor::clear_marker_display ()
51 for (LocationMarkerMap::iterator i = location_markers.begin(); i != location_markers.end(); ++i) {
55 location_markers.clear ();
59 Editor::add_new_location (Location *location)
61 ENSURE_GUI_THREAD (bind (mem_fun(*this, &Editor::add_new_location), location));
63 LocationMarkers *lam = new LocationMarkers;
66 if (location->is_cd_marker()) {
67 color = location_cd_marker_color;
68 } else if (location->is_mark()) {
69 color = location_marker_color;
70 } else if (location->is_auto_loop()) {
71 color = location_loop_color;
72 } else if (location->is_auto_punch()) {
73 color = location_punch_color;
75 color = location_range_color;
78 if (location->is_mark()) {
79 lam->start = new Marker (*this, *marker_group, color, location->name(), Marker::Mark, location->start());
82 } else if (location->is_auto_loop()) {
84 lam->start = new Marker (*this, *transport_marker_group, color,
85 location->name(), Marker::LoopStart, location->start());
86 lam->end = new Marker (*this, *transport_marker_group, color,
87 location->name(), Marker::LoopEnd, location->end());
89 } else if (location->is_auto_punch()) {
91 lam->start = new Marker (*this, *transport_marker_group, color,
92 location->name(), Marker::PunchIn, location->start());
93 lam->end = new Marker (*this, *transport_marker_group, color,
94 location->name(), Marker::PunchOut, location->end());
99 lam->start = new Marker (*this, *range_marker_group, color,
100 location->name(), Marker::Start, location->start());
101 lam->end = new Marker (*this, *range_marker_group, color,
102 location->name(), Marker::End, location->end());
105 if (location->is_hidden ()) {
111 location->start_changed.connect (mem_fun(*this, &Editor::location_changed));
112 location->end_changed.connect (mem_fun(*this, &Editor::location_changed));
113 location->changed.connect (mem_fun(*this, &Editor::location_changed));
114 location->name_changed.connect (mem_fun(*this, &Editor::location_changed));
115 location->FlagsChanged.connect (mem_fun(*this, &Editor::location_flags_changed));
117 pair<Location*,LocationMarkers*> newpair;
119 newpair.first = location;
120 newpair.second = lam;
122 location_markers.insert (newpair);
126 Editor::location_changed (Location *location)
128 ENSURE_GUI_THREAD (bind (mem_fun(*this, &Editor::location_changed), location));
130 LocationMarkers *lam = find_location_markers (location);
133 /* a location that isn't "marked" with markers */
137 lam->set_name (location->name());
138 lam->set_position (location->start(), location->end());
140 if (location->is_auto_loop()) {
141 update_loop_range_view ();
142 } else if (location->is_auto_punch()) {
143 update_punch_range_view ();
148 Editor::location_flags_changed (Location *location, void *src)
150 ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::location_flags_changed), location, src));
152 LocationMarkers *lam = find_location_markers (location);
155 /* a location that isn't "marked" with markers */
159 if (location->is_cd_marker()) {
160 lam->set_color_rgba (location_cd_marker_color);
161 } else if (location->is_mark()) {
162 lam->set_color_rgba (location_marker_color);
163 } else if (location->is_auto_punch()) {
164 lam->set_color_rgba (location_punch_color);
165 } else if (location->is_auto_loop()) {
166 lam->set_color_rgba (location_loop_color);
168 lam->set_color_rgba (location_range_color);
171 if (location->is_hidden()) {
178 Editor::LocationMarkers::~LocationMarkers ()
189 Editor::LocationMarkers *
190 Editor::find_location_markers (Location *location)
192 LocationMarkerMap::iterator i;
194 for (i = location_markers.begin(); i != location_markers.end(); ++i) {
195 if ((*i).first == location) {
204 Editor::find_location_from_marker (Marker *marker, bool& is_start)
206 LocationMarkerMap::iterator i;
208 for (i = location_markers.begin(); i != location_markers.end(); ++i) {
209 LocationMarkers *lm = (*i).second;
210 if (lm->start == marker) {
213 } else if (lm->end == marker) {
223 Editor::refresh_location_display_internal (Locations::LocationList& locations)
225 clear_marker_display ();
227 for (Locations::LocationList::iterator i = locations.begin(); i != locations.end(); ++i) {
228 add_new_location (*i);
233 Editor::refresh_location_display ()
235 ENSURE_GUI_THREAD(mem_fun(*this, &Editor::refresh_location_display));
238 session->locations()->apply (*this, &Editor::refresh_location_display_internal);
243 Editor::refresh_location_display_s (Change ignored)
245 ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::refresh_location_display_s), ignored));
248 session->locations()->apply (*this, &Editor::refresh_location_display_internal);
253 Editor::LocationMarkers::hide()
256 if (end) { end->hide(); }
260 Editor::LocationMarkers::show()
263 if (end) { end->show(); }
267 Editor::LocationMarkers::set_name (const string& str)
269 start->set_name (str);
270 if (end) { end->set_name (str); }
274 Editor::LocationMarkers::set_position (nframes_t startf,
277 start->set_position (startf);
278 if (end) { end->set_position (endf); }
282 Editor::LocationMarkers::set_color_rgba (uint32_t rgba)
284 start->set_color_rgba (rgba);
285 if (end) { end->set_color_rgba (rgba); }
289 Editor::mouse_add_new_marker (nframes_t where)
292 Location *location = new Location (where, where, "mark", Location::IsMark);
293 session->begin_reversible_command (_("add marker"));
294 XMLNode &before = session->locations()->get_state();
295 session->locations()->add (location, true);
296 XMLNode &after = session->locations()->get_state();
297 session->add_command (new MementoCommand<Locations>(*(session->locations()), &before, &after));
298 session->commit_reversible_command ();
303 Editor::remove_marker (ArdourCanvas::Item& item, GdkEvent* event)
308 if ((marker = static_cast<Marker*> (item.get_data ("marker"))) == 0) {
309 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
313 Location* loc = find_location_from_marker (marker, is_start);
315 if (session && loc) {
317 /* you can't hide or delete this marker */
320 if (loc->is_auto_loop() || loc->is_auto_punch()) {
322 loc->set_hidden (true, this);
325 Glib::signal_idle().connect (bind (mem_fun(*this, &Editor::really_remove_marker), loc));
331 Editor::really_remove_marker (Location* loc)
333 session->begin_reversible_command (_("remove marker"));
334 XMLNode &before = session->locations()->get_state();
335 session->locations()->remove (loc);
336 XMLNode &after = session->locations()->get_state();
337 session->add_command (new MementoCommand<Locations>(*(session->locations()), &before, &after));
338 session->commit_reversible_command ();
343 Editor::location_gone (Location *location)
345 ENSURE_GUI_THREAD(bind (mem_fun(*this, &Editor::location_gone), location));
347 LocationMarkerMap::iterator i;
349 if (location == transport_loop_location()) {
350 update_loop_range_view (true);
353 if (location == transport_punch_location()) {
354 update_punch_range_view (true);
357 for (i = location_markers.begin(); i != location_markers.end(); ++i) {
358 if ((*i).first == location) {
360 location_markers.erase (i);
367 Editor::tm_marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item)
369 if (tm_marker_menu == 0) {
370 build_tm_marker_menu ();
373 marker_menu_item = item;
374 tm_marker_menu->popup (1, ev->time);
379 Editor::marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item)
382 if ((marker = reinterpret_cast<Marker *> (item->get_data("marker"))) == 0) {
383 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
388 Location * loc = find_location_from_marker (marker, is_start);
389 if (loc == transport_loop_location() || loc == transport_punch_location()) {
390 if (transport_marker_menu == 0) {
391 build_transport_marker_menu ();
393 marker_menu_item = item;
394 transport_marker_menu->popup (1, ev->time);
397 if (loc->is_mark()) {
398 if (marker_menu == 0) {
399 build_marker_menu ();
403 // GTK2FIX use action group sensitivity
405 if (children.size() >= 3) {
406 MenuItem * loopitem = &children[2];
408 if (loc->is_mark()) {
409 loopitem->set_sensitive(false);
412 loopitem->set_sensitive(true);
417 marker_menu_item = item;
418 marker_menu->popup (1, ev->time);
421 if (loc->is_range_marker()) {
422 if (range_marker_menu == 0){
423 build_range_marker_menu ();
425 marker_menu_item = item;
426 range_marker_menu->popup (1, ev->time);
432 Editor::new_transport_marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item)
434 if (new_transport_marker_menu == 0) {
435 build_new_transport_marker_menu ();
438 new_transport_marker_menu->popup (1, ev->time);
443 Editor::transport_marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item)
445 if (transport_marker_menu == 0) {
446 build_transport_marker_menu ();
449 transport_marker_menu->popup (1, ev->time);
453 Editor::build_marker_menu ()
455 using namespace Menu_Helpers;
457 marker_menu = new Menu;
458 MenuList& items = marker_menu->items();
459 marker_menu->set_name ("ArdourContextMenu");
461 items.push_back (MenuElem (_("Locate to Mark"), mem_fun(*this, &Editor::marker_menu_set_playhead)));
462 items.push_back (MenuElem (_("Play from Mark"), mem_fun(*this, &Editor::marker_menu_play_from)));
463 items.push_back (MenuElem (_("Set Mark from Playhead"), mem_fun(*this, &Editor::marker_menu_set_from_playhead)));
465 items.push_back (SeparatorElem());
467 items.push_back (MenuElem (_("Rename Mark"), mem_fun(*this, &Editor::marker_menu_rename)));
468 items.push_back (MenuElem (_("Hide Mark"), mem_fun(*this, &Editor::marker_menu_hide)));
469 items.push_back (MenuElem (_("Remove Mark"), mem_fun(*this, &Editor::marker_menu_remove)));
474 Editor::build_range_marker_menu ()
476 using namespace Menu_Helpers;
478 range_marker_menu = new Menu;
479 MenuList& items = range_marker_menu->items();
480 range_marker_menu->set_name ("ArdourContextMenu");
482 items.push_back (MenuElem (_("Locate to Range Mark"), mem_fun(*this, &Editor::marker_menu_set_playhead)));
483 items.push_back (MenuElem (_("Play from Range Mark"), mem_fun(*this, &Editor::marker_menu_play_from)));
484 items.push_back (MenuElem (_("Loop Range"), mem_fun(*this, &Editor::marker_menu_loop_range)));
485 items.push_back (MenuElem (_("Set Range Mark from Playhead"), mem_fun(*this, &Editor::marker_menu_set_from_playhead)));
486 items.push_back (MenuElem (_("Set Range from Range Selection"), mem_fun(*this, &Editor::marker_menu_set_from_selection)));
488 items.push_back (SeparatorElem());
490 items.push_back (MenuElem (_("Rename Range"), mem_fun(*this, &Editor::marker_menu_rename)));
491 items.push_back (MenuElem (_("Hide Range"), mem_fun(*this, &Editor::marker_menu_hide)));
492 items.push_back (MenuElem (_("Remove Range"), mem_fun(*this, &Editor::marker_menu_remove)));
494 items.push_back (SeparatorElem());
496 items.push_back (MenuElem (_("Separate Regions in Range"), mem_fun(*this, &Editor::marker_menu_separate_regions_using_location)));
497 items.push_back (MenuElem (_("Select All in Range"), mem_fun(*this, &Editor::marker_menu_select_all_selectables_using_range)));
502 Editor::build_tm_marker_menu ()
504 using namespace Menu_Helpers;
506 tm_marker_menu = new Menu;
507 MenuList& items = tm_marker_menu->items();
508 tm_marker_menu->set_name ("ArdourContextMenu");
510 items.push_back (MenuElem (_("Edit"), mem_fun(*this, &Editor::marker_menu_edit)));
511 items.push_back (MenuElem (_("Remove"), mem_fun(*this, &Editor::marker_menu_remove)));
515 Editor::build_new_transport_marker_menu ()
517 using namespace Menu_Helpers;
519 new_transport_marker_menu = new Menu;
520 MenuList& items = new_transport_marker_menu->items();
521 new_transport_marker_menu->set_name ("ArdourContextMenu");
523 items.push_back (MenuElem (_("Set Loop Range"), mem_fun(*this, &Editor::new_transport_marker_menu_set_loop)));
524 items.push_back (MenuElem (_("Set Punch Range"), mem_fun(*this, &Editor::new_transport_marker_menu_set_punch)));
526 new_transport_marker_menu->signal_unmap_event().connect ( mem_fun(*this, &Editor::new_transport_marker_menu_popdown));
530 Editor::build_transport_marker_menu ()
532 using namespace Menu_Helpers;
534 transport_marker_menu = new Menu;
535 MenuList& items = transport_marker_menu->items();
536 transport_marker_menu->set_name ("ArdourContextMenu");
538 items.push_back (MenuElem (_("Locate to Range Mark"), mem_fun(*this, &Editor::marker_menu_set_playhead)));
539 items.push_back (MenuElem (_("Play from Range Mark"), mem_fun(*this, &Editor::marker_menu_play_from)));
540 items.push_back (MenuElem (_("Set Range Mark from Playhead"), mem_fun(*this, &Editor::marker_menu_set_from_playhead)));
541 items.push_back (MenuElem (_("Set Range from Range Selection"), mem_fun(*this, &Editor::marker_menu_set_from_selection)));
542 items.push_back (SeparatorElem());
543 items.push_back (MenuElem (_("Hide Range"), mem_fun(*this, &Editor::marker_menu_hide)));
544 items.push_back (SeparatorElem());
545 items.push_back (MenuElem (_("Separate Regions in Range"), mem_fun(*this, &Editor::marker_menu_separate_regions_using_location)));
546 items.push_back (MenuElem (_("Select All in Range"), mem_fun(*this, &Editor::marker_menu_select_all_selectables_using_range)));
550 Editor::marker_menu_hide ()
554 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
555 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
562 if ((l = find_location_from_marker (marker, is_start)) != 0) {
563 l->set_hidden (true, this);
568 Editor::marker_menu_select_all_selectables_using_range ()
572 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
573 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
580 if (((l = find_location_from_marker (marker, is_start)) != 0) && (l->end() > l->start())) {
581 select_all_within (l->start(), l->end() - 1, 0, DBL_MAX, Selection::Set);
587 Editor::marker_menu_separate_regions_using_location ()
591 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
592 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
599 if (((l = find_location_from_marker (marker, is_start)) != 0) && (l->end() > l->start())) {
600 separate_regions_using_location (*l);
606 Editor::marker_menu_play_from ()
610 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
611 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
618 if ((l = find_location_from_marker (marker, is_start)) != 0) {
621 session->request_locate (l->start(), true);
624 //session->request_bounded_roll (l->start(), l->end());
627 session->request_locate (l->start(), true);
629 session->request_locate (l->end(), true);
636 Editor::marker_menu_set_playhead ()
640 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
641 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
648 if ((l = find_location_from_marker (marker, is_start)) != 0) {
651 session->request_locate (l->start(), false);
655 session->request_locate (l->start(), false);
657 session->request_locate (l->end(), false);
664 Editor::marker_menu_set_from_playhead ()
668 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
669 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
676 if ((l = find_location_from_marker (marker, is_start)) != 0) {
679 l->set_start (session->transport_frame ());
683 l->set_start (session->transport_frame ());
685 l->set_end (session->transport_frame ());
692 Editor::marker_menu_set_from_selection ()
696 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
697 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
704 if ((l = find_location_from_marker (marker, is_start)) != 0) {
711 /* if range selection use first to last */
713 if (mouse_mode == Editing::MouseRange) {
714 if (!selection->time.empty()) {
715 l->set_start (selection->time.start());
716 l->set_end (selection->time.end_frame());
720 if (!selection->regions.empty()) {
721 l->set_start (selection->regions.start());
722 l->set_end (selection->regions.end_frame());
730 Editor::marker_menu_loop_range ()
734 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
735 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
742 if ((l = find_location_from_marker (marker, is_start)) != 0) {
744 if ((l2 = transport_loop_location()) != 0) {
745 l2->set (l->start(), l->end());
747 // enable looping, reposition and start rolling
748 session->request_play_loop(true);
749 session->request_locate (l2->start(), true);
755 Editor::marker_menu_edit ()
761 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
762 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
766 if ((mm = dynamic_cast<MeterMarker*> (marker)) != 0) {
767 edit_meter_section (&mm->meter());
768 } else if ((tm = dynamic_cast<TempoMarker*> (marker)) != 0) {
769 edit_tempo_section (&tm->tempo());
771 fatal << X_("programming erorr: unhandled marker type in Editor::marker_menu_edit")
778 Editor::marker_menu_remove ()
784 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
785 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
789 if ((mm = dynamic_cast<MeterMarker*> (marker)) != 0) {
790 remove_meter_marker (marker_menu_item);
791 } else if ((tm = dynamic_cast<TempoMarker*> (marker)) != 0) {
792 remove_tempo_marker (marker_menu_item);
794 remove_marker (*marker_menu_item, (GdkEvent*) 0);
799 Editor::marker_menu_rename ()
803 if ((marker = reinterpret_cast<Marker *> (marker_menu_item->get_data ("marker"))) == 0) {
804 fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
811 loc = find_location_from_marker (marker, is_start);
815 ArdourPrompter dialog (true);
818 dialog.set_prompt (_("New Name:"));
820 if (loc->is_mark()) {
821 dialog.set_title (_("ardour: rename mark"));
823 dialog.set_title (_("ardour: rename range"));
826 dialog.set_name ("MarkRenameWindow");
827 dialog.set_size_request (250, -1);
828 dialog.set_position (Gtk::WIN_POS_MOUSE);
830 dialog.add_button (_("Rename"), RESPONSE_ACCEPT);
831 dialog.set_response_sensitive (Gtk::RESPONSE_ACCEPT, false);
832 dialog.set_initial_text (loc->name());
836 switch (dialog.run ()) {
837 case RESPONSE_ACCEPT:
843 begin_reversible_command ( _("rename marker") );
844 XMLNode &before = session->locations()->get_state();
846 dialog.get_result(txt);
849 XMLNode &after = session->locations()->get_state();
850 session->add_command (new MementoCommand<Locations>(*(session->locations()), &before, &after));
851 commit_reversible_command ();
855 Editor::new_transport_marker_menu_popdown (GdkEventAny *ev)
858 transport_bar_drag_rect->hide();
859 range_marker_drag_rect->hide();
865 Editor::new_transport_marker_menu_set_loop ()
867 if (!session) return;
869 begin_reversible_command (_("set loop range"));
873 if ((tll = transport_loop_location()) == 0) {
874 Location* loc = new Location (temp_location->start(), temp_location->end(), _("Loop"), Location::IsAutoLoop);
875 XMLNode &before = session->locations()->get_state();
876 session->locations()->add (loc, true);
877 session->set_auto_loop_location (loc);
878 XMLNode &after = session->locations()->get_state();
879 session->add_command (new MementoCommand<Locations>(*(session->locations()), &before, &after));
882 XMLNode &before = tll->get_state();
883 tll->set_hidden (false, this);
884 tll->set (temp_location->start(), temp_location->end());
885 XMLNode &after = tll->get_state();
886 session->add_command (new MementoCommand<Location>(*tll, &before, &after));
889 commit_reversible_command ();
893 Editor::new_transport_marker_menu_set_punch ()
895 if (!session) return;
897 begin_reversible_command (_("set punch range"));
901 if ((tpl = transport_punch_location()) == 0) {
902 tpl = new Location (temp_location->start(), temp_location->end(), _("Punch"), Location::IsAutoPunch);
903 XMLNode &before = session->locations()->get_state();
904 session->locations()->add (tpl, true);
905 session->set_auto_punch_location (tpl);
906 XMLNode &after = session->locations()->get_state();
907 session->add_command (new MementoCommand<Locations>(*(session->locations()), &before, &after));
909 XMLNode &before = tpl->get_state();
910 tpl->set_hidden(false, this);
911 tpl->set(temp_location->start(), temp_location->end());
912 XMLNode &after = tpl->get_state();
913 session->add_command (new MementoCommand<Location>(*tpl, &before, &after));
916 commit_reversible_command ();
920 Editor::update_loop_range_view (bool visibility)
928 if (session->get_play_loop() && ((tll = transport_loop_location()) != 0)) {
930 double x1 = frame_to_pixel (tll->start());
931 double x2 = frame_to_pixel (tll->end());
933 transport_loop_range_rect->property_x1() = x1;
934 transport_loop_range_rect->property_x2() = x2;
937 transport_loop_range_rect->show();
940 else if (visibility) {
941 transport_loop_range_rect->hide();
946 Editor::update_punch_range_view (bool visibility)
954 if ((Config->get_punch_in() || Config->get_punch_out()) && ((tpl = transport_punch_location()) != 0)) {
956 double x1 = frame_to_pixel (tpl->start());
957 double x2 = frame_to_pixel (tpl->end());
959 transport_punch_range_rect->property_x1() = x1;
960 transport_punch_range_rect->property_x2() = x2;
963 transport_punch_range_rect->show();
966 else if (visibility) {
967 transport_punch_range_rect->hide();
970 // if (session->get_punch_in()) {
971 // double x = frame_to_pixel (transport_punch_location->start());
972 // gnome_canvas_item_set (transport_punchin_line, "x1", x, "x2", x, NULL);
975 // gnome_canvas_item_show (transport_punchin_line);
978 // else if (visibility) {
979 // gnome_canvas_item_hide (transport_punchin_line);
982 // if (session->get_punch_out()) {
983 // double x = frame_to_pixel (transport_punch_location->end());
985 // gnome_canvas_item_set (transport_punchout_line, "x1", x, "x2", x, NULL);
988 // gnome_canvas_item_show (transport_punchout_line);
991 // else if (visibility) {
992 // gnome_canvas_item_hide (transport_punchout_line);