summaryrefslogtreecommitdiff
path: root/gtk2_ardour/audio_time_axis.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-07-07 03:19:04 +0000
committerDavid Robillard <d@drobilla.net>2007-07-07 03:19:04 +0000
commit68653307e666b8daabd2931ce0731d400d947707 (patch)
tree773e4d462feddba5e0fb6fa1bdebd45eec930e95 /gtk2_ardour/audio_time_axis.cc
parentf87954eeb5d6a2a8b12e681ddb171dc1f6d76095 (diff)
Note modes: note, percussion.
Percussion tracks display diamonds. Separated/fixed MIDI and audio mode menus. CC automation modes: discrete, line. Bar controllers follow setting (hard steps or line) on playback. Sent CC data is always discrete (line not implemented yet). Discrete tracks show no lines, and always show control points. Separated ControlPoint from AutomationLine. Added some basic information (range) to Parameter (to be fleshed out..). git-svn-id: svn://localhost/ardour2/trunk@2123 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/audio_time_axis.cc')
-rw-r--r--gtk2_ardour/audio_time_axis.cc29
1 files changed, 29 insertions, 0 deletions
diff --git a/gtk2_ardour/audio_time_axis.cc b/gtk2_ardour/audio_time_axis.cc
index 73500f3ea1..db88982089 100644
--- a/gtk2_ardour/audio_time_axis.cc
+++ b/gtk2_ardour/audio_time_axis.cc
@@ -218,6 +218,35 @@ AudioTimeAxisView::append_extra_display_menu_items ()
items.push_back (MenuElem (_("Layers"), *layers_menu));
}
+
+Gtk::Menu*
+AudioTimeAxisView::build_mode_menu()
+{
+ using namespace Menu_Helpers;
+
+ Menu* mode_menu = manage (new Menu);
+ MenuList& items = mode_menu->items();
+ mode_menu->set_name ("ArdourContextMenu");
+
+ RadioMenuItem::Group mode_group;
+ items.push_back (RadioMenuElem (mode_group, _("Normal"),
+ bind (mem_fun (*this, &AudioTimeAxisView::set_track_mode), ARDOUR::Normal)));
+ normal_track_mode_item = dynamic_cast<RadioMenuItem*>(&items.back());
+ items.push_back (RadioMenuElem (mode_group, _("Tape"),
+ bind (mem_fun (*this, &AudioTimeAxisView::set_track_mode), ARDOUR::Destructive)));
+ destructive_track_mode_item = dynamic_cast<RadioMenuItem*>(&items.back());
+
+ switch (track()->mode()) {
+ case ARDOUR::Destructive:
+ destructive_track_mode_item->set_active ();
+ break;
+ case ARDOUR::Normal:
+ normal_track_mode_item->set_active ();
+ break;
+ }
+
+ return mode_menu;
+}
void
AudioTimeAxisView::toggle_waveforms ()