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"
26 class AudioRegionSelection;
33 class AutomationTimeAxisView : public TimeAxisView {
35 AutomationTimeAxisView (ARDOUR::Session&,
40 std::string name, /* translatable */
41 std::string state_name, /* not translatable */
42 std::string plug_name = "");
44 ~AutomationTimeAxisView();
46 void set_height (TimeAxisView::TrackHeight);
47 void set_samples_per_unit (double);
48 std::string name() const { return _name; }
50 virtual void add_automation_event (GtkCanvasItem *item, GdkEvent *event, jack_nframes_t, double) = 0;
53 void add_line (AutomationLine&);
55 vector<AutomationLine*> lines;
57 void set_selected_points (PointSelection&);
58 void get_selectables (jack_nframes_t start, jack_nframes_t end, double top, double bot, list<Selectable *>&);
59 void get_inverted_selectables (Selection&, list<Selectable*>& results);
61 void show_timestretch (jack_nframes_t start, jack_nframes_t end) {}
62 void hide_timestretch () {}
64 /* editing operations */
66 bool cut_copy_clear (Selection&, Editing::CutCopyOp);
67 bool cut_copy_clear_objects (PointSelection&, Editing::CutCopyOp);
68 bool paste (jack_nframes_t, float times, Selection&, size_t nth);
70 void add_ghost (GhostRegion*);
71 void remove_ghost (GhostRegion*);
73 void show_all_control_points ();
74 void hide_all_but_selected_control_points ();
75 void set_state (const XMLNode&);
76 XMLNode* get_state_node ();
80 GtkCanvasItem* base_rect;
85 Gtk::Button hide_button;
86 Gtk::Button height_button;
87 Gtk::Button clear_button;
88 Gtk::Button auto_button;
89 Gtk::Menu* automation_menu;
93 Gtk::CheckMenuItem* auto_off_item;
94 Gtk::CheckMenuItem* auto_play_item;
95 Gtk::CheckMenuItem* auto_touch_item;
96 Gtk::CheckMenuItem* auto_write_item;
98 void clear_clicked ();
99 void height_clicked ();
100 void hide_clicked ();
101 void auto_clicked ();
103 virtual void build_display_menu ();
105 list<GhostRegion*> ghosts;
107 bool cut_copy_clear_one (AutomationLine&, Selection&, Editing::CutCopyOp);
108 bool cut_copy_clear_objects_one (AutomationLine&, PointSelection&, Editing::CutCopyOp);
109 bool paste_one (AutomationLine&, jack_nframes_t, float times, Selection&, size_t nth);
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__ */