Merged with trunk R992.
[ardour.git] / gtk2_ardour / redirect_automation_time_axis.h
1 #ifndef __ardour_gtk_redirect_automation_time_axis_h__
2 #define __ardour_gtk_redirect_automation_time_axis_h__
3
4 #include <pbd/xml++.h>
5
6 #include "canvas.h"
7 #include "automation_time_axis.h"
8
9 namespace ARDOUR {
10         class Redirect;
11 }
12
13 class RedirectAutomationTimeAxisView : public AutomationTimeAxisView
14 {
15   public:
16         RedirectAutomationTimeAxisView (ARDOUR::Session&,
17                                         boost::shared_ptr<ARDOUR::Route>,
18                                         PublicEditor&,
19                                         TimeAxisView& parent,
20                                         ArdourCanvas::Canvas& canvas,
21                                         std::string name,
22                                         uint32_t port,
23                                         ARDOUR::Redirect& rd,
24                                         std::string state_name);
25
26         ~RedirectAutomationTimeAxisView();
27         
28         void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, nframes_t, double);
29
30         guint32 show_at (double y, int& nth, Gtk::VBox *parent);
31         void hide ();
32
33         
34    private:
35         ARDOUR::Redirect& redirect;
36         uint32_t port;
37
38         XMLNode *xml_node;
39         void ensure_xml_node();
40         void update_extra_xml_shown (bool editor_shown);
41
42         void set_automation_state (ARDOUR::AutoState);
43 };
44
45 #endif /* __ardour_gtk_redirect_automation_time_axis_h__ */