diff options
author | David Robillard <d@drobilla.net> | 2007-06-30 18:41:50 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-06-30 18:41:50 +0000 |
commit | bbf41757133a29df0d37905f2fdce091878d2ffd (patch) | |
tree | 2506ed83985d406019236c68704df0b9542dbe3a /gtk2_ardour/automation_time_axis.h | |
parent | 685fa95e729e5d510b28b4c715da062e9db580d9 (diff) |
Another not-quite-there-but-better commit.
Brought plugin automation into the fold of new automation system.
Fixed plugin automation, broke panner automation :] (pending Panner work).
Made AutomationController better at automatically following it's controller value (mimic what gain meter does).
Fixed some visible automation track bugs (but still broken WRT serialization).
git-svn-id: svn://localhost/ardour2/trunk@2092 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/automation_time_axis.h')
-rw-r--r-- | gtk2_ardour/automation_time_axis.h | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/gtk2_ardour/automation_time_axis.h b/gtk2_ardour/automation_time_axis.h index b88c21d68d..c1dc72317c 100644 --- a/gtk2_ardour/automation_time_axis.h +++ b/gtk2_ardour/automation_time_axis.h @@ -28,6 +28,7 @@ #include <boost/shared_ptr.hpp> #include <ardour/types.h> +#include <ardour/automatable.h> #include "canvas.h" #include "time_axis_view.h" @@ -52,12 +53,13 @@ class GhostRegion; class Selection; class Selectable; -/** TODO: All the derived types of this can probably be merged into this cleanly. - */ + class AutomationTimeAxisView : public TimeAxisView { public: AutomationTimeAxisView (ARDOUR::Session&, boost::shared_ptr<ARDOUR::Route>, + boost::shared_ptr<ARDOUR::Automatable>, + boost::shared_ptr<ARDOUR::AutomationControl>, PublicEditor&, TimeAxisView& parent, ArdourCanvas::Canvas& canvas, @@ -67,17 +69,14 @@ class AutomationTimeAxisView : public TimeAxisView { ~AutomationTimeAxisView(); - virtual void set_height (TimeAxisView::TrackHeight); + void set_height (TimeAxisView::TrackHeight); void set_samples_per_unit (double); std::string name() const { return _name; } - virtual void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, nframes_t, double) = 0; - - virtual void clear_lines (); - virtual void add_line (AutomationLine&); + void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, nframes_t, double); - typedef vector<std::pair<AutomationLine*,boost::shared_ptr<AutomationController> > > Lines; - Lines lines; + void clear_lines (); + boost::shared_ptr<AutomationLine> line() { return _line; } void set_selected_points (PointSelection&); void get_selectables (nframes_t start, nframes_t end, double top, double bot, list<Selectable *>&); @@ -100,10 +99,22 @@ class AutomationTimeAxisView : public TimeAxisView { 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 (); protected: - boost::shared_ptr<ARDOUR::Route> route; - ArdourCanvas::SimpleRect* base_rect; + boost::shared_ptr<ARDOUR::Route> _route; ///< Parent route + boost::shared_ptr<ARDOUR::AutomationControl> _control; ///< Control + boost::shared_ptr<ARDOUR::Automatable> _automatable; ///< Control owner, maybe = _route + + boost::shared_ptr<AutomationController> _controller; + + ArdourCanvas::SimpleRect* _base_rect; + boost::shared_ptr<AutomationLine> _line; + + XMLNode* _xml_node; + string _name; string _state_name; bool in_destructor; @@ -124,12 +135,14 @@ class AutomationTimeAxisView : public TimeAxisView { Gtk::CheckMenuItem* auto_touch_item; Gtk::CheckMenuItem* auto_write_item; + void add_line (boost::shared_ptr<AutomationLine>); + void clear_clicked (); void height_clicked (); void hide_clicked (); void auto_clicked (); - virtual void build_display_menu (); + void build_display_menu (); list<GhostRegion*> ghosts; @@ -144,6 +157,9 @@ class AutomationTimeAxisView : public TimeAxisView { void automation_state_changed (); sigc::connection automation_connection; + void ensure_xml_node (); + void update_extra_xml_shown (bool editor_shown); + void entered (); void exited (); |