Patch from jdavisp3 to fix bug #1841.
[ardour.git] / gtk2_ardour / automation_time_axis.h
index c1dc72317c43a8c448d5559f89804a816c895ae7..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,9 +65,9 @@ class AutomationTimeAxisView : public TimeAxisView {
                                boost::shared_ptr<ARDOUR::AutomationControl>,
                                PublicEditor&,
                                TimeAxisView& parent,
+                               bool show_regions,
                                ArdourCanvas::Canvas& canvas,
                                const string & name, /* translatable */
-                               const string & state_name, /* not translatable */
                                const string & plug_name = "");
 
        ~AutomationTimeAxisView();
@@ -95,13 +98,16 @@ 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&);
-       XMLNode* get_state_node ();
        
        guint32 show_at (double y, int& nth, Gtk::VBox *parent);
        void hide ();
+       
+       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
@@ -112,11 +118,9 @@ class AutomationTimeAxisView : public TimeAxisView {
        
        ArdourCanvas::SimpleRect* _base_rect;
        boost::shared_ptr<AutomationLine> _line;
+       AutomationStreamView*             _view;
        
-       XMLNode* _xml_node;
-
        string _name;
-       string _state_name;
        bool    in_destructor;
        bool    ignore_toggle;
 
@@ -135,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 ();
@@ -155,9 +162,12 @@ 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 ensure_xml_node ();
        void update_extra_xml_shown (bool editor_shown);
 
        void entered ();
@@ -166,7 +176,7 @@ class AutomationTimeAxisView : public TimeAxisView {
        void set_colors ();
        void color_handler ();
 
-       static Pango::FontDescription name_font;
+       static Pango::FontDescription* name_font;
        static bool have_name_font;
 };