1 #ifndef __ardour_gtk_automation_time_axis_h__
2 #define __ardour_gtk_automation_time_axis_h__
7 #include <ardour/types.h>
10 #include "time_axis_view.h"
11 #include "simplerect.h"
24 class AudioRegionSelection;
31 class AutomationTimeAxisView : public TimeAxisView {
33 AutomationTimeAxisView (ARDOUR::Session&,
37 ArdourCanvas::Canvas& canvas,
38 const string & name, /* translatable */
39 const string & state_name, /* not translatable */
40 const string & plug_name = "");
42 ~AutomationTimeAxisView();
44 virtual void set_height (TimeAxisView::TrackHeight);
45 void set_samples_per_unit (double);
46 std::string name() const { return _name; }
48 virtual void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, jack_nframes_t, double) = 0;
50 virtual void clear_lines ();
51 virtual void add_line (AutomationLine&);
53 vector<AutomationLine*> lines;
55 void set_selected_points (PointSelection&);
56 void get_selectables (jack_nframes_t start, jack_nframes_t end, double top, double bot, list<Selectable *>&);
57 void get_inverted_selectables (Selection&, list<Selectable*>& results);
59 void show_timestretch (jack_nframes_t start, jack_nframes_t end) {}
60 void hide_timestretch () {}
62 /* editing operations */
64 bool cut_copy_clear (Selection&, Editing::CutCopyOp);
65 bool cut_copy_clear_objects (PointSelection&, Editing::CutCopyOp);
66 bool paste (jack_nframes_t, float times, Selection&, size_t nth);
67 void reset_objects (PointSelection&);
69 void add_ghost (GhostRegion*);
70 void remove_ghost (GhostRegion*);
72 void show_all_control_points ();
73 void hide_all_but_selected_control_points ();
74 void set_state (const XMLNode&);
75 XMLNode* get_state_node ();
79 ArdourCanvas::SimpleRect* base_rect;
84 Gtk::Button hide_button;
85 Gtk::Button height_button;
86 Gtk::Button clear_button;
87 Gtk::Button auto_button;
88 Gtk::Menu* automation_menu;
92 Gtk::CheckMenuItem* auto_off_item;
93 Gtk::CheckMenuItem* auto_play_item;
94 Gtk::CheckMenuItem* auto_touch_item;
95 Gtk::CheckMenuItem* auto_write_item;
97 void clear_clicked ();
98 void height_clicked ();
100 void auto_clicked ();
102 virtual void build_display_menu ();
104 list<GhostRegion*> ghosts;
106 bool cut_copy_clear_one (AutomationLine&, Selection&, Editing::CutCopyOp);
107 bool cut_copy_clear_objects_one (AutomationLine&, PointSelection&, Editing::CutCopyOp);
108 bool paste_one (AutomationLine&, jack_nframes_t, float times, Selection&, size_t nth);
109 void reset_objects_one (AutomationLine&, PointSelection&);
111 virtual void set_automation_state (ARDOUR::AutoState) = 0;
112 bool ignore_state_request;
114 void automation_state_changed ();
115 sigc::connection automation_connection;
121 #endif /* __ardour_gtk_automation_time_axis_h__ */