d4e7a46e71096c5cf29f68bcb5da0dd3920ed454
[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 #include "automation_time_axis.h"
6
7 namespace ARDOUR {
8         class Redirect;
9 }
10
11 class RedirectAutomationTimeAxisView : public AutomationTimeAxisView
12 {
13   public:
14         RedirectAutomationTimeAxisView (ARDOUR::Session&,
15                                         ARDOUR::Route&,
16                                         PublicEditor&,
17                                         TimeAxisView& parent,
18                                         Gtk::Widget* parent,
19                                         std::string name,
20                                         uint32_t port,
21                                         ARDOUR::Redirect& rd,
22                                         std::string state_name);
23
24         ~RedirectAutomationTimeAxisView();
25
26         void add_automation_event (GtkCanvasItem *item, GdkEvent *event, jack_nframes_t, double);
27
28         guint32 show_at (double y, int& nth, Gtk::VBox *parent);
29         void hide ();
30
31         
32    private:
33         ARDOUR::Redirect& redirect;
34         uint32_t port;
35
36         XMLNode *xml_node;
37         void ensure_xml_node();
38         void update_extra_xml_shown (bool editor_shown);
39
40         void set_automation_state (ARDOUR::AutoState);
41 };
42
43 #endif /* __ardour_gtk_redirect_automation_time_axis_h__ */