replace ::cast_dynamic() with relevant ActionManager::get_*_action() calls
[ardour.git] / gtk2_ardour / audio_time_axis.h
1 /*
2     Copyright (C) 2000-2006 Paul Davis
3
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.
8
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.
13
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.
17
18 */
19
20 #ifndef __ardour_audio_time_axis_h__
21 #define __ardour_audio_time_axis_h__
22
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>
30
31 #include <list>
32
33 #include "ardour/types.h"
34
35 #include "ardour_dialog.h"
36 #include "route_ui.h"
37 #include "enums.h"
38 #include "editing.h"
39 #include "route_time_axis.h"
40
41 namespace ARDOUR {
42         class Session;
43         class RouteGroup;
44         class IOProcessor;
45         class Processor;
46         class Location;
47         class AudioPlaylist;
48 }
49
50 class PublicEditor;
51 class AudioThing;
52 class AudioStreamView;
53 class Selection;
54 class Selectable;
55 class RegionView;
56 class AudioRegionView;
57 class AutomationLine;
58 class AutomationGainLine;
59 class AutomationPanLine;
60 class TimeSelection;
61 class AutomationTimeAxisView;
62
63 class AudioTimeAxisView : public RouteTimeAxisView
64 {
65 public:
66         AudioTimeAxisView (PublicEditor&, ARDOUR::Session*, ArdourCanvas::Canvas& canvas);
67         virtual ~AudioTimeAxisView ();
68
69         void set_route (boost::shared_ptr<ARDOUR::Route>);
70
71         AudioStreamView* audio_view();
72
73         void set_show_waveforms_recording (bool yn);
74
75         /* Overridden from parent to store display state */
76         guint32 show_at (double y, int& nth, Gtk::VBox *parent);
77
78         void create_automation_child (const Evoral::Parameter& param, bool show);
79
80         void first_idle ();
81
82 private:
83         friend class AudioStreamView;
84         friend class AudioRegionView;
85
86         void route_active_changed ();
87
88         Gtk::Menu* build_mode_menu();
89         void build_automation_action_menu (bool);
90
91         void show_all_automation (bool apply_to_selection = false);
92         void show_existing_automation (bool apply_to_selection = false);
93         void hide_all_automation (bool apply_to_selection = false);
94
95         void hide ();
96
97         void update_control_names ();
98 };
99
100 #endif /* __ardour_audio_time_axis_h__ */
101