Patch from jdavisp3 to fix bug #1841.
[ardour.git] / gtk2_ardour / automation_time_axis.h
index c3be6ffd0013f1b9c69cc95b7294774baa45c6a0..4e21d281a3613e9f547a5d1e56652fad2feff75d 100644 (file)
@@ -42,6 +42,7 @@ using std::string;
 namespace ARDOUR {
        class Session;
        class Route;
+       class AutomationControl;
 }
 
 class PublicEditor;
@@ -52,6 +53,8 @@ class AutomationLine;
 class GhostRegion;
 class Selection;
 class Selectable;
+class AutomationStreamView;
+class AutomationController;
 
 
 class AutomationTimeAxisView : public TimeAxisView {
@@ -62,6 +65,7 @@ class AutomationTimeAxisView : public TimeAxisView {
                                boost::shared_ptr<ARDOUR::AutomationControl>,
                                PublicEditor&,
                                TimeAxisView& parent,
+                               bool show_regions,
                                ArdourCanvas::Canvas& canvas,
                                const string & name, /* translatable */
                                const string & plug_name = "");
@@ -94,8 +98,6 @@ class AutomationTimeAxisView : public TimeAxisView {
        void add_ghost (GhostRegion*);
        void remove_ghost (GhostRegion*);
 
-       void show_all_control_points ();
-       void hide_all_but_selected_control_points ();
        void set_state (const XMLNode&);
        
        guint32 show_at (double y, int& nth, Gtk::VBox *parent);
@@ -103,6 +105,9 @@ class AutomationTimeAxisView : public TimeAxisView {
        
        static const string state_node_name;
        XMLNode* get_state_node();
+       
+       boost::shared_ptr<ARDOUR::AutomationControl> control()    { return _control; }
+       boost::shared_ptr<AutomationController>      controller() { return _controller; }
 
   protected:
        boost::shared_ptr<ARDOUR::Route> _route; ///< Parent route
@@ -113,6 +118,7 @@ class AutomationTimeAxisView : public TimeAxisView {
        
        ArdourCanvas::SimpleRect* _base_rect;
        boost::shared_ptr<AutomationLine> _line;
+       AutomationStreamView*             _view;
        
        string _name;
        bool    in_destructor;
@@ -133,6 +139,9 @@ class AutomationTimeAxisView : public TimeAxisView {
        Gtk::CheckMenuItem*     auto_touch_item;
        Gtk::CheckMenuItem*     auto_write_item;
 
+       Gtk::CheckMenuItem* mode_discrete_item;
+       Gtk::CheckMenuItem* mode_line_item;
+
        void add_line (boost::shared_ptr<AutomationLine>);
        
        void clear_clicked ();
@@ -153,6 +162,10 @@ class AutomationTimeAxisView : public TimeAxisView {
        bool ignore_state_request;
 
        void automation_state_changed ();
+
+       void set_interpolation (ARDOUR::AutomationList::InterpolationStyle);
+       void interpolation_changed ();
+
        sigc::connection automation_connection;
 
        void update_extra_xml_shown (bool editor_shown);