Add a couple of missing attach_buffers() calls after _ports has been changed. I...
[ardour2.git] / gtk2_ardour / audio_time_axis.h
blobc096c6706a2c22d0d82b5b986f2f6ade6736d52f
1 /*
2 Copyright (C) 2000-2006 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 #ifndef __ardour_audio_time_axis_h__
21 #define __ardour_audio_time_axis_h__
23 #include <gtkmm/table.h>
24 #include <gtkmm/button.h>
25 #include <gtkmm/box.h>
26 #include <gtkmm/menu.h>
27 #include <gtkmm/menuitem.h>
28 #include <gtkmm/radiomenuitem.h>
29 #include <gtkmm/checkmenuitem.h>
31 #include <gtkmm2ext/selector.h>
32 #include <list>
34 #include "ardour/types.h"
36 #include "ardour_dialog.h"
37 #include "route_ui.h"
38 #include "enums.h"
39 #include "editing.h"
40 #include "route_time_axis.h"
41 #include "canvas.h"
43 namespace ARDOUR {
44 class Session;
45 class RouteGroup;
46 class IOProcessor;
47 class Processor;
48 class Location;
49 class AudioPlaylist;
52 class PublicEditor;
53 class AudioThing;
54 class AudioStreamView;
55 class Selection;
56 class Selectable;
57 class RegionView;
58 class AudioRegionView;
59 class AutomationLine;
60 class AutomationGainLine;
61 class AutomationPanLine;
62 class TimeSelection;
63 class AutomationTimeAxisView;
65 class AudioTimeAxisView : public RouteTimeAxisView
67 public:
68 AudioTimeAxisView (PublicEditor&, ARDOUR::Session*, ArdourCanvas::Canvas& canvas);
69 virtual ~AudioTimeAxisView ();
71 void set_route (boost::shared_ptr<ARDOUR::Route>);
73 AudioStreamView* audio_view();
75 void set_show_waveforms_recording (bool yn);
76 void show_all_xfades (bool apply_to_selection = false);
77 void hide_all_xfades (bool apply_to_selection = false);
78 void hide_dependent_views (TimeAxisViewItem&);
79 void reveal_dependent_views (TimeAxisViewItem&);
81 /* Overridden from parent to store display state */
82 guint32 show_at (double y, int& nth, Gtk::VBox *parent);
84 void enter_internal_edit_mode ();
85 void leave_internal_edit_mode ();
87 void create_automation_child (const Evoral::Parameter& param, bool show);
89 void first_idle ();
91 private:
92 friend class AudioStreamView;
93 friend class AudioRegionView;
95 void route_active_changed ();
97 void append_extra_display_menu_items ();
98 Gtk::Menu* build_mode_menu();
99 void build_automation_action_menu (bool);
101 void show_all_automation (bool apply_to_selection = false);
102 void show_existing_automation (bool apply_to_selection = false);
103 void hide_all_automation (bool apply_to_selection = false);
105 void hide ();
107 void gain_hidden ();
108 void pan_hidden ();
110 void ensure_pan_views (bool show = true);
111 void update_control_names ();
113 void update_gain_track_visibility ();
114 void update_pan_track_visibility ();
116 Gtk::CheckMenuItem* gain_automation_item;
117 std::list<boost::shared_ptr<AutomationTimeAxisView> > pan_tracks;
118 Gtk::CheckMenuItem* pan_automation_item;
121 #endif /* __ardour_audio_time_axis_h__ */