1 #ifndef __ardour_gtk_automation_time_axis_h__
2 #define __ardour_gtk_automation_time_axis_h__
7 #include <ardour/types.h>
9 #include "time_axis_view.h"
10 #include "simplerect.h"
27 class AudioRegionSelection;
34 class AutomationTimeAxisView : public TimeAxisView {
36 AutomationTimeAxisView (ARDOUR::Session&,
41 std::string name, /* translatable */
42 std::string state_name, /* not translatable */
43 std::string plug_name = "");
45 ~AutomationTimeAxisView();
47 void set_height (TimeAxisView::TrackHeight);
48 void set_samples_per_unit (double);
49 std::string name() const { return _name; }
51 virtual void add_automation_event (Gnome::Canvas::Item *item, GdkEvent *event, jack_nframes_t, double) = 0;
54 void add_line (AutomationLine&);
56 vector<AutomationLine*> lines;
58 void set_selected_points (PointSelection&);
59 void get_selectables (jack_nframes_t start, jack_nframes_t end, double top, double bot, list<Selectable *>&);
60 void get_inverted_selectables (Selection&, list<Selectable*>& results);
62 void show_timestretch (jack_nframes_t start, jack_nframes_t end) {}
63 void hide_timestretch () {}
65 /* editing operations */
67 bool cut_copy_clear (Selection&, Editing::CutCopyOp);
68 bool cut_copy_clear_objects (PointSelection&, Editing::CutCopyOp);
69 bool paste (jack_nframes_t, float times, Selection&, size_t nth);
71 void add_ghost (GhostRegion*);
72 void remove_ghost (GhostRegion*);
74 void show_all_control_points ();
75 void hide_all_but_selected_control_points ();
76 void set_state (const XMLNode&);
77 XMLNode* get_state_node ();
81 Gnome::Canvas::SimpleRect* base_rect;
86 Gtk::Button hide_button;
87 Gtk::Button height_button;
88 Gtk::Button clear_button;
89 Gtk::Button auto_button;
90 Gtk::Menu* automation_menu;
94 Gtk::CheckMenuItem* auto_off_item;
95 Gtk::CheckMenuItem* auto_play_item;
96 Gtk::CheckMenuItem* auto_touch_item;
97 Gtk::CheckMenuItem* auto_write_item;
99 void clear_clicked ();
100 void height_clicked ();
101 void hide_clicked ();
102 void auto_clicked ();
104 virtual void build_display_menu ();
106 list<GhostRegion*> ghosts;
108 bool cut_copy_clear_one (AutomationLine&, Selection&, Editing::CutCopyOp);
109 bool cut_copy_clear_objects_one (AutomationLine&, PointSelection&, Editing::CutCopyOp);
110 bool paste_one (AutomationLine&, jack_nframes_t, float times, Selection&, size_t nth);
112 virtual void set_automation_state (ARDOUR::AutoState) = 0;
113 bool ignore_state_request;
115 void automation_state_changed ();
116 sigc::connection automation_connection;
122 #endif /* __ardour_gtk_automation_time_axis_h__ */